11

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$

crysis405
  • 213
  • 6
    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. – Glen_b Nov 30 '13 at 01:17
  • 1
    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. – Peter Flom Nov 30 '13 at 01:20
  • @PeterFlom I was referring to the leftmost cell, which has contribution to a $\chi^2$ statistic of $(2-0)^2/0 = 4/0$. – Glen_b Nov 30 '13 at 06:13
  • Oh, yes. You're right. My bad. I will fix my answer. – Peter Flom Nov 30 '13 at 12:21
  • 1
    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. – Nick Cox Nov 30 '13 at 12:33
  • 1
    Yes you guys are right. The two heterozygotes are mendelian errors which makes it impossible. – crysis405 Nov 30 '13 at 13:04

2 Answers2

5

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$

Peter Flom
  • 119,535
  • 36
  • 175
  • 383
2

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

Wiki: https://en.wikipedia.org/wiki/Fisher%27s_exact_test

RL Rogers
  • 21
  • 1