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 '13 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 '13 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 '13 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 '13 at 12:33
• Yes you guys are right. The two heterozygotes are mendelian errors which makes it impossible. Nov 30 '13 at 13:04

2 Answers

You would only ignore the 0's if there is some reason (not a statistical one) to do so; but including it would only change the degrees of freedom since (0-0) is, of course, 0. However, I am not sure you want chi-square here at all. It would depend on why you expected only AA genotype.

If you do want chi-square, it would be

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

The ChiSquare approximation is not valid when cell counts are small. Try a Fisher's exact test, using a multinomial probability distribution.