Fisher's exact test
Fisher's exact test is utilized when there is a need for a chi-square test, but one or more than one row in your observation dataset have five or less values in terms of frequency. The basic assumption in a chi-square test is that the frequency of the values in the rows of the given dataset is five or more than five. Fisher's exact test does not need this assumption:
tabulate model fridge_type, exact
Here are the results of this query:
![](https://static.packt-cdn.com/products/9781782173175/graphics/B00646_04_15.jpg)
This outcome tells you that fridge_type
and model are not statistically related (that is p is equal to 0.652). Fisher's test computes the p-value directly. Here is the mathematical derivation of the fisher's test:
Look at the following assumed data of fridge sales:
![](https://static.packt-cdn.com/products/9781782173175/graphics/B00646_04_16.jpg)
Then, the probability and the p value is given by the following formula:
![](https://static.packt-cdn.com/products/9781782173175/graphics/B00646_04_17.jpg)