• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Analysis Factor

The Analysis Factor

Statistical Consulting, Resources, and Statistics Workshops for Researchers

  • Home
  • Our Programs
    • Membership
    • Online Workshops
    • Free Webinars
    • Consulting Services
  • About
    • Our Team
    • Our Core Values
    • Our Privacy Policy
    • Employment
    • Collaborate with Us
  • Statistical Resources
  • Contact
  • Blog
  • Login

Observed Values less than 5 in a Chi Square test–No biggie.

by Karen Grace-Martin 20 Comments

I was recently asked this question about Chi-square tests.  This question comes up a lot, so I thought I’d share my answer.

I have to compare two sets of categorical data in a 2×4 table. I cannot run the chi-square test because most of the cells contain values less than five and a couple of them contain values of 0. Is there any other test that I could use that overcomes the limitations of chi-square?

And here is my answer:

1. The assumption of the Chi-square test is not that the observed value in each cell is greater than 5.  It is that the expected value in each cell is greater than 5.  (The expected value for each cell is row total*column total/overall total).   Often when the observed values are low, the totals are too, so they overlap a lot, but not always.

2. If you still find that your expected values are too low, use a Fisher’s Exact test.  Not all standard statistical software will do one for a 2×4 table, but it can be done.  StatXAct will do it.  Great software if you can get access to it.

(If you’re wondering, SPSS will only do a Fisher’s Exact for a 2×2 table).

Tagged With: chi-square test

Related Posts

  • Best Practices for Organizing your Data Analysis
  • Three Habits in Data Analysis That Feel Efficient, Yet are Not
  • Best Practices for Data Preparation
  • What is a Chi-Square Test?

Reader Interactions

