0
$\begingroup$

Let's say I have a $2\times2$ table where all of the expected values are at least one, and no more than 20 percent of the counts are less than 5 (hence, Cochran's rules are not violated). In such a situation is there a difference between using the Fisher's exact test or the chi-squared test to determine independence or homogeneity?

 chisq.test(data.frame(x=c(20,26), y=c(14,40)))
fisher.test(data.frame(x=c(20,26), y=c(14,40)))

I get a p-value of 0.09 and 0.10 for the chi-squared test and Fisher's exact test respectively.

$\endgroup$
4
$\begingroup$

Fisher's test conditions on the marginal totals being fixed at the observed values. The chi square test does not. Under the assumption of fixed marginals Fisher's test is exact. The chi square test is still an asymptotic approximation even under your case where the Cochran rules hold.

$\endgroup$
  • $\begingroup$ I understand that marginal totals are fixed in Fisher's exact test, and we are looking at tables that are as extreme or more extreme than the given table. But how come marginal totals are not fixed in the chi-squared situation where we get the expected table from (row total of observed*column total of observed)/grand total observed. I thought these observed row and column totals are fixed as well $\endgroup$ – Nathgun Nov 20 '17 at 19:57
  • 1
    $\begingroup$ With Fisher's test the multinomial distribution depends on the marginal totals. Summing (obs-exp)$^2$/exp does not lead to an asymptotic distribution that depends on the marginal totals. $\endgroup$ – Michael Chernick Nov 20 '17 at 20:04
  • 1
    $\begingroup$ I meant hypergeometric distribution in the case of Fisher's test. $\endgroup$ – Michael Chernick Nov 20 '17 at 20:13
  • $\begingroup$ Some people do argue for conditioning on the margins even when your margins are not fixed. (That's a debate that has gone on for what must be more than 80 years now.) $\endgroup$ – Glen_b Nov 20 '17 at 22:54
  • $\begingroup$ @Glen_b I understand that for at least 80 years there has been controversy about conditioning on the fixed marginals with Fisher's exact test but what do you mean by conditioning on marginals that are not fixed? $\endgroup$ – Michael Chernick Nov 20 '17 at 23:00

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.