close
close
test de fisher exact

test de fisher exact

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

The Fisher exact test is a statistical significance test used to analyze the association between two categorical variables in a contingency table, particularly when sample sizes are small. Unlike chi-squared tests, which rely on asymptotic approximations, the Fisher exact test calculates the exact probability of observing the data (or more extreme data) given the null hypothesis of no association. This makes it robust for small samples where the chi-squared test may not be reliable.

When to Use the Fisher Exact Test

The Fisher exact test is most appropriate when:

  • Sample size is small: The test is especially useful when expected cell counts in a 2x2 contingency table are less than 5. This is where the chi-squared test's assumptions are often violated.
  • Categorical data: Both variables being compared must be categorical (nominal or ordinal).
  • 2x2 contingency table: The data should be arranged in a 2x2 table, representing two categories for each variable.

How the Fisher Exact Test Works

The test works by calculating the probability of observing the specific arrangement of data in the contingency table, assuming there's no association between the variables. It considers all possible tables with the same row and column totals, determining the probability of each. The p-value represents the probability of observing the data or more extreme data, given the null hypothesis.

Example: Testing for Association Between Drug and Side Effect

Let's say we're investigating a potential link between a new drug and a specific side effect. We have a small clinical trial with the following results:

Side Effect No Side Effect Total
Drug 3 7 10
Placebo 1 9 10
Total 4 16 20

Using the Fisher exact test, we calculate the probability of obtaining this table, or a more extreme table, if there’s no relationship between the drug and the side effect. A low p-value (typically less than 0.05) would suggest a statistically significant association. Software packages like R, SPSS, or online calculators can easily compute this probability.

Interpreting the Results

The p-value from the Fisher exact test provides evidence against the null hypothesis.

  • Low p-value (e.g., < 0.05): Reject the null hypothesis. There is statistically significant evidence of an association between the two categorical variables.
  • High p-value (e.g., > 0.05): Fail to reject the null hypothesis. There is not enough statistical evidence to conclude an association between the two variables.

Important Note: Statistical significance does not necessarily imply practical significance. Even with a statistically significant result, the magnitude of the association needs to be considered in the context of the problem.

Fisher Exact Test vs. Chi-Squared Test

While both tests assess the association between categorical variables, the Fisher exact test is preferable for small sample sizes. The chi-squared test relies on asymptotic approximations, which may be inaccurate with small expected cell counts. The Fisher exact test provides a more accurate calculation in these situations. However, for larger samples, the chi-squared test is often more efficient computationally.

Software for Performing the Fisher Exact Test

Most statistical software packages (R, SPSS, SAS, Python's scipy.stats) readily offer functions for performing the Fisher exact test. Online calculators are also available for simpler analyses.

Conclusion

The Fisher exact test provides a robust method for assessing the association between categorical variables, particularly when dealing with small sample sizes. Understanding when and how to apply this test is crucial for accurate interpretation of results in many research areas. Remember to always consider both statistical and practical significance when interpreting your findings.

Related Posts