## 2019

ONE GOOD IDEA

# A Tasty Comparison

## Breaking down distributions using math and measurement

by Edwin G. Landauer

In the article, “A Sweet Way to Learn
DoE,” which appeared in a past issue of QP, bags of M&Ms were used to
demonstrate the concepts of analysis of variance and blocking design in entry-level
design of experiments (DoE).^{1} The objective of that article was to
determine whether a 1.74-ounce bag has the same number of each color on
average. There is another approach that could have been used to accomplish this
objective.

Based on a call to the Mars Co. (the producer of M&Ms), it was determined that each color is not equally represented in bags of M&Ms. The actual distribution of colors is determined by popularity. Mars actually polls consumers and uses the results to determine the distribution. For example, for the 14-ounce bag, the colors are targeted to be distributed as shown in Table 1.

The objective in this article is to test the hypothesis that the actual distribution matches the hypothesized distribution provided by Mars. This type of count data classification on a single scale is a one-way classification. The underlying distribution, called the multinomial distribution, is an extension of the binomial distribution. If the hypothesis that the actual distribution matches the target distribution is true, a chi-square test can be used to evaluate the results.

The chi-square test statistic is

where *i*
= 1, 2, 3 ... *n*
(number of colors of M&Ms), *O _{i}*
= the observed number of the

*i*th color and

*E*= the expected number of the

_{i}*i*th color. This test statistic follows an x

^{2}distribution with

*n*– 1 degrees of freedom.

To test the hypothesis that the colors follow the percentages of Table 1, I purchased a 14-ounce bag and determined the total number of each color. The results are provided in the “Observed” row of Table 2.

Given that there was a total of 464 M&Ms, the expected or hypothesized number of each color can be obtained by multiplying that total by the target percentages for each color, as shown in Table 1. The expected values are provided in the “Expected” row of Table 2.

Using
the two sets of values, the x^{2} test statistic can be calculated to be x^{2} = 26.4488. Using a = 0.05 level of significance, the critical value
would be x^{2}(.05) = 11.0705.

Because the test statistic is greater than the critical value, there is sufficient evidence to say the actual color distribution in the 14-ounce bag does not match the target distribution provided by Mars.

From this example, it appears that Mars does not do a very thorough mixing job or that the actual color distribution might not match the intended color distribution. This probably isn’t a big problem for M&Ms, but in some situations, proper mixing could be very important.

Even though the test method was demonstrated using something as simple as a bag of M&Ms, there are numerous applications in the workplace where this method would work as well. For example, it is sometimes important to know whether a defect is occurring randomly through a series of production runs. But anytime a product is being made with different characteristics based on some hypothesized or target distribution, the application of this technique would be very useful—just not as delicious.

### Reference

- Tony Lin and Matthew S. Sanders, “A Sweet Way
to Learn DoE,”
*Quality Progress*, Vol. 39, No. 2, p. 88.

**Edwin
G. Landauer** is a retired
teacher, who most recently taught engineering and quality science at Clackamas
Community College in Oregon City, OR. He has master’s degrees from Portland
State University, Montana State University and the University of Central
Florida. He is a certified quality engineer and a fellow of ASQ.

Featured advertisers