In: Statistics and Probability
A national youth organization sells six different kinds of
cookies during its annual cookie campaign. A local leader is
curious about whether national sales of the six kinds of cookies
are uniformly distributed. He randomly selects the amounts of each
kind of cookies sold by five youths and combines them into the
observed data that follow. Use α = .05 to determine whether the
data indicate that sales for these six kinds of cookies are
uniformly distributed.
Kind of Cookie | Observed Frequency |
Chocolate chip | 185 |
Peanut butter | 168 |
Cheese cracker | 155 |
Lemon flavored | 161 |
Chocolate mint | 215 |
Vanilla filled | 165 |
Appendix A Statistical Tables
(Round the intermediate values to 2 decimal places.
Round your answer to 2 decimal places.)
Observed χ2 =
Cookie Sales is
not uniformly distributed or uniformly
distributed by kind of cookie.
Solution:
The null and alternative hypotheses are as follows:
H0 : The cookie sales is uniformly distributed by kind of cookie.
H1 : The cookie sales is not uniformly distributed by kind of cookie.
To test the hypothesis we shall use chi-square test of goodness of fit. The test statistic is given as follows:
Where, Oi's are observed frequencies and ei's are expected frequencies.
The expected frequencies are obtained as follows:
There are total 6 types of cookies. Hence, probability of sale of any type of cookie is 1/6.
Total observed frequency (N) = 185+168+155+161+215+165
Total observed frequency (N) = 1049
Since, we are testing for uniform distribution, therefore the expected frequency for each type of the cookies will be 1049/6 = 174.8333
Oi | ei | (Oi - ei)2/ei |
185 | 174.8333 | 0.5912 |
168 | 174.8333 | 0.2671 |
155 | 174.8333 | 2.2499 |
161 | 174.8333 | 1.0945 |
215 | 174.8333 | 9.2280 |
165 | 174.8333 | 0.5531 |
Total | 13.9838 |
From the above table we get,
The value of the test statistic is 13.9838.
Degrees of freedom = (n - 1) = (6 - 1) = 5
The p-value for the test statistic is given as follows:
p-value = P(χ2 > value of the test statistic)
p-value = P(χ2 > 13.9838)
p-value = 0.0157
We make decision rule as follows:
If p-value is greater than the significance level, then we fail to reject the null hypothesis (H0) at given significance level.
If p-value is less than the significance level, then we reject the null hypothesis (H0) at given significance level.
We have, p-value = 0.0157 and significance level = 0.05
(0.0157 > 0.05)
Since, p-value is less than significance level of 0.05, therefore we shall reject the null hypothesis at 0.05 significance level.
Conclusion : At significance level of 0.05, there is enough evidence to conclude that Cookie Sales is not uniformly distributed by kind of cookie.