Fisher's Exact Test

Exact test for association in a 2×2 table via the hypergeometric distribution.

Statusvalidated
Version1.0.0
Minitab equivalentStat > Tables > Cross Tabulation and Chi-Square (Fisher's exact test)

Description

With fixed margins the top-left cell follows a hypergeometric distribution. One-sided p sums the observed and all more extreme tables; two-sided p sums all tables at most as likely as the observed one (relative tolerance 1e-7, as in R and Minitab). Probabilities are computed in log space, so tables with 10⁵ units stay stable.

Formulas

P(a)
Hypergeometric probability of the table
OR
Sample odds ratio (empty for b·c = 0)

Assumptions

  • Independent observations

Limitations

  • 2×2 tables only

References

  • Agresti, A. (2013), Categorical Data Analysis, 3rd ed., §3.5
  • Melzer, A. (2019), Six Sigma – Kompakt und praxisnah, §9.10