In: Statistics and Probability
The color distribution of plain M&M’s varies by the factory in which they were made. The Hackettstown, New Jersey plant uses the following color distribution for plain M&M’s: 12.5% red, 25% orange, 12.5% yellow, 12.5% green, 25% blue, and 12.5% brown. Each piece of candy in a random sample of 100 plain M&M’s from the Hackettstown factory was classified according to color, and the results are listed below. Use a 0.05 significance level to test the claim that the Hackettstown factory color distribution is correct. Describe method used for calculating answer.
color | red | orange | yellow | green | blue | brown |
number | 11 | 28 | 20 | 9 | 20 | 12 |
(a) Identify the appropriate hypothesis test and explain the reasons why it is appropriate for analyzing this data.
(b) Identify the null hypothesis and the alternative hypothesis.
(c) Determine the test statistic. (Round your answer to two decimal places)
(d) Determine the p-value. (Round your answer to two decimal places)
(e) Compare p-value and significance level ?. What decision should be made regarding the null hypothesis (e.g., reject or fail to reject) and why?
(f) Is there sufficient evidence to support the claim that the Hackettstown factory color distribution is correct? Justify your answer.
The Hackettstown, New Jersey plant uses the following color distribution for plain M&M’s:
12.5% red, 25% orange, 12.5% yellow, 12.5% green, 25% blue, and 12.5% brown.
However form a simple random sample of size 100 the following was obtained :-
Colour Obs
Red 11
Orange 28
Yellow 20
Green 9
Blue 20
Brown 12
a. & b.) An appropriate hypothesis to test the color distribution intended is in accordance with theose obtained in the sample would be :
Ho: The data is consistent with the color distributiion. vs H1: The data is NOT consistent
We shall be using the Pearsonian Chi square test of goodness of fit to test our hypothesis.
The reasons we can do so are :
1.) Simple random sampling is used.
2.) The variable under study is categorical.
3.) The frequencies are atleast 5.
c.) The test statistic is given by :
where Ei are the expected frequencies and Oi are the observed frequencies
Our test statistic follows chi square distribution with 7-1 degrees of freedom.
The observed test statistic for our data is = 7.04
d.) The p value is the probability of obtaining a value as extreme as the test statistic.
For our data, the degrees of freedom is 7-1=6
The p-value is accordingly 0.3172
e.) We observe that the p-value is less than the given level of significance ie 0.05.
Hence we are to reject the null hypothesis and conclude that the sample proportions of the colours are not consistent with those of the expected proportions.