In: Statistics and Probability
Question 1: A student in an introductory statistics course investigated if there is evidence that the proportion of milk chocolate M&M's that are green differs from the proportion of dark chocolate M&M's that are green. She purchased a bag of each variety, and her data are summarized in the following table.
Green |
Not Green |
Total |
||
Milk Chocolate |
8 |
33 |
41 |
|
Dark Chocolate |
4 |
38 |
42 |
|
Total |
12 |
71 |
83 |
|
c. Estimate the p-value using the randomization distribution and show how you found it on the plot.
n = 83 Sample Size
Null and Alternative hypothesis are
Ho : Chocolate Types and Color are
independent
Ha : Chocolate types and color are not
independent
Let α = 0.05 Significance Level
To find Expected frequencies
Expected Frequency = (Row Total * Column Total)/Grand
Total
Grand Total = 83
Expected Frequency Matrix (rounding up the frequencies to
integer)
Expected Frequencies (E ) | Green | Non green | Total |
Milk Chocolate | 5.9277 | 35.0723 | 41 |
Dark Chocolate | 6.0723 | 35.9277 | 42 |
Total | 12 | 71 | 83 |
Calculate value of χ2 test statistic =
Following table gives the value of (Observed - Expected)2 /
Expected
Green | Non green | Total | |
Milk Chocolate | 0.7245 | 0.1224 | 0.8469 |
Dark Chocolate | 0.7072 | 0.1195 | 0.8267 |
Total | 1.4317 | 0.2420 | 1.6736 |
Calculate value of χ2 test statistic =
χ2 test statistic =
1.6736
Degrees of freedom = df = (number of rows - 1) * (number of columns
- 1)
df = (2-1) * (2-1) = 1
df = Degrees of freedom =
1
From chi square table or CHISQ.DIST.RT(X, df) function of
Excel
p-value for χ2 = CHISQ.DIST.RT(1.6736, 1) =
0.1958
p-value =
0.1958
α = 0.05
0.1958 > 0.05
Since p-value > α, we DO NOT reject the null
hypothesis
Conclusion
There does not exist enough statistical evidence at 5%
level of significance to show
that
the proportion of milk chocolate M&M's that are green differs
from the proportion
of dark chocolate M&M's that are
green