Fisher Exact Test Calculator

A fisher exact test calculator is a statistical tool used to analyze contingency tables, particularly when sample sizes are small. Developed by R.A. Fisher, this test is especially useful when the chi-square test assumptions are not met.

The calculator is particularly valuable in fields such as biology, medicine, and social sciences, where researchers often work with small sample sizes or rare events. It provides a more accurate p-value than the chi-square test when expected frequencies are low, making it a go-to method for analyzing 2×2 contingency tables in such scenarios.

Fisher Exact Test Calculation Chart

Observed DataColumn 1Column 2Row Total
Row 1aba + b
Row 2cdc + d
Column Totala + cb + dN

Where:

  • a, b, c, d are the observed frequencies
  • N is the total sample size (a + b + c + d)
Calculation StepFormula / Description
1. Calculate pp = (a+b)!(c+d)!(a+c)!(b+d)! / (N!a!b!c!d!)
2. Sum p-valuesSum p for all tables with fixed marginals and p ≤ observed p
3. InterpretIf sum ≤ significance level, reject null hypothesis

Fisher Exact Test Formula

p = (a+b)!(c+d)!(a+c)!(b+d)! / (N!a!b!c!d!)

Where:

  • a, b, c, d are the cell frequencies
  • N is the total sample size
  • ! denotes factorial
TreatmentRecoveredNot RecoveredTotal
Drug8 (a)2 (b)10
Placebo3 (c)7 (d)10
Total11920
Applying the formula: p = (10!10!11!9!) / (20!8!2!3!7!)

The Fisher Exact Test calculates the probability of obtaining the observed (or more extreme) frequencies in a 2×2 contingency table, given the row and column totals.

How do you calculate Fisher’s exact test?

Calculating Fisher’s exact test involves several steps:

Arrange the data in a 2×2 contingency table.

Calculate the p-value using the formula mentioned earlier.

Sum the p-values for all possible tables with the same marginal totals that are as extreme or more extreme than the observed table.

Compare the sum to the chosen significance level.

TreatmentRecoveredNot Recovered
Drug82
Placebo37

Step 1: The data is already in a 2×2 table.

Step 2: Calculate p for this table using the formula (result from previous calculation).

Step 3: Calculate p for all possible more extreme tables with the same marginals. In this case, there’s only one more extreme table:

TreatmentRecoveredNot Recovered
Drug91
Placebo28

Calculate p for this table and add it to the p from step 2.

Step 4: If the sum of p-values is less than the chosen significance level (e.g., 0.05), we reject the null hypothesis of no association between the treatment and recovery.

Share your love

Leave a Reply

Your email address will not be published. Required fields are marked *