# Fisher's exact test two sided confusion

Consider the guessing milk tea example

$$\begin{array}{c|c|c|} & \text{Guess Milk} & \text{Guess Tea} \\ \hline \text{Milk} & 3 & 1 \\ \hline \text{Tea} & 1 & 3 \\ \hline \end{array}$$

I want to test that $$H_0: \theta = 1$$ (independent) vs. $$H_a: \theta \neq 1$$ (associated)

The formula for $$P(n_{11} = t) = \frac{{n_{1+} \choose t} {n_{2+} \choose n_{+1}-t}}{{n \choose n_{+1}}}$$

It's fixed on $$n_{11}$$

The range is given by $$m_- = max(0, n_{11} - n_{22}) = max(0,0) = 0$$ and $$m_+ = min(n_{11}+n_{12}, n_{11}+n_{21}) = min(4,4) = 4$$.

$$0 \leq n_{11} \leq 4$$

This is what my notes did after that

$$P(n_{11} = 0) = 0.0143, P(n_{11} = 1) = 0.2285, P(n_{11} = 2) = 0.5143, P(n_{11} = 3) = 0.2285, P(n_{11} = 4) = 0.0143$$

Thus, the two sided p-value is $$P(n_{11} = 0) + P(n_{11} = 1) + P(n_{11} = 3) + P(n_{11} = 4) = 0.4857$$.

Why was $$P(n_{11} = 2)$$ excluded ?

• It is excluded since it is less extreme than the given data.
– NCh
Feb 21, 2020 at 3:24
• What does that mean? Feb 21, 2020 at 3:34
• en.wikipedia.org/wiki/Fisher%27s_exact_test : the variant $n_{11}=2=n_{12}$ is favorable to independence. You have $n_{11}=3, n_{12}=1$. The variant $n_{11}=4, n_{12}=0$ is more extreme. To the opposite direction, $n_{11}=0, n_{12}=4$ is more extreme and also $n_{11}=1, n_{12}=3$ is as extreme as the given one.
– NCh
Feb 21, 2020 at 4:34