Are there a greater proportion of blue MMs in a milk chocola
Are there a greater proportion of blue M&Ms in a milk chocolate bag than in a peanut bag? Are the colors evenly distributed in either bag? I would like to know what would be the relevant tests to run to answer the quesitons above. I will be sampling 20 bags of each type of M&M. In addition, what kind of test statistic would you use for this kind of data/ which one is the most appropriate?
Solution
You would run a chi-square goodness of fit test there.
Ideally, all colors must have the same number in all 20 bags.
Ex. If there are 6 colors and there are 600 candies, then your expected values will be 100 on each color.
Then, use
chi^2 = Sum[(O - E)^2 / E]
To get the chi square statistic, then get its p value.
