# Fishers test - true probability

We suppose $ a_{11} = min \{ a_{kl}; k \in 1..numberOfRows, l \in 1.. numberOfColumns\}$$ P = \sum_{i=0}^{a_{11}} \frac{r_1! r_2! s_1! s_2!} { n! (a_{11}-i)! (a_{12}+1)! (a_{21}+i)! (a_{22}-i)!} $

**Questions is why P represents PROBABILITY that random variables A,B are independent?**

**We usually reject hypothesis that that A,B are independent if the P is smaller $ \alpha = 0.05$**

**Example**

Original table $ a_{11}$ represents that number of people injured on place A.

Injured | Survived | ||

A | 5 | 10 | 15 |

B | 2 | 38 | 40 |

7 | 48 | 55 |

Switched rows to get minimum at $ a_{11}$:

2 | 38 | 40 |

5 | 10 | 15 |

7 | 48 | 55 |

P0:

0 | 40 | 40 |

7 | 8 | 15 |

7 | 48 | 55 |

P1:

1 | 39 | 40 |

6 | 9 | 15 |

7 | 48 | 55 |

P2:

2 | 38 | 40 |

5 | 10 | 15 |

7 | 48 | 55 |

**Overall probability: $ P = P_0 + P_1 + P_2$**