In: Statistics and Probability
Chocolates N&N come in 3 colors: blue, red and yellow. A chocolate bag should, on average, be filled with 40% of blue, 40% of red and 20% of yellow. The supervisor test the machine by taking a sample of bags. He counts 85 blue, 106 red, and 43 yellow in this sample. α = 0.05
a) What are the null and alternative hypothesis? Define any necessary variables.
b) What is the test statistic?
c) What is the critical value or p-value (use whichever approach you prefer)?
d) Do you reject or fail to reject the null hypothesis? Explain your reasoning.
e) Should the supervisor report that the machine is malfunctioning?
a) As we are testing here whether the sample gives the same proportion as expected, the null and the alternative hypothesis here are given as:
H0: The distribution is same as the expected ratios given
Ha: The distribution is different from the expected ratios given
b) The expected frequency for each colour is computed here
as:
Ei = pi*Total Frequency
E(blue) = 0.4*(85 + 106 + 43) = 0.4*234 = 93.6
E(red) = 0.4*234 = 93.6
E(yellow) = 0.2*234 = 46.8
Now the chi square test statistic here is computed as:
This is the required test statistic value here.
c) For n - 1 = 2 degrees of freedom, the p-value here is computed from the chi square distribution tables as:
therefore 0.25392 is the p-value here.
d) As the p-value here is 0.25392 > 0.05 which is the level of significance, therefore test is significant and we reject the null hypothesis here.
e) As there is no significant difference in the distribution of colours, therefore there is insufficient evidence here for the supervisor to report that the machine is malfunctioning