Fisher's exact test, named after Sir R.A. Fisher, is a statistical test used to examine if the proportions of data across two or more categorical variables are random. In simpler terms, it helps determine if there's an association between these categories or if what you're seeing is just chance.
Understanding Fisher's Exact Test
This test is particularly useful when you have a small sample size or when one or more cells in a contingency table have low expected counts, conditions where the chi-squared test may not be reliable. It works by computing the exact probability of observing the given data, assuming that there is no relationship between the categorical variables.
Key Features:
- Categorical Variables: Fisher's test deals with variables that are divided into categories, such as gender (male/female) or treatment type (A/B/C).
- Contingency Tables: The data is usually organized in a table where rows represent one variable and columns represent the other. Each cell in the table shows how many observations fall into a specific combination of the two categories.
- Exact Calculation: Unlike approximate tests, Fisher's test calculates the exact probability, which is vital when dealing with small samples where approximations may not hold true.
- Hypothesis Testing: This test helps in deciding between the null hypothesis (no association between variables) and the alternative hypothesis (association exists).
When to Use Fisher's Exact Test
- Small Sample Sizes: When the sample size is small, Fisher's test is more accurate than chi-squared.
- Low Expected Frequencies: If any cell in your contingency table has an expected frequency of less than 5, use Fisher's exact test.
Example Application
Let’s say we are looking at whether a new medication has an effect, considering that we have a small sample size:
Improved | Not Improved | Total | |
---|---|---|---|
Drug | 5 | 1 | 6 |
Placebo | 2 | 4 | 6 |
Total | 7 | 5 | 12 |
In this scenario, using Fisher’s exact test would be appropriate. It will help to calculate the probability of getting these results assuming the treatment has no effect.
How it Works
Fisher's test calculates all possible tables with the same row and column totals. It then sums the probabilities of all tables as extreme or more extreme than the observed table under the null hypothesis.
Steps Simplified:
- Organize Data: Create your contingency table.
- Calculate Probability: Determine the exact probability of observing the specific table and more extreme ones by using combinatorics.
- Interpret Results: Compare this p-value with a predetermined significance level (like 0.05). If the p-value is lower, the association between the categories is considered statistically significant.
Conclusion
In summary, the Fisher exact test is a valuable tool in statistics when analyzing contingency tables with small sample sizes or low expected counts. It gives an exact probability that can be used to evaluate whether the association between two or more categorical variables is likely to have occurred by chance. The test's accuracy makes it indispensable for these conditions.