Skip to content
Home » Blog » Fisher’s Exact Test: Formula, Calculator & R Guide

Fisher’s Exact Test: Formula, Calculator & R Guide

Fisher’s Exact Test is a statistical test used to determine whether there is a significant association between two categorical variables, especially when sample sizes are small. It is commonly applied in medical research, social sciences, biology, and academic studies where the Chi-square test may not provide reliable results due to low expected frequencies.

Researchers often use fisher exact test as an alternative to the Chi-square test when analyzing a 2×2 contingency table with small sample data. Unlike approximate statistical methods, Fisher’s Exact Test calculates the exact probability of observing the given data, making it highly accurate for small datasets.

What Is Fisher's Exact Test?

It is a statistical significance test that evaluates whether two categorical variables are independent or related. It was developed by British statistician Ronald Fisher and is based on calculating the exact probability of a particular distribution of data.

The test is mainly used with a contingency table containing two rows and two columns. For example, researchers may use it to determine whether there is a relationship between:

  • Treatment and recovery outcomes
  • Gender and product preference
  • Disease status and exposure factors
  • Survey responses and demographic groups

The test produces a p-value, which helps researchers decide whether the observed relationship is statistically significant.

If the p-value is less than the chosen significance level (commonly 0.05), the null hypothesis is rejected, indicating that the variables may have a significant association.

When Should You Use Fisher's Exact Test?

Researchers commonly choose this test in situations where the Chi-square test assumptions are not satisfied.

You should use Fisher Exact Test when:

  • The sample size is small
  • Expected cell frequencies are low
  • Data is categorical
  • The contingency table is 2×2
  • Some table cells contain fewer than five observations

For larger samples, the Chi-square test is usually preferred because it is faster and easier to calculate. However, Fisher’s Exact Test remains the preferred option when accuracy is more important than computational speed.

Fisher's Exact Test vs Chi-Square Test

Both Fisher Exact Test and Chi-square tests analyze relationships between categorical variables, but they differ in their calculation methods.

The Chi-square test uses an approximation to estimate probability, while Fisher’s Exact Test calculates the exact probability based on the observed frequencies.

Fisher’s Exact TestChi-Square Test
Best for small samplesBest for larger samples
Calculates exact probabilityUses statistical approximation
Suitable for 2×2 tablesWorks with larger contingency tables
More accurate with low frequenciesFaster for large datasets

In research studies with limited participants, Fisher’s Exact Test is often considered more reliable.

Fisher Exact Test Calculator

A fisher exact test calculator helps researchers quickly calculate the p-value without manually applying complex formulas.

To use a Fisher Exact Test calculator, you usually need a 2×2 contingency table containing four values:

 Outcome 1Outcome 2
Group 1AB
Group 2CD

After entering the values, the calculator determines:

  • Fisher exact p-value
  • Statistical significance
  • Relationship between variables

Many researchers use online calculators during preliminary analysis, but final research results should always be verified using statistical software such as R, SPSS, or Python.

How to Interpret Fisher's Exact Test Results

The main result of Fisher’s Exact Test is the p-value.

If p-value < 0.05

The result is statistically significant, meaning there is evidence of an association between the variables.

Example:

A researcher studies whether a new treatment improves recovery rates. If Fisher’s Exact Test produces a p-value of 0.02, the association between treatment and recovery is statistically significant.

If p-value > 0.05

The result is not statistically significant, meaning there is insufficient evidence to prove a relationship between variables.

Researchers should also report the odds ratio and confidence intervals when presenting Fisher’s Exact Test results.

Fisher Exact Test in R

The fisher exact test in R is commonly performed using the built-in fisher.test() function. R is widely used by researchers for statistical analysis because it provides accurate and reproducible results.

Example: Fisher Exact Test in R

Create a contingency table:

data <- matrix(c(12, 5, 8, 15), nrow = 2)
fisher.test(data)

The output provides:

  • p-value
  • Odds ratio
  • Confidence interval

The interpretation is similar to other statistical software. If the p-value is below 0.05, researchers conclude that there is a statistically significant relationship between the two categorical variables.

Advantages of Fisher's Exact Test

Accurate Results for Small Samples

Unlike approximate tests, it provides exact probability calculations, making it reliable for small datasets.

Easy Interpretation

The test provides a simple p-value that researchers can use for hypothesis testing.

Useful Across Research Fields

It is widely used in:

  • Medical studies
  • Clinical trials
  • Psychology research
  • Social sciences
  • Biology experiments
  • Academic dissertations

Limitations of Fisher Exact Test

Although Fisher’s Exact Test is powerful, it has some limitations.

  • It is mainly designed for small contingency tables.
  • Calculations become more complex with larger datasets.
  • It may require statistical software for advanced analysis.
  • It does not measure the strength of association alone.

For complete analysis, researchers often combine Fisher’s Exact Test with effect size measurements and confidence intervals.

How to Report Fisher Exact Test Results in Research Papers

When reporting results, researchers should include:

  • Name of the statistical test
  • Variables analyzed
  • Sample size
  • P-value
  • Odds ratio (if applicable)

Example:

“Fisher’s Exact Test showed a significant association between treatment group and recovery status (p = 0.03).”

Clear reporting helps readers understand the statistical findings and improves research transparency.

FAQs

What is Fisher's Exact Test used for?

It is used to determine whether there is a significant relationship between two categorical variables, especially when sample sizes are small.

You should use this Test when expected frequencies are low or when your sample size is too small for reliable Chi-square results.

The traditional Fisher Exact Test is mainly used for 2×2 contingency tables, but extensions exist for larger tables.

A significant result means there is evidence of an association between the variables being studied.

You can calculate Fisher Exact Test in R using the fisher.test() function with a contingency table as input.

Leave a Reply

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

Index