# Chi-squared test with 0 expected values

My contingency table:

         heterozygous homozygous.minor homozygous.major
observed    2                 0               3
expected    0                 0               5


The expected population is composed of only AA genotype, but in the observed population we observe 2 AB genotypes. To calculate the Chi-sq for this would I just ignore the two cases where the expected = 0? So I would do:

$(3-5)^2/5=0.8$

• If the expected is actually zero and the observed is not zero, the chi-square value would be infinity. This is as it should be: you're observing something that according to the model is impossible, so it should automatically reject. Perhaps you should say more about how the expected values were obtained. Nov 30, 2013 at 1:17
• Whether it would be infinity or 1.6 depends on whether the expected values are 0 because they are impossible or for some other reason. I agree with your last sentence. Nov 30, 2013 at 1:20
• @PeterFlom I was referring to the leftmost cell, which has contribution to a $\chi^2$ statistic of $(2-0)^2/0 = 4/0$. Nov 30, 2013 at 6:13
• The crux here remains how expected frequencies were calculated. Otherwise all the evidence indicates that a supposedly impossible thing has happened. There is a choice of how to report this: you might want to say that the hypothesis must be rejected, or you might want to say that the test is just not applicable, which is perhaps more likely. Nov 30, 2013 at 12:33
• Yes you guys are right. The two heterozygotes are mendelian errors which makes it impossible. Nov 30, 2013 at 13:04

$\frac{(2-0)^2}{0} + \frac{(3-5)^2}{5} = \infty$