Test independence in 2×2 contingency tables with exact p-values, suitable for small samples.
Enter counts for each cell:
Fisher's Exact Test is a statistical test used to determine whether two categorical variables are independent or associated. It's most valuable when analyzing 2×2 contingency tables with small sample sizes where the chi-square test might be unreliable. The test calculates the exact probability of observing the data, given that the null hypothesis of independence is true.
Unlike the chi-square test which relies on large-sample approximations, Fisher's Exact Test computes the precise p-value by considering all possible contingency tables with the same marginal totals (row and column sums). This makes it particularly valuable for analyzing small clinical trials, rare events, or any study with limited observations. The test measures association through the odds ratio, which quantifies how much more likely one outcome is compared to another.
Fisher's Exact Test is one-tailed by default (testing for a greater association), but most researchers report the two-tailed p-value which doubles the one-tailed value for a more conservative test of overall independence.
A researcher studies whether a new treatment is associated with symptom improvement in 16 patients:
Contingency Table:
• Odds ratio = (8 × 5) / (2 × 1) = 20
• Two-tailed p-value ≈ 0.0485
Result: The p-value of 0.0485 is less than 0.05, indicating a statistically significant association between treatment and symptom improvement. The odds ratio of 20 means patients receiving treatment had 20 times higher odds of improvement compared to control.
When should I use Fisher's Exact Test instead of chi-square?
Use Fisher's Exact Test when any cell has a count less than 5, or when the total sample size is less than 20. For larger samples with expected frequencies ≥ 5, chi-square is more efficient.
What does the odds ratio mean?
The odds ratio compares the odds of outcome A in Group 1 versus Group 2. An OR of 2 means Group 1 is twice as likely to have outcome A. An OR of 1 means no association.
What's the difference between one-tailed and two-tailed p-values?
One-tailed tests whether there's a specific direction of association; two-tailed tests only whether variables are associated. Two-tailed is more conservative and generally recommended.
What are marginal totals?
Marginal totals are the row sums and column sums of the contingency table. Fisher's Exact Test conditions on these fixed totals to generate all possible tables.
Can I use Fisher's Exact Test with larger samples?
Technically yes, but it's computationally expensive. For large samples, chi-square test is preferred as it's faster and results are nearly identical.
What does p-value < 0.05 mean?
It means if the variables were truly independent, there's less than 5% chance of observing this data or more extreme. We typically reject independence and conclude association.
How do I interpret an odds ratio of 1?
An odds ratio of 1 indicates no association - the odds of outcome A are identical in both groups. Values above 1 favor Group 1; values below 1 favor Group 2.
Does Fisher's Exact Test assume any distributions?
No, it's a non-parametric test making no assumptions about distribution. This makes it robust for categorical data from any population.
Related Tools