In: Statistics and Probability
Researchers want to determine whether all bags of M&Ms® have the same proportion of colors regardless of the flavor of M&Ms®. To test this, they sampled randomly king-size bags of each flavor and recorded their findings in the table.
Flavor | M&M's® Color | |||||
---|---|---|---|---|---|---|
Red | Orange | Yellow | Green | Blue | Brown | |
Original | 24 | 11 | 29 | 17 | 9 | 14 |
Peanut | 15 | 20 | 30 | 25 | 15 | 19 |
Almond | 22 | 17 | 21 | 12 | 28 | 7 |
Part A: What are the correct degrees of freedom
for this table? (2 points)
Part B: Calculate the expected count for the
number of green peanut M&Ms®. Show your work. (3 points)
Part C: Is there sufficient evidence that there is
a difference in the proportion of colors for the different flavors
of M&Ms®? Provide a statistical justification for your
conclusion. (5 points)
The Observed and Expected value tables are as below. Each cell of the expected value = (Row Total * Column Total) / Total
Observed | |||||||
Race | Red | Orange | Yellow | Green | Blue | Brown | Total |
Original | 24 | 11 | 29 | 17 | 9 | 14 | 104 |
Peanut | 15 | 20 | 30 | 25 | 15 | 19 | 124 |
Almond | 22 | 17 | 21 | 12 | 28 | 7 | 107 |
Total | 61 | 48 | 80 | 54 | 52 | 40 | 335 |
Expected | |||||||
Race | Red | Orange | Yellow | Green | Blue | Brown | Total |
Original | 18.937 | 14.901 | 24.836 | 16.764 | 16.143 | 12.418 | 92 |
Peanut | 22.579 | 17.767 | 29.612 | 19.988 | 19.248 | 14.806 | 109 |
Almond | 19.484 | 15.331 | 25.552 | 17.248 | 16.609 | 12.776 | 94 |
Total | 61 | 48 | 80 | 54 | 52 | 40 | 335 |
(A) Degrees of freedom = (Row -1) * (Column - 1) = (3 - 1) * (6 - 1) = 2 * 5 = 10
(B) Expected value = 54 * 124 / 335 = 19.988
(C)
The Hypothesis:
H0: The sample has a distribution that agrees with the distribution of the populations.
Ha: The sample has a distribution that is different from the distribution of the populations.
The Test Statistic:
Observed | Expected | O-E | (O-E)2 | (O-E)2/E | |
1 | 24 | 18.937 | 5.063 | 25.631 | 1.353 |
2 | 15 | 22.579 | -7.579 | 57.443 | 2.544 |
3 | 22 | 19.484 | 2.516 | 6.332 | 0.325 |
4 | 11 | 14.901 | -3.901 | 15.222 | 1.021 |
5 | 20 | 17.767 | 2.233 | 4.986 | 0.281 |
6 | 17 | 15.331 | 1.669 | 2.784 | 0.182 |
7 | 29 | 24.836 | 4.164 | 17.340 | 0.698 |
8 | 30 | 29.612 | 0.388 | 0.151 | 0.005 |
9 | 21 | 25.552 | -4.552 | 20.723 | 0.811 |
10 | 17 | 16.764 | 0.236 | 0.056 | 0.003 |
11 | 25 | 19.988 | 5.012 | 25.120 | 1.257 |
12 | 12 | 17.248 | -5.248 | 27.539 | 1.597 |
13 | 9 | 16.143 | -7.143 | 51.027 | 3.161 |
14 | 15 | 19.248 | -4.248 | 18.043 | 0.937 |
15 | 28 | 16.609 | 11.391 | 129.756 | 7.812 |
16 | 14 | 12.418 | 1.582 | 2.503 | 0.202 |
17 | 19 | 14.806 | 4.194 | 17.590 | 1.188 |
18 | 7 | 12.78 | -5.776 | 33.364 | 2.611 |
Total | 25.989 |
test = 25.989
The Critical Value: The critical value at = 0.05 (default) , df= n - 1 = 10
critical = 18.307
The p value: The p value: The p value at test = 25.989, df = 10; P value = 0.0038
The Decision Rule:
The Critical Value Method: If test is > critical, then Reject H0.
The p - value Method: If p value is < , Then Reject H0.
The Decision:
The Critical Value Method: Since test (25.989) is > critical (18.307), We Reject H0.
The p - value Method: Since p value (0.0038) is < (0.05), We Reject H0.
The Conclusion: There is sufficient evidence at the 95% significance level to conclude that there is a difference in proportion of colors for the different flavors of M & M's.