You should not execute chi-square test but Fisher exact probability test when gland total of cross tabulation was smaller than 20 or one or greater than one cells had smaller than 5 expected value. In this article, I would like to describe how to solve expected value. Expected value is calculated with marginal total.
We have cross tabulation below;
TRUE | FALSE | Marginal total | |
POSITIVE | a | b | a + b |
NEGATIVE | c | d | c + d |
Marginal total | a + c | b + d | N |
Expected value of each cells is below;
TRUE | FALSE | Marginal total | |
POSITIVE | (a + b)*(a + c)/N | (a + b)*(b + d)/N | a + b |
NEGATIVE | (c + d)*(a + c)/N | (c + d)*(b + d)/N | c + d |
Marginal total | a + c | b + d | N |