Course contentsShow
← Data Science
Lesson 433 of 2,14511. Hypothesis Tests for Proportions and CategoriesFree lesson

Conducting Fisher's Exact Test

Apply Fisher's Exact Test to 2×2 tables and interpret one-tailed and two-tailed p-values.

Conducting Fisher's Exact Test

What you'll learn: How to apply Fisher's Exact Test to small 2×2 contingency tables and interpret the resulting p-values.

Why Conduct Fisher's Exact Test?

You learned the logic behind Fisher's Exact Test in the previous lesson—now it's time to actually carry it out. This test is used when your 2×2 contingency table has small expected frequencies (typically when any expected count is below 5), making the Chi-Squared test unreliable.

Setting Up Your Test

Start with your 2×2 contingency table (two categories for each of two variables). For example:

Treatment SuccessTreatment Failure
Drug A82
Drug B19

Next, define your hypotheses:

  • Null (H₀): The two variables are independent (no association)
  • Alternative (Hₐ): The variables are associated

One-Tailed vs Two-Tailed

  • Two-tailed test: Tests if there's any association in either direction. The p-value sums probabilities of all tables as extreme or more extreme than observed (in both directions).
  • One-tailed test: Tests if one specific group has higher success than expected. The p-value includes only tables showing that directional extreme.

Use two-tailed unless you had a specific directional hypothesis before collecting data.

Interpreting the P-Value

Fisher's Exact Test calculates the exact probability of observing your table (and more extreme ones) under independence. If p < α (usually 0.05), reject the null hypothesis—conclude there's evidence of association between the variables.

Key Takeaway: Fisher's Exact Test applies to small 2×2 tables by computing exact probabilities; use two-tailed p-values unless you had a pre-specified directional hypothesis.