# Should the chi squared independence test have minimum relative expected cell count?

I'm a high school maths teacher and I was helping a pupil who had collected data for her project. I summerise the information in the table below.

$\begin{array}{c|cc|c} & Y & not Y & \\\hline X &360 & 83& 443\\ not X &46 &19 &65\\\hline & 406& 102& 508 \end{array}$

I advised her to do a chi-squared test to test the dependency between the variables X and Y. The table of expected values looks like:

$\begin{array}{c|cc|c} & Y & not Y & \\\hline X &354 & 89& 443\\ not X &52 &13 &65\\\hline & 406& 102& 508 \end{array}$

Comparing these two tables, my first thoughts were that there would be no association. Yet the calculated p-value is 0.048 which seems really rather small and goes against my intuition. It seems the bottom right cell is the one that is causing the effect (I suppose 6 objects from 19 is a fair proportion). I wondered if I have missed an assumption, and searched online and found (wikipedia) that the expected cell count should be no smaller than say 5 or 10, that is absolute values, but there is no mention made of relative count, which seems to me to be the deciding factor here.

Further, I played with the numbers a bit and found that the p-value is very susceptible to a small change, for instance if we remove one object from the bottom right cell the p-value jumps to 0.079.

So my questions:

• Is there something wrong with this analysis?
• Should we conclude that there is an association (assuming 5% significance)?
• There is nothing wrong with your approach, the cells with small expecteds will dominate the total $\chi^2$. Dec 31, 2016 at 13:46
• Related to this I can say that in general with contingency tables we should note that the chi square test is an asymptotic result and sparse cells can be an issue as to how well the chi-square distribution approximates the true distribution under the null hypothesis. What constitutes sparse cells? If I recall correctly William Cochran had a rule of thumb for this. Dec 31, 2016 at 15:51
• Actually take a look at the CV thread titled "For chi-square on any 2 by X contingency table should no more than 20% of the cells be less than 5?" I provided the Cochran rule of thumb which applies to general R by C contingency tables. Take a look at it. The thread also includes valuable references given by other contributors. Dec 31, 2016 at 16:02
• With regard to the direct questions from the OP I agree with mdewey that the methodology is correct. Given what has been said about sparse cells. You may consider not taking the p-values too seriously regarding sensitivity to small changes in the table. Both p-values are close to 0.05. So is the change really meaningful? I think not. Dec 31, 2016 at 16:13