According to the Mars Company, & M's Milk Chocolate candies are manufactured and distributed with the following color percentages:

Blue - 24%; Orange - 20%; Green - 16%; Yellow - 14%; Red - 13%; Brown - 13%.

A large sample of this variety of M & M's was collected, and the frequencies of the colors were recorded (see the table below). Test the claim that the color distribution claimed by the company is not correct, using a 0.05 significance level.

M M's Milk Chocolate candies

Color Frequency
Blue 457
Orange 389
Green 371
Yellow 268
Red 277
Brown 258

Solution

The observed data is

Color Obs. Freq.$(O)$ Prop.
Blue 457 0.24
Orange 389 0.2
Green 371 0.16
Yellow 268 0.14
Red 277 0.13
Brown 258 0.13
Step 1 Setup the hypothesis

The null and alternative hypothesis are as follows:

$H_0:p_{Blue}=0.24, p_{Orange} =0.20, p_{Green} =0.16, p_{Yellow}= 0.14, p_{Red} = 0.13, p_{Brown} = 0.13$

(i.e., The distribution of colors for plain M \& M's fits the distribution claimed by the Mars company.)

$H_1:$ The distribution of colors for plain M \& M' does not fits the distribution claimed by the Mars company.

Step 2 Test statistic

The test statistic for testing above hypothesis is

$$ \begin{equation*} \chi^2= \sum \frac{(O_{i} -E_{i})^2}{E_{i}} \sim \chi^2_{(k-1)}\\ \end{equation*} $$

Step 3 Level of Significance

The level of significance is $\alpha =0.05$.

Step 4 Critical value of $\chi^2$

The level of significance is $\alpha =0.05$. Degrees of freedom $df=k-1=6-1 =5$.

chi-square critical region 0.05
chi-square critical region 0.05

The critical value of $\chi^2$ for $df=5$ and $\alpha=0.05$ level of significance is $\chi^2 =11.0705$.

Step 5 Test Statistic

The expected frequencies can be calculated as

$$ \begin{equation*} E_{i} =N*p_i \end{equation*} $$

For example, $E_{1}$ is given by

$$ \begin{eqnarray*} E_{1} & = &N*p_1\\ &=& 2020*0.24\\ &=&484.8. \end{eqnarray*} $$

Color Obs. Freq.$(O)$ Prop. $p_i$ Expe.Freq.$(E)$ $(O-E)^2/E$
Blue 457 0.24 484.8 1.594
Orange 389 0.2 404 0.557
Green 371 0.16 323.2 7.069
Yellow 268 0.14 282.8 0.775
Red 277 0.13 262.6 0.79
Brown 258 0.13 262.6 0.081

The test statistic is

$$ \begin{eqnarray*} \chi^2&=& \sum \frac{(O_{i} -E_{i})^2}{E_{i}} \sim \chi^2_{(k-1)}\\ &=&\frac{(457-484.8)^2}{484.8}+\cdots + \frac{(258-262.6)^2}{262.6}\\ &=& 1.594 +\cdots + 0.081\\ &=& 10.866. \end{eqnarray*} $$

Step 6 Decision (Traditional approach)

The test statistic is $\chi^2 =10.866$ which falls $outside$ the critical region bounded by the critical value $11.0705$, we $\textit{fail to reject}$ the null hypothesis.

OR

Step 6 Decision ($p$-value approach)

The p-value is $P(\chi^2_{5}>10.866) =0.0541$.

As the p-value $0.0541$ is $\textit{greater than}$ the significance level of $\alpha = 0.05$, we $\textit{fail to reject}$ the null hypothesis.

There is no sufficient evidence to support the claim that the color distribution does not fit the Mars Company's claimed distribution.

Further Reading