StatsToTable

Chi-square or Fisher's exact test?

The rule "use Fisher when expected counts are below five" is repeated everywhere and explained almost nowhere. It is not a folk convention — it is the point at which the chi-square approximation stops behaving, and the size of the error is easy to show.

The short answer

2×2 table with any expected count below five: Fisher's exact test. Expected counts all five or more: Pearson chi-square. Larger than 2×2: chi-square, but check the expected counts and report the smallest one.

The same table, two answers

A small two-arm study with a yes/no outcome. Ten participants in the first arm, seventeen in the second.

RespondedDid notTotal
Arm 12810
Arm 210717
Total121527

The smallest expected count is 4.44 — just under the threshold. Both tests are legitimate to run; they answer the same question in different ways.

TestResultVerdict at α = .05
Pearson chi-squareχ²(1) = 3.86, p = .050Sitting exactly on the line
Fisher's exact testp = .107Not significant

One test says the result is significant to three decimal places. The other says it is twice as far from significant as the conventional threshold allows. A paper reporting the first and not mentioning the second has drawn a conclusion the data do not support.

Why the approximation fails

The chi-square statistic is compared against a continuous distribution — the chi-square distribution — but the data are counts, which are discrete. The approximation works when the counts are large enough that the discrete steps are small relative to the spread.

With small expected counts the steps are large, and the tail of the distribution is where it hurts: the computed statistic lands beyond the critical value more often than it should, so the p value comes out too small. The test becomes liberal — it reports effects that are not there.

Fisher's exact test avoids the approximation entirely by computing the probability of the observed table, and of every table at least as extreme, directly from the hypergeometric distribution.

How to check the expected counts

For each cell: expected = (row total × column total) ÷ grand total. In the table above, the top-left cell has an expected count of (10 × 12) ÷ 27 = 4.44. The other three follow from the margins.

You do not need to compute this by hand — every chi-square result should report the smallest expected count alongside the p value, because that number is what determines whether the p value can be trusted.

Larger than 2×2

Fisher's exact test extends in principle to any table size, but the computation grows quickly and the usual implementations concentrate on 2×2. For a 3×2 table with thin cells, the defensible options are:

What is not defensible is running chi-square on a table with expected counts of one and reporting the p value without comment.

What to report

For chi-square: χ²(1) = 3.86, p = .050, with the sample size and the smallest expected count. For Fisher: p = .107 and the same table. In both cases, an effect size helps — Cramér's V for chi-square, and the odds ratio with its interval for a 2×2.

And when the two disagree, say so. "Pearson's chi-square reached the conventional threshold (p = .050) while Fisher's exact test did not (p = .107); given the small expected counts we treat the result as inconclusive" is a sentence that will survive review. The same analysis with only the first number in it will not.

Frequently asked

When should I use Fisher instead of chi-square?

In a 2×2 table, when any expected count is below about five. Below that, chi-square p values run too small.

How much difference does it make?

In the example above, p = .050 versus p = .107. A factor of two, on either side of the decision line.

Can I use Fisher for larger tables?

In principle yes; in practice the usual implementations focus on 2×2. For larger tables with thin cells, collapse categories or use a simulation-based exact test.

Do I need Yates' correction?

It is a conservative patch for 2×2 tables. If you are using Fisher's exact test, it is unnecessary; with large samples it makes little difference either way.

Which test should I use? · Parametric or not? · Method notes · Verification record