A fisher exact test calculator is a statistical tool used to analyze contingency tables, particularly when sample sizes are small. Developed by R.A. Fisher, this test is especially useful when the chi-square test assumptions are not met.
The calculator is particularly valuable in fields such as biology, medicine, and social sciences, where researchers often work with small sample sizes or rare events. It provides a more accurate p-value than the chi-square test when expected frequencies are low, making it a go-to method for analyzing 2×2 contingency tables in such scenarios.
Fisher Exact Test Calculation Chart
Observed Data | Column 1 | Column 2 | Row Total |
---|---|---|---|
Row 1 | a | b | a + b |
Row 2 | c | d | c + d |
Column Total | a + c | b + d | N |
Where:
- a, b, c, d are the observed frequencies
- N is the total sample size (a + b + c + d)
Calculation Step | Formula / Description |
---|---|
1. Calculate p | p = (a+b)!(c+d)!(a+c)!(b+d)! / (N!a!b!c!d!) |
2. Sum p-values | Sum p for all tables with fixed marginals and p ≤ observed p |
3. Interpret | If sum ≤ significance level, reject null hypothesis |
Fisher Exact Test Formula
p = (a+b)!(c+d)!(a+c)!(b+d)! / (N!a!b!c!d!)
Where:
- a, b, c, d are the cell frequencies
- N is the total sample size
- ! denotes factorial
Treatment | Recovered | Not Recovered | Total |
---|---|---|---|
Drug | 8 (a) | 2 (b) | 10 |
Placebo | 3 (c) | 7 (d) | 10 |
Total | 11 | 9 | 20 |
Applying the formula: p = (10!10!11!9!) / (20!8!2!3!7!)
The Fisher Exact Test calculates the probability of obtaining the observed (or more extreme) frequencies in a 2×2 contingency table, given the row and column totals.
How do you calculate Fisher’s exact test?
Calculating Fisher’s exact test involves several steps:
Arrange the data in a 2×2 contingency table.
Calculate the p-value using the formula mentioned earlier.
Sum the p-values for all possible tables with the same marginal totals that are as extreme or more extreme than the observed table.
Compare the sum to the chosen significance level.
Treatment | Recovered | Not Recovered |
---|---|---|
Drug | 8 | 2 |
Placebo | 3 | 7 |
Step 1: The data is already in a 2×2 table.
Step 2: Calculate p for this table using the formula (result from previous calculation).
Step 3: Calculate p for all possible more extreme tables with the same marginals. In this case, there’s only one more extreme table:
Treatment | Recovered | Not Recovered |
---|---|---|
Drug | 9 | 1 |
Placebo | 2 | 8 |
Calculate p for this table and add it to the p from step 2.
Step 4: If the sum of p-values is less than the chosen significance level (e.g., 0.05), we reject the null hypothesis of no association between the treatment and recovery.