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, and 16% 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 α=0.05 level of significance. Using the level of significance α=0.05, test whether the color distribution is the same.
According to the question, p 1 = 0.13, p 2 = 0.14, p 3 = 0.13, p 4 = 0.24, p 5 = 0.20 and p 6 = 0.16.
The null and alternative hypotheses for the test are:
H 0 : The distribution of colors is the same as stated by the manufacturer.
H 1 : The distribution of colors is not the same as stated by the manufacturer .
A chi-squared test of goodness of fit is suitable to be used in this situation.
Test statistic
"\u03c7^2 = \\sum^n_i \\frac{(O_i-E_i)^2}{E_i}"
"\u03c7^2 = 16.33"
The degrees of freedom is df = 6 – 1 = 5.
The level of significance is α = 0.05.
Using the Excel formula =CHISQ.DIST.RT(16.33,5) the P-value is 0.006.
Decision rule:
If P-value is less than or equal to the level of significance, then reject the null hypothesis. Otherwise, fail to reject the null hypothesis.
Since P-value of 0.006 is less than the level of significance of 0.05, reject H 0 .
Thus, there is not enough evidence to support the claim that the distribution of colors is the same as stated by the manufacturer, at 5% level of significance.
Comments
Leave a comment