Fisher's Exact Test#
Fisher's exact test is a statistical test for examining independence in a 2Γ2 contingency table. Unlike the chi-square test, it calculates the exact p-value and is therefore particularly suitable for small samples where the chi-square approximation is unreliable.
When to Use#
Use Fisher's exact test when you want to:
- Examine the association between two dichotomous variables
- You have a 2Γ2 contingency table
- The expected frequencies in one or more cells are less than 5
- The sample is small (typically )
- You need an exact p-value without approximation
Assumptions#
- 2Γ2 contingency table (two dichotomous variables)
- Independent observations
- Fixed marginal totals or random sampling
- Random assignment of observations
Formula#
The probability of a particular arrangement in the 2Γ2 table is calculated using the hypergeometric distribution:
for a table of the form:
| Column 1 | Column 2 | |
|---|---|---|
| Row 1 | a | b |
| Row 2 | c | d |
The p-value is the sum of all probabilities that are equal to or more extreme than the observed distribution.
Example#
Practical Example: Drug Side Effect
A small clinical trial examines whether a drug causes a particular side effect. 20 patients are studied:
| Side Effect | No Side Effect | Total | |
|---|---|---|---|
| Drug | 4 | 6 | 10 |
| Placebo | 1 | 9 | 10 |
| Total | 5 | 15 | 20 |
Since the expected frequency for "Placebo/Side Effect" is only , the chi-square test is unreliable. Fisher's exact test provides the exact p-value.
Effect Size#
The odds ratio (OR) as effect size:
| Interpretation | Odds Ratio |
|---|---|
| No effect | 1.0 |
| Small effect | 1.5 |
| Medium effect | 2.5 |
| Large effect | 4.3 |
Alternatively, Cramer's V or the phi coefficient can be used:
Further Reading
- Fisher, R. A. (1935). The Design of Experiments. Oliver and Boyd.
- Agresti, A. (2007). An Introduction to Categorical Data Analysis (2nd ed.). Wiley.