**Definition:**
The Fisher Exact Test is a statistical method used to analyze contingency tables, particularly when sample sizes are small. It is called an exact test, because it calculates the [[P-Value]] directly, without relying on asymptotic approximations. This is helpful when there is only a small sample size.
**Contingency Table:**
A contingency table represents the multivariate frequency distribution of two discrete variables. For the simplest case, this results in a $2 \times 2$ matrix.
| | Right-Handed | Left-Handed | Total |
| ------ | ------------ | ----------- | ----- |
| Male | $a$ | $b$ | $a+b$ |
| Female | $c$ | $d$ | $c+d$ |
| Total | $a+c$ | $b+d$ | $n$ |
**Hypotheses:**
- $H_0:$ There is no association between the two variables (they are [[Independence of Random Variables|independent]]).
- $H_A:$ There is association between the two variables (they are not independent).
**Assumptions of Fixed Margins:**
Before the experiment we assume the row and column totals (i.e. number of males and left-handed people) to be fixed. This allows us to model the problem with a [[Hypergeometric Distribution]].
$ P=\frac{\binom{a+b}{a}*\binom{c+d}{c}}{\binom{n}{a+c}} $
$P$ represents the probability of observing exactly this arrangement of the $2 \times 2$ table under $H_0$. To compute a p-value we sum up the $P$ from this and from all possible table settings that have the same margins and that are “more extreme” (configurations that provide stronger evidence against the null hypothesis).