Problem

In 2007 , the $m \& m$ web site stated that the color distribution for their candy varies depending on the type of m\&m you buy. The color distribution claimed by the web site for milk chocolate m\&m's is shown in the chart below. A current day statistics student wants to conduct a test to see if the color distribution for milk chocolate m\&m's has changed since 2007 . The student scooped $117 \mathrm{m \& m}$ 's out of a large bag of milk chocolate m\&m's. The color counts for the student's sample are also shown below. $\begin{array}{lll}\text { Color } & \begin{array}{l}\text { Claimed } \\ \text { Percentage }\end{array} & \begin{array}{l}\text { Color Counts } \\ \text { from Sample }\end{array} \\ \text { Brown } & 13 \% & 24 \\ \text { Yellow } & 14 \% & 13 \\ \text { Red } & 13 \% & 20 \\ \text { Blue } & 24 \% & 14 \\ \text { Orange } & 20 \% & 21 \\ \text { Green } & 16 \% & 25\end{array}$ Calculate the value of the test statistic. Round your answer using 3 decimal places.

Solution

Step 1 :The problem provides the observed counts of different colors of m&m's and the claimed percentages for each color. The total number of m&m's observed is 117. The observed counts and claimed percentages are as follows: observed = [24, 13, 20, 14, 21, 25] and percentages = [0.13, 0.14, 0.13, 0.24, 0.2, 0.16].

Step 2 :We need to calculate the expected counts for each color. The expected count can be calculated by multiplying the total number of observations by the claimed percentage for each color. The expected counts are: expected = [15.21, 16.38, 15.21, 28.08, 23.4, 18.72].

Step 3 :Next, we calculate the test statistic using the formula for a chi-square goodness-of-fit test: \(\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}\), where \(O_i\) is the observed frequency and \(E_i\) is the expected frequency.

Step 4 :Substituting the observed and expected counts into the formula, we get \(\chi^2 = 16.698733602579757\).

Step 5 :Finally, we round the test statistic to three decimal places. The value of the test statistic is \(\boxed{16.699}\).

From Solvely APP
Source: https://solvelyapp.com/problems/13592/

Get free Solvely APP to solve your own problems!

solvely Solvely
Download