We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.

What is Fisher's Exact Test?

Niki Acker
Updated May 21, 2024
Our promise to you
All The Science is dedicated to creating trustworthy, high-quality content that always prioritizes transparency, integrity, and inclusivity above all else. Our ensure that our content creation and review process includes rigorous fact-checking, evidence-based, and continual updates to ensure accuracy and reliability.

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

Editorial Standards

At All The Science, we are committed to creating content that you can trust. Our editorial process is designed to ensure that every piece of content we publish is accurate, reliable, and informative.

Our team of experienced writers and editors follows a strict set of guidelines to ensure the highest quality content. We conduct thorough research, fact-check all information, and rely on credible sources to back up our claims. Our content is reviewed by subject-matter experts to ensure accuracy and clarity.

We believe in transparency and maintain editorial independence from our advertisers. Our team does not receive direct compensation from advertisers, allowing us to create unbiased content that prioritizes your interests.

Fisher's exact test is a statistical significance test used for small sample sizes. It is one of a number of tests used to analyze contingency tables, which display the interaction of two or more variables. This test was invented by English scientist Ronald Fisher, and it is called exact because it calculates statistical significance exactly, rather than by using an approximation.

To understand how Fisher's exact test works, it is essential to understand what a contingency table is and how it is used. In the simplest example, there are only two variables to be compared in a contingency table. Usually, these are categorical variables. As an example, imagine you are conducting a study on whether gender correlates with owning pets. There are two categorical variables in this study: gender, either male or female, and pet ownership.

A contingency table is set up with one variable on the top, and the other on the left side, so that there is a box for each combination of variables. Totals are given on the bottom and at the far right. Here is what a contingency table would look like for the example study, assuming a survey of 24 individuals:

Pet Owner Not a Pet Owner Total
Male 1 9 10
Female 11 3 14
Total 12 12 24

Fisher's exact test calculates deviance from the null hypothesis, which holds that there is no bias in the data, or that the two categorical variables have no correlation with each other. In the case of the present example, the null hypothesis is that men and women are equally likely to own pets. Fisher's exact test was designed for contingency tables with a small sample size, or large discrepancies between cell numbers, like the one shown above. For contingency tables with a large sample size and well-balanced numbers in each cell of the table, Fisher's exact test is not accurate, and the chi-square test is preferred.

In analyzing the data in the table above, Fisher's exact test serves to determine the probability that pet-ownership is unevenly distributed among men and women in the sample. We know that ten of the 24 people surveyed own pets, and that 12 of the 24 are female. The probability that ten people chosen at random from the sample will consist of nine women and one man will suggest the statistical significance of the distribution of pet owners in the sample.

Probability is denoted by the letter p. Fisher's exact test determines the p-value for the above data by multiplying the factorials of each marginal total -- in the table above, 10, 14, 12, and 12 -- and dividing the result by the product of the factorials of each cell number and of the grand total. A factorial is the product of all positive integers less than or equal to a given number. 10!, pronounced "ten factorial," is therefore equal to 10X9X8X7X6X5X4X3X2X1, or 3,628,800.

For the table above, then, p= (10!)(14!)(12!)(12!)/(1!)(9!)(11!)(3!)(24!). Using a calculator, one can determine that the probability of getting the numbers in the table above is under 2%, well below chance, if the null hypothesis is true. Therefore, it is very unlikely that there is no contingency, or significant relationship, between gender and pet-ownership in the study sample.

All The Science is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Niki Acker
By Niki Acker
"In addition to her role as a All The Science editor, Niki Foster is passionate about educating herself on a wide range of interesting and unusual topics to gather ideas for her own articles. A graduate of UCLA with a double major in Linguistics and Anthropology, Niki's diverse academic background and curiosity make her well-suited to create engaging content for WiseGeekreaders. "
Discussion Comments
By Sporkasia — On Jan 31, 2014

Animandel - Fisher's exact test is fun to examine and carry out, but with such a small sample as mentioned in the article, the accuracy of your results is anyone's guess. You should try using the test in areas where the sample size calculate is a good percentage of the total group.

For example, instead of trying to conclude what percentage of men and women where blue pants, narrow the field to men and women at your work place. This way, you have a better chance of getting usable results.

By Animandel — On Jan 30, 2014

Before reading this article I had heard of Fisher's exact test, but I did not know what it was or how it worked. After reading this article, I am anxious to use it to see how it works with some common statistical equations. However, I am unsure of how to calculate a sample size that would give a good, relatively accurate reading.

Niki Acker
Niki Acker
"In addition to her role as a All The Science editor, Niki Foster is passionate about educating herself on a wide range...
Learn more
All The Science, in your inbox

Our latest articles, guides, and more, delivered daily.

All The Science, in your inbox

Our latest articles, guides, and more, delivered daily.