Overview
Fisher's exact test checks whether two yes/no variables are related, using a 2 × 2 table. Unlike the chi-square test, it's exact, so it works for small counts.
Enter the four cells: A and B in the first row, C and D in the second.
Worked examples
| Inputs | Result |
|---|---|
| Cell A12Cell B5Cell C3Cell D14 | Observed-table probability: 0.00227Two-tailed Fisher p-value: 0.00490Odds ratio: 11.2 |
Show 2 more examples
| Cell A3Cell B1Cell C1Cell D3 | Observed-table probability: 0.23Two-tailed Fisher p-value: 0.49Odds ratio: 9 |
| Cell A20Cell B20Cell C18Cell D22 | Observed-table probability: 0.16Two-tailed Fisher p-value: 0.82Odds ratio: 1.22 |
Observed-table probability by cell a
With the calculator's starting values, the observed-table probability is 0.00227. The table shows how it changes with the cell a.
| Cell A | Observed-table probability |
|---|---|
| 6 | 0.05 |
| 8 | 0.02 |
| 10 | 0.00588 |
| 12starting value | 0.00227 |
| 14 | 0.000920 |
| 16 | 0.000391 |
| 18 | 0.000174 |
Other inputs: Cell B: 5 · Cell C: 3 · Cell D: 14. Change them in the calculator above for your own numbers.
How it works
With the row and column totals fixed, it lists every possible table and its hypergeometric probability. The two-tailed p-value adds the probabilities of all tables as unlikely as the one observed, or more so. The odds ratio, (A × D) ÷ (B × C), shows the direction and size of the link.
The formula
Practical tips
- 12, 5, 3 and 14 give a two-tailed p of about 0.0049 and an odds ratio of 11.2.
- Use it instead of chi-square when any expected count is below 5.
- An odds ratio of 1 means no association.
Frequently asked questions
When should I use Fisher's test?
For 2 × 2 tables, especially with small counts.
What do the cells mean?
Rows are one variable, such as treatment or control, and columns the other, such as improved or not.
Why is it called exact?
It calculates the probability directly rather than approximating with a distribution.