Partial Answer Key for HW Problems 1-4 on Chi-Square Goodness of Fit
Note: For all the chi-square procedures that we use, the cell entries must be
counts, not proportions or probabilities. Always be sure to convert
to counts before computing the value of the chi-square statistic. Do
not make the mistake of thinking (as your instructor unwisely did at the end of F period
on 4/13/99) that the results would be the same in #2, for example, if you
used .4, .2, .3, and .1 as your "expected" cell values. This would, of course,
violate rules of the type we learned in Section 8.3 for knowing when the chi-square
distribution is a reasonable approximation to the distribution of X^2.
Null and alternative hypotheses:
1.H0: The die is fair.*
1.Ha: The die is unfair (a.k.a. biased or "loaded").
2.H0: The population proportions of A, B, O, and AB blood are as stated.
2.Ha: The population proportions of A, B, O, and AB blood are not as stated.
3.H0: Mendel's law of segregation holds here; i.e., the true long-run frequencies of offspring are in the ratio 9:3:3:1.
3.Ha: Mendel's law of segregation does not hold here; i.e., the true long-run frequencies of offspring are not in the ratio 9:3:3:1.
4.H0: The probability distribution in 1993 is the same as that in 1960.
4.Ha: The probability distribution in 1993 is not the same as that in 1960.
Descriptions and conclusions
1. In an analysis of all 6 numbers using the chi-square goodness-of-fit test, there is no evidence that this die is loaded. However, this problem is an EXCELLENT example of why you must always "eyeball" and/or plot your data. The odd numbers seem to appear less often than expected. In fact, if you are willing to accept the approximation involved in the chi-square GOF test for evens vs. odds, you can achieve a p-value of 0.0446, which implies significance!** However, since we know the exact distribution in this case (what is it?), we can calculate the true p-value to be 0.0548, which falls short of significance at the usual level. Conclusion: Our observation suggests a bias toward even numbers, and there is some evidence (binomial N=120, p0=0.5, p=0.0548) that the die is unfair.
2. At the 5% level, there is sufficient evidence to reject the stated belief. Our sample suggests a greater prevalence of types B and AB blood than hypothesized, and a lower prevalence of types A and O blood than hypothesized. A table showing the observed percentages (namely, 37.0%, 24%, 26.5%, and 12.5%) would be desirable here.
3. Although the deviations are apparently rather large, especially with the walnut fowl population of 160 being 20 below the expected number, there is insufficient evidence to reject the null hypothesis that the Mendelian law holds here. What sort of p-value do you think we would need in order to reject the null hypothesis?
4. There is some evidence that the probability distribution in 1993 differs from that in 1960. The difference is significant at the 10% level but not at the 5% level. Our sample (which must be an SRS from the population of interest, though this is not stated) suggests that the 1993 population has a greater proportion of "young" and "old" adults (i.e., under 30 or above 59) and a lower proportion of middle-aged adults than the 1960 population had.
Results of running the CHISQGOF program that we created in class
on 4/13/99:
Note: Results are listed in as chi-square value, then df, then p-value.
Problem #1 For analysis of all 6 numbers: 4.3, 5, 0.507
-- For analysis of evens vs. odds only: 4.033, 1, 0.045 Problem #2 8.233, 3, 0.041 Problem #3 5.556, 3, 0.135 Problem #4 9.586, 5, 0.088
Additional notes on #1 above
* This is a very strong statement. It means not only that the long-run relative frequency of each number must be 1/6, but also that evens must be as likely as odds, the sequence 444 as likely as the sequence 555, etc. There are more conditions than we could ever hope to check in a lifetime. Since it is impossible to prove (or disprove) the fairness of a die, we settle for performing a chi-square GOF test, usually on a null hypothesis of the form "each number has probability 1/6"; then, in our writeup (certainly in the conclusion, if not before) we issue a caveat (i.e., disclaimer) saying that the chi-square GOF test is not a thorough test for randomness. It's not the last word on the subject.
Our conclusion will then resemble one of the following:
--(1) [if p-value is large] "Although there may be bias that our test did not detect, the chi-square goodness-of-fit test gives no evidence (chi-sq=whatever, df=whatever, p=whatever) that the die is biased."
--(2) [if p-value is small] "Although there are more sophisticated tests for randomness, even a chi-square goodness-of-fit test gives strong evidence (chi-sq=whatever, df=whatever, p=whatever) that the die is biased."
--(3) [if p-value is borderline] "Although there are more sophisticated tests for randomness, even a chi-square goodness-of-fit test gives some evidence (chi-sq=whatever, df=whatever, p=whatever) that the die is biased."
** To compute the significance of the difference between evens and odds, put {60,60} into L2 and {71,49} into L3 before executing CHISQGOF. You should get p=0.0446 as your answer. Challenge: Can you achieve this same result using Z procedures?