Comments

  1. Zuzanna says

    April 6, 2021 at 1:46 pm

    Hi. I am using spss. What can I do if I have one cell with an expected count less than 5? Which test should I perform, since spss wont allow me to do it with a 4×2 table? Thank you a lot of your response in advance…

    Reply
  2. Valencia says

    May 28, 2020 at 11:24 pm

    I have a question regarding the validity of using chi-square test. Say if I want to look at the writing of two groups of people (native speaker vs. non-native speaker) and see if there’s association between the two groups in terms of a set of words (11 words). I intend to use normalized frequencies (normal frequency of each word per thousand words) because the usage of a certain word is sensitive to text length. And some of the normal frequencies are very small (<0.2) regardless that the raw frequencies are not (actually pretty large, such ), can I still use chi-square test of independence? Thanks!

    Reply
  3. Rahul says

    April 12, 2020 at 10:04 am

    there is one 2*2 table and in which one cell contain less than 5 count i.e 1. can be possible for Chi-square.

    Reply
  4. Chinnamamba Cheepuri says

    November 10, 2019 at 11:23 am

    seasons greetings!
    all my observations are less than 5 so i used fisher’s exact test but it showing that in place of ‘f’ value i.e ” Cannot be computed because there is insufficient memory”. can you please suggest any other procedure to check chi square test. my thesis topic is smart phone effect on psychological aspects related to social science. Thanks

    Reply
  5. Angel says

    May 23, 2018 at 9:43 am

    Can I use Chi square when the expected count is less than 5 but the observed ones are higher than 5?

    Reply
    • Karen Grace-Martin says

      October 26, 2018 at 5:21 pm

      Hi Angel,

      No, but you can when it’s the other way around.

      Reply
  6. Shivam dixit says

    March 29, 2017 at 11:42 am

    I have a crosstab 2×2 with a cell having 0 value. So should I use what kinds of test for this crosstab.
    Positive Negative
    positive negative
    male 38 6
    female 30 0

    Reply
  7. Spoorthi says

    December 21, 2016 at 4:51 am

    hi all,

    below is my data, I want generate chisq p-value for 5 tests together. I have data for 3 tests (1,2,3) but don’t have counts for test 4 and 5. these should include in the model to get pvalue. any one could suggest what I have to do?

    data test;
    test=1; trt=1; count=6;output;
    test=1; trt=2; count=6;output;
    test=2; trt=1; count=10;output;
    test=2; trt=2; count=6;output;
    test=3; trt=1; count=8;output;
    test=3; trt=2; count=6;output;
    test=4; trt=1; count=0;output;
    test=4; trt=2; count=0;output;
    test=5; trt=1; count=0;output;
    test=5; trt=2; count=0;output;
    run;

    proc sort data=test;by test trt;run;
    proc freq data=test order=data;
    table test*trt/chisq;
    weight count/zeros;
    run;

    *when i run this code i am getting below warning not getting chisqure pvalue;

    Statistics for Table of test by trt

    Row or column sum zero. No statistics computed for this table.

    Sample Size = 42

    Reply
  8. najam says

    December 8, 2016 at 6:37 pm

    Iam using graph pad prism and for 2×2 contingency table iam using fisher exact test because i have total sample size lees than 100 but at some times it gives very odd results that are not acceptable like

    26 4
    83 18
    it gives significant p value for these 4 samples out of total sample size of one city

    Reply
  9. Lan says

    April 30, 2016 at 8:06 am

    I have a crosstab 3×2 with a cell having 0 value. So should I use what kinds of test for this crosstab.
    Positive Negative
    4 17
    6 20
    0 13

    Reply
  10. Dora Marques says

    August 5, 2014 at 8:36 am

    Hello Karen. Thank you for your usefull input. I have a crosstab of 4×2 with more than 20% of expected frequencies lower than 5 and I am currently using SPSS. I found on the internet that we can use Fisher’s exact test on crosstabs bigger than 2×2 on SPSS, as a Fisher-Freeman-Halton Exact Test. Is it the same as running the first test? Once again, thanks for your help.

    Reply
  11. Priya says

    July 16, 2014 at 1:34 pm

    Thanks, Karen! Great explanation. This helps a lot.

    I use STATA, which does to chi-squared for 2×2 tables, and also will provide expected cell frequencies so you can check your numbers.

    tab var1 var2, expected chi
    tab var1 var2, expected exact

    Reply
  12. Byron says

    July 25, 2013 at 11:03 am

    In many cases, Fisher’s exact test can be too conservative. The mid-p quasi-exact test or N-1 chi-square may be good alternatives.

    Reply
  13. D.a. says

    January 29, 2013 at 4:30 pm

    nice one.. this cleared my mind: observed versus expected..
    i experienced having 0 values as well but my expected is of course more than 5..

    Reply
    • Karen says

      January 29, 2013 at 5:11 pm

      Excellent. 🙂

      Reply
  14. maryam says

    August 8, 2009 at 3:45 pm

    thanks dear writer of the main text for introducing StatXAct and also Andreas for introducing R. Would somebody kindly tell me how can i access these softwares? by the way i have a 3×9 table, with two main variables and one variable as COUNT, i have to run Chi-square but several cells would contain zeros and i get a warning from SPSS and i’m afraid my results would not be true, what can i do if i dont get access to those mentioned softwares u introduced? i wonder of a great helpful hero would leave me a message on maryam_na_li@yahoo.com as within few days i’ve to submit my thesis and i’m still stuck with this data!!

    Reply
  15. Andreas says

    June 22, 2009 at 4:54 am

    Karen – Yes I believe so. Any 2-dimensional matrix will do – regardless of size.

    Try:

    v1 <- c(2,4,1,5,2,1,7,8,2)
    v2 <- c(2,3,6,1,2,5,1,7,4)
    v <- cbind(v1,v2)
    fisher.test(v)

    Sincerely

    Reply
    • admin says

      June 24, 2009 at 5:51 pm

      Thanks. I haven’t used R yet, but should probably start. I used to use SPlus, which I understand is the same or very similar, so I’m sure it wouldn’t be much of a stretch. But I find that most of my clients use either SPSS or SAS. I suspect R is going to infiltrate the market more and more, though.

      Reply
  16. andreas says

    June 19, 2009 at 1:06 pm

    Fisher exact was the reason I started learning R. R is free and the comand is simply fisher.test(name of contingency table)

    Reply
    • admin says

      June 21, 2009 at 9:46 pm

      Andreas–will R do a Fisher’s on any size table (within reason)?

      Karen

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

Primary Sidebar

This Month’s Statistically Speaking Live Training

  • Member Training: Analyzing Pre-Post Data

Upcoming Free Webinars

Poisson and Negative Binomial Regression Models for Count Data

Upcoming Workshops

  • Analyzing Count Data: Poisson, Negative Binomial, and Other Essential Models (Jul 2022)
  • Introduction to Generalized Linear Mixed Models (Jul 2022)

Copyright © 2008–2022 The Analysis Factor, LLC. All rights reserved.
877-272-8096   Contact Us

The Analysis Factor uses cookies to ensure that we give you the best experience of our website. If you continue we assume that you consent to receive cookies on all websites from The Analysis Factor.
Continue Privacy Policy
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT