4
$\begingroup$

I have not been able to find an authoritative source on when it is inappropriate to use Fisher's Exact test in the context of cell counts. I know that it can be computationally intensive to use Fisher Exact test's if the cell counts are large, but if I am not concerned with computation time, is it still statistically valid to use Fisher Exact's test on a 2x2 contingency table with large cell counts?

Please let me know if I can clarify the question.

EDIT: Some links that imply there is an issue with large cell counts for Fisher's Exact test:

  1. https://graphpad.com/quickcalcs/contingency1/

    • This calculator from graphpad will not allow you to use Fisher's Exact test when cell counts are large --> it uses Chi Squared test instead.
  2. https://stackoverflow.com/questions/30472087/r-is-fishers-exact-test-with-large-numbers-still-accurate?rq=1

    • This thread where a comment states "Why on earth would you do a fisher's exact test for this? That test is better suited for small counts."

That's all I have for now.

$\endgroup$
  • 2
    $\begingroup$ There is no assumption of "only low counts" behind the Fisher exact test, so it is OK. $\endgroup$ – kjetil b halvorsen Sep 20 '16 at 20:57
  • $\begingroup$ That was what I thought. There are some strong opinions on this subject across the web, so I wanted to get some input. Thanks $\endgroup$ – Reilstein Sep 20 '16 at 21:15
  • 1
    $\begingroup$ could you give links to some of the strong opinions? That would give us an idea what the strong opinions are based on. Agree with @kjetilbhalvorsen that I know of no reason other than computational not to use FET w/ large cell counts (not getting into the argument about fixed vs variable marginal totals ...) I haven't checked it, but I generally suggest Agresti's Categorical Data Analysis as an authoritative reference on such questions. $\endgroup$ – Ben Bolker Sep 20 '16 at 21:41
  • $\begingroup$ Sure, let me see if I can go back and find them. $\endgroup$ – Reilstein Sep 20 '16 at 23:42
  • 1
    $\begingroup$ Your links suggest there is a computational issue (under- or overflow as well as time). It is still theoretically valid $\endgroup$ – Henry Sep 21 '16 at 1:26
3
$\begingroup$

Strictly speaking, Fisher's exact test computes the proportion of possible contingency tables (number of combinations of cell counts) conditional on the marginals that is as extreme or more extreme than your contingency table. When the counts are large, this leads to a combinatorial explosion. Computers really are pretty fast these days, but they can still be overwhelmed. Here is an example, coded in R:

fisher.test(matrix(c(19874393874932817,943850439754375437,
                     19743832745983274,981749374918734987), nrow=2))
# Error in fisher.test(matrix(c(19874393874932816, 943850439754375424, 19743832745983272,  : 
#   'x' has entries too large to be integer
chisq.test(matrix(c(19874393874932817,943850439754375437,
                    19743832745983274,981749374918734987), nrow=2))
#   Pearson's Chi-squared test with Yates' continuity correction
# 
# data:  matrix(c(19874393874932816, 943850439754375424, 
#                 19743832745983272, 981749374918734976), nrow = 2)
# X-squared = 2.0502e+13, df = 1, p-value < 2.2e-16

So there is nothing really invalid about using Fisher's exact test in these cases, it's just that the computations are intractable.

$\endgroup$
  • 1
    $\begingroup$ Meanwhile something like matrix(c(1987439, 943850, 2060383, 981749), nrow = 2) works with both tests, and the p-values of 0.05778 and 0.05783 are close $\endgroup$ – Henry Sep 21 '16 at 1:28

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.