Statistical Methods Atlas
Atlas › Test Association › Fisher's Exact Test

Fisher's Exact Test

Exact test of association for small contingency tables — the correct choice when chi-square's expected-count rule fails.

Test AssociationBivariate also known as: Fisher–Irwin test

✓ When to use

  • 2×2 tables with any expected cell count < 5 (or any observed zero).
  • Small pilot studies, rare events (e.g., serious incidents by shift type).
  • Whenever you want exact rather than asymptotic p-values for a 2×2 association.

✗ When NOT to use

  • Large tables with healthy counts — chi-square is standard and effect sizes are more conventional (extensions of Fisher to r×c exist but get computationally heavy).
  • Paired categorical data — McNemar's exact test.
  • You need covariate adjustment — exact logistic regression.

Data requirements

Dependent / outcome variableOne dichotomous variable.
Independent / grouping variableAnother dichotomous variable (classic 2×2 case).
DesignIndependent observations.
Sample size guidanceAny size — that is the point; it remains valid at n = 10.

Assumptions

Hypotheses

H₀ — No association between the two dichotomies (odds ratio = 1).
H₁ — An association exists (odds ratio ≠ 1).

The concept

Holding the row and column totals fixed, the number of ways to fill the table follows the hypergeometric distribution. Fisher's test sums the exact probabilities of the observed table and every table at least as extreme — no large-sample approximation is involved, which is why sparse cells cause no trouble.

Report the odds ratio with its exact CI as the effect size. For a 12-vs-2 events pattern the OR can be dramatic even when percentages look modest — ORs exaggerate relative to risk ratios when the outcome is common; interpret accordingly.

Worked example

Safety incidents in a plant: night shift 6 incidents among 20 workers, day shift 1 among 25. Expected counts are far below 5 — chi-square is invalid.

Result: Fisher's exact p = .034, OR = 10.3, 95% CI [1.1, 95.6] — night shift shows significantly higher incident odds, though the CI is wide.

How to run it

tab <- matrix(c(6, 14, 1, 24), nrow = 2, byrow = TRUE,
              dimnames = list(shift = c("Night","Day"),
                              incident = c("Yes","No")))
fisher.test(tab)     # exact p and OR with CI

Interpreting the output

APA-style reporting

Fisher's exact test indicated a significant association between shift and safety incidents, p = .034; the odds of an incident were higher on the night shift (30.0%) than the day shift (4.0%), OR = 10.3, 95% CI [1.1, 95.6].

Common mistakes

Related methods

Chi-Square Test of IndependenceAdequate expected countsBinary Logistic RegressionModel odds with covariates
← Chi-Square Test of IndependenceChi-Square Goodness-of-Fit Test →