Statistics Glossary → Fisher's exact test
Fisher's exact testconcept
A test of independence between two categorical variables in a contingency table that computes the exact probability of the observed table, or a more extreme one, with the row and column totals held fixed.
The chi-square test relies on a large-sample approximation and becomes unreliable when expected counts are small. Fisher's test needs no such approximation: with the row and column totals held fixed, the probability of every possible table under independence is computed exactly from the hypergeometric distribution. The p-value is the sum of the probabilities of all tables that are no more likely than the observed one. It is the classic test for 2 x 2 tables and can be extended to larger ones, though the computing load grows and an approximate p is often obtained by Monte Carlo simulation instead.
Fisher's test gives valid Type I error control in small samples but, because of its discreteness, it is conservative: the actual error rate is usually below α. The mid-p value reduces this conservatism. The word 'exact' in its name means that the probabilities are computed without approximation, not that the conclusion is certain. In large samples it gives almost the same result as the chi-square test.
An everyday example
Someone claims they can tell by taste whether milk was poured into the cup before or after the tea. They taste eight cups in random order, four with milk first and four with milk last, and identify all four 'milk first' cups correctly. Guessing at random, the chance of doing so would be 1/70 ≈ 0.014. Fisher's test performs exactly this calculation and shows that the claim is hard to explain by luck.
In MerQur
Fisher's Exact Test is an analysis in its own right. Crosstab gives the Fisher test alongside the Pearson and likelihood-ratio tests, and its 'Layer (control)' option reports the Fisher p for 2x2 tables in each layer. In MR x Categorical Crosstab, 'Additional tests: Fisher's exact test' runs the exact test for 2 x 2 tables and a Monte Carlo Fisher test for 2 x k tables; in MR x MR Crosstab it gives a two-sided Fisher p-value for each cell's 2 x 2 table.
Analyses where this concept appears
CrosstabMR × Categorical CrosstabMR × MR Crosstab
Related concepts
Exact test and exact p-valueUnconditional exact tests (Barnard, Boschloo)