In: Statistics and Probability
A manufacturer of colored candies states that 13%of the candies in a bag should be brown,14%yellow,13%red,24%blue,20% orange, and16% green. A student randomly selected a bag of colored candies. He counted the number of candies of each color and obtained the results shown in the table. Test whether the bag of colored candies follows the distribution stated above at the alpha equalsα=0.05 level of significance.
Color |
Brown |
Yellow |
Red |
Blue |
Orange |
Green |
|
---|---|---|---|---|---|---|---|
Frequency |
61 |
67 |
57 |
59 |
96 |
66 |
|
Claimed Proportion |
0.13 |
0.14 |
0.13 |
0.24 |
0.20 |
0.16 |
Please answer the expected count
Compute the expected counts for each color.
Color |
Frequency |
Expected Count |
|
---|---|---|---|
Brown |
61 |
||
Yellow |
67 |
||
Red |
57 |
||
Blue |
59 |
||
Orange |
96 |
||
Green |
66 |
Please answer the
test statistic
p-value
Reject or do reject
Thanks
Solution:
Given:
Color | Oi: Observed Frequency | Claimed Proportion |
---|---|---|
Brown | 61 | 0.13 |
Yellow | 67 | 0.14 |
Red | 57 | 0.13 |
Blue | 59 | 0.24 |
Orange | 96 | 0.20 |
Green | 66 | 0.16 |
N= 406 |
State the hypothesis:
H0:The distribution of colors is the same as stated by the manufacturer.
H1:The distribution of colors is not the same as stated by the manufacturer.
Compute the expected counts for each color.
Multiply each claimed proportion by N = 406.
Thus we get:
Color | Oi: Observed Frequency | Ei: Expected Count |
---|---|---|
Brown | 61 | 52.78 |
Yellow | 67 | 56.84 |
Red | 57 | 52.78 |
Blue | 59 | 97.44 |
Orange | 96 | 81.20 |
Green | 66 | 64.96 |
406 |
Find
Chi square test statistic for goodness of fit
Where
Oi = Observed Counts
Ei =Expected Counts
Thus we need to make following table:
Color | Oi: Observed Frequency | Ei: Expected Count | Oi2/Ei |
---|---|---|---|
Brown | 61 | 52.78 | 70.500 |
Yellow | 67 | 56.84 | 78.976 |
Red | 57 | 52.78 | 61.557 |
Blue | 59 | 97.44 | 35.725 |
Orange | 96 | 81.20 | 113.498 |
Green | 66 | 64.96 | 67.057 |
N = 406 |
Thus
Find p-value:
Use following Excel command:
=CHISQ.DIST.RT( X2 , df )
where
df = k - 1 = 6 - 1 = 5
=CHISQ.DIST.RT(21.312, 5)
=0.0007
Thus p-value = 0.0007
Decision: Reject or do not reject
Since P-value = 0.0007< α = 0.05 level of significance, we reject the null hypothesis H0.
Thus correct answer is:
Reject H0. There is sufficient evidence that the distribution of colors is not the same as stated by the manufacturer.