Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 221 1 ii Solution Created 2026-09-24 Updated 2026-09-25
For a two-by-two contingency table, Fisher's exact test conditions on both row totals and both column totals. Under the null of no association, the upper-left count then has the hypergeometric distributionwhere and are the first row and column totals. A one-sided p-value sums the appropriate hypergeometric tail; a common two-sided p-value sums the probabilities of all feasible tables no more likely under the null than the observed table. Because the conditional distribution is discrete, the p-value is super-uniform random variable rather than generally exactly uniform.