Chi-Square Test For For Goodness-of-Fit: Announcements
Chi-Square Test For For Goodness-of-Fit: Announcements
Example 15.8 Pennsylvania Daily Number Use same 5 steps of hypothesis testing
Called chi-square goodness-of-fit test
State lottery game: Three-digit number made by Step 1: Determine the null and alternative hypotheses.
drawing a digit between 0 and 9 from each of three
different containers. H0: The probabilities for k categories are p1, p2, . . . , pk.
Ha: Not all probabilities specified in H0 are correct.
Lets examine draws from the first container.
If numbers
b randomly
d l selected,
l t d eachh value
l would ld be
b
equally likely to occur. So, k = 10 and on each draw Note: Probabilities in the null hypothesis must sum to 1.
there is probability 1/10 of getting each digit (0, ..., 9)
Pennsylvania Lottery Example:
H0: p1 = p2 = ...= p10 = 1/10
H0: p = 1/10 for each of the 10 possible digits
Ha: Not all probabilities are 1/10. Ha: The 10 digits are not all equally likely.
5 6
1
Goodness of Fit (GOF) Test (continued) Example 15.8 Pennsylvania Daily Number
Step 2: Verify necessary data conditions, and if met, Data: n = 500 days between 7/19/99 and 11/29/00
summarize the data into an appropriate test statistic.
Data condition needed: At least 80% of the expected
counts are greater than 5 and none are less than 1. Test
statistic:
2 (Observed Expected) 2
Expected
7 8
2
Step 4: Making a Decision Example 15.8 Daily Number (cont)
Chi-square goodness of fit statistic:
Large test statistic => small p-value
=> evidence that the proportions are not as specified. From Table A.5 (page 732) gives areas to the right of the
chi-square value, because thats the p-value in this
Two equivalent rules: situation.: Example: Chi-square value = 6.04.
j H0 when
Reject df = k 1 = 10 1 = 9
p-value > 0.50 (note it is 0.736)
p-value 0.05 Rejection region: Above 16.92.
Chi-square statistic is greater than the entry in Result is not statistically significant;
the 0.05 column of Table A.5 (the critical value). the null hypothesis is not rejected.
That defines the rejection region.
13 14
Step 5: Report the Conclusion in Context New Example: Is Sudden Infant Death
Syndrome (SIDS) Seasonal?
Conclusion: Pennsylvania lottery digits drawn are not Data from King County, Washington
statistically different from whats expected by chance. Define p1, p2, p3, p4 to be the proportion of deaths from
SIDS that happen in the winter, spring, summer and fall.
They are defined so that the seasons have about equal days.
Step 1: Determine the null and alternative hypotheses.
H0: p1 = , p2 = , p3 = , p4 =
Ha: Not all probabilities specified in H0 are correct.
3
Step 4: Making a Decision
Step 3: Finding the p-value
Large test statistic => small p-value
Degrees of freedom = 4 1 = 3. => evidence that the proportions are not as specified.
Two equivalent rules:
From Table A.5, smallest entry is 2.37, the value Reject H0 when
with
ith .50
50 belo
below it.
it So
So, for our
o r test statistic of p-value 0.05; in our example it is.
2.10 all we can say is p-value > .50. Chi-square statistic is greater than the entry in
the 0.05 column of Table A.5 (the critical value).
Rejection region approach: That defines the rejection region. In our example,
For df = 3, reject the null hypothesis if the test the test statistic is not in the rejection region.
statistic is greater than 7.81. (Ours is not.) So we do not reject the null hypothesis.
20