For example, i know a traditional table would be something like male / female and yes / no.

I have conducted a survey on opinions of animal research. One of my questions is "do you have ethical misgivings" which is a yes or no response. I would like to compare responses of six different job types, to see if there is a statistically significant difference among those job types as to whether they have ethical misgivings. Is this 6 x 2 permittable in a Chi squared test?

To take it further, say I again want to compare the same job categories with a nominal outcome with 4 levels (Likert scale), would a 6 x 4 table be permitted? I have a small sample size (n=81), and I have tried Ordinal Regression though fail the assumptions. This is a simple project and I would just like some basic comparisons. I am using SPSS.

Thanks so much

  • 1
    $\begingroup$ Actually, your example is a fairly trivial one as the sample size, number of factors and levels within factors is small. So, nothing to worry about there, unless there are structural zeros or small cell sizes in the tables. Bishop in her 1975 book, Discrete Multivariate Analysis, proposed an adjustment to chi-square when the sample sizes were quite large. More recently, David Dunson has written papers on tensor regression with massive numbers of categorical features (arxiv.org/abs/1509.06490). $\endgroup$ Jul 27 '17 at 13:37

There's no specific upper limit to size of table in a chi-squared test of independence or homogeneity of proportions. Theoretically a table may be as large as you like though software may impose restrictions on what size it will deal with (typically these limits would be very large though; it would be a surprise to see modern software fail to deal with a table with several million elements in it. As a test I just now tried a big one in R -- it managed a table with a hundred million cells just fine).

However, if many of the expected counts are low there can be a problem with the chi-squared approximation to the distribution of the statistic under the null hypothesis.

  • $\begingroup$ +1. One common rule of thumb is to have at least 5 expected entries in each cell. With $n=81$ and $6\times 4=24$ cells, we'd expect $81/24=3.4$ entries, so I'd be careful with the $\chi^2$ approximation here. However, the example is still small enough that one can approximate the $p$ value by simulations, e.g., using R's chisq.test function with simulate.p.value=TRUE. $\endgroup$ Jul 27 '17 at 12:42
  • 1
    $\begingroup$ @Stephan quotes the rule correctly. However, many have found that this rule is unnecessarily strict. The $\chi^2$ distribution often works well provided not too many of the cells have expectations less than $5$ (and watch out for cells with expectations of zero!). "Not too many" may be less than $25\%$ or so. I suspect that the larger the table gets, the more you can tolerate low-expectation cells for this analysis. At some point the whole exercise becomes pointless: with a huge table, the model grows too complicated and should be replaced (typically) by a mixed model. $\endgroup$
    – whuber
    Jul 27 '17 at 14:41
  • $\begingroup$ Where the expected counts don't vary much the number can often go quite a lot lower than 5 and still keep a reasonable approximation. If there's a lot of variation in expectation the approximation tends to be poorer. $\endgroup$
    – Glen_b
    Jul 27 '17 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.