close
close
test de fisher exact

test de fisher exact

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

The Fisher exact test is a statistical significance test used to determine if there's an association between two categorical variables. Unlike the chi-squared test, it's particularly useful when dealing with small sample sizes, specifically when the expected frequency in any cell of a contingency table is less than 5. This article will delve into the intricacies of the Fisher exact test, exploring its applications, interpretations, and limitations.

When to Use the Fisher Exact Test

The Fisher exact test shines when analyzing contingency tables (also known as cross-tabulations). These tables display the frequencies of observations for two categorical variables. The test assesses whether the observed relationship between the variables is statistically significant or merely due to chance. Its strength lies in its accuracy with small sample sizes, a situation where the chi-squared test can become unreliable.

Key Scenarios:

  • Small Sample Sizes: If your contingency table has cells with expected frequencies less than 5, the Fisher exact test provides a more accurate p-value than the chi-squared test.
  • Contingency Tables (2x2): While it can technically be applied to larger tables, the Fisher exact test is most commonly used with 2x2 contingency tables. This represents the simplest case of comparing two categorical variables, each with two levels.
  • Determining Association: The primary goal is to determine if a statistically significant association exists between the two categorical variables.

How the Fisher Exact Test Works

The Fisher exact test calculates the probability of observing the specific contingency table data, or data more extreme, assuming that there's no association between the two variables. This probability is the p-value. A small p-value (typically less than 0.05) indicates strong evidence against the null hypothesis—the hypothesis that there's no association.

The test operates under the following assumptions:

  • Categorical Data: Both variables must be categorical.
  • Fixed Margins: The row and column totals are considered fixed. This means the sample sizes for each category of the variables are predetermined.
  • Independence: Observations within the table are independent of each other.

Performing the Fisher Exact Test

Several statistical software packages can perform the Fisher exact test. These include:

  • R: The fisher.test() function is readily available.
  • Python (with SciPy): The scipy.stats.fisher_exact() function provides the test.
  • SAS: PROC FREQ can perform the test.
  • SPSS: The Crosstabs procedure can include the Fisher exact test.

These packages will provide the p-value, allowing you to assess statistical significance.

Interpreting the Results

The output of the Fisher exact test primarily provides a p-value. This p-value represents the probability of observing the obtained results (or more extreme results) if there were no association between the variables.

  • p-value < 0.05 (or your chosen significance level): Reject the null hypothesis. There is statistically significant evidence of an association between the two categorical variables.
  • p-value ≥ 0.05: Fail to reject the null hypothesis. There is not enough evidence to conclude a statistically significant association.

Remember that statistical significance doesn't necessarily imply practical significance. The size of the association (effect size) should also be considered.

Limitations of the Fisher Exact Test

While powerful for small samples, the Fisher exact test has limitations:

  • Computational Intensity: For larger tables, the calculations can become computationally intensive.
  • Overly Conservative: Some argue that the test can be overly conservative, meaning it might fail to detect a real association in some cases.

Example: A 2x2 Contingency Table

Let's consider a simple example:

Treatment A Treatment B Total
Improved 5 2 7
Not Improved 2 8 10
Total 7 10 17

Using the Fisher exact test on this data would determine if there's a significant association between the type of treatment and improvement.

Conclusion

The Fisher exact test provides a valuable tool for analyzing the relationship between two categorical variables, especially when dealing with small sample sizes. Its accurate p-value calculation makes it superior to the chi-squared test in these scenarios. Understanding its application, interpretation, and limitations is crucial for proper use in statistical analysis. Remember to always consider both statistical and practical significance when drawing conclusions.

Related Posts


Popular Posts