close
close
test de fisher exact

test de fisher exact

3 min read 19-03-2025
test de fisher exact

The Fisher exact test is a statistical significance test used to determine if there is an association between two categorical variables. Unlike some other tests, it's particularly useful when dealing with small sample sizes or when the expected frequencies in a contingency table are low, situations where the chi-squared test might be unreliable. This article will delve into the mechanics of the Fisher exact test, its applications, and its interpretations.

What is the Fisher Exact Test?

The Fisher exact test, named after its creator, Sir Ronald Fisher, is a non-parametric test. This means it doesn't assume any underlying distribution for the data. It's primarily used to analyze 2x2 contingency tables—tables showing the frequencies of two categorical variables with two levels each. The test calculates the exact probability of observing the obtained data (or more extreme data) under the null hypothesis of no association between the variables.

Imagine you're studying the relationship between smoking and lung cancer. Your contingency table might look like this:

Lung Cancer No Lung Cancer Total
Smoker a b a+b
Non-Smoker c d c+d
Total a+c b+d N

The Fisher exact test calculates the probability of obtaining these specific counts (a, b, c, d) given that there is no relationship between smoking and lung cancer.

When to Use the Fisher Exact Test

The Fisher exact test is ideal in several situations:

  • Small sample sizes: When the expected frequencies in the contingency table are low (often below 5 in one or more cells). The chi-squared test, a commonly used alternative, can be inaccurate with small samples.

  • Contingency tables with 2x2 dimensions: The test is specifically designed for this type of table.

  • Precise probability calculations: The Fisher exact test provides the exact probability, unlike the chi-squared test, which offers an approximation. This makes it suitable for situations where accuracy is crucial.

How the Fisher Exact Test Works

The test works by calculating the probability of observing the specific arrangement of counts in the contingency table, or a more extreme arrangement, given the marginal totals (row and column sums). This probability is computed using the hypergeometric distribution. The smaller this probability (the p-value), the stronger the evidence against the null hypothesis (no association).

Calculating the p-value

Calculating the p-value manually can be complex, involving factorials and combinations. Fortunately, statistical software packages (like R, SPSS, SAS, and Python's SciPy library) readily compute the p-value. You simply input your contingency table data, and the software performs the calculations.

Interpreting the Results

The p-value from the Fisher exact test indicates the probability of observing the data (or more extreme data) if there is no relationship between the variables.

  • p-value ≤ α (significance level): You reject the null hypothesis. There's significant evidence of an association between the two categorical variables. A typical significance level is 0.05.

  • p-value > α: You fail to reject the null hypothesis. There's not enough evidence to conclude an association exists.

Example: A Practical Application

Let's say a researcher is studying the relationship between a new drug and patient recovery. A small clinical trial yields the following results:

Recovered Not Recovered Total
Drug 8 2 10
Placebo 3 7 10
Total 11 9 20

Using a statistical software package to perform the Fisher exact test would yield a p-value. If this p-value is less than 0.05, the researcher would conclude there's statistically significant evidence that the drug is associated with a higher recovery rate compared to the placebo.

Limitations of the Fisher Exact Test

While powerful, the Fisher exact test has some limitations:

  • Only for 2x2 tables: It's not applicable to larger contingency tables.
  • Can be conservative: In some cases, it might fail to detect a true association, especially with larger sample sizes.

Conclusion

The Fisher exact test is a valuable tool for analyzing the association between two categorical variables, especially when dealing with small sample sizes. Understanding its application and interpretation is crucial for researchers and data analysts working with categorical data. Remember to always consult statistical software for accurate p-value calculations and proper interpretation of the results within the context of your research question.

Related Posts


Latest Posts