## Wednesday, April 4, 2018

### Teach 180: M&M's (Day 132)

We began our unit on the chi-square distribution in AP Statistics today by counting M&Ms.  The null hypothesis was the M&M percentages were as claimed by M&M/Mars.  The alternative hypothesis was the percentages were not as claimed, meaning that at least one of the percentages is off from what is claimed.  Initially the 8 AM class started with 2 students and by 8:15 AM, we had 5 of the 8 students that were to be in class. (There had been a bad accident that caused several students to be late.)

Here is the data we gathered:

Note: We initially had 102 candies in our sample.  I told the students that it would be easier to figure out the expected counts if we had 100 M&M's.  They suggested removing two candies from our collection "at random" with the help of random.org.

Our p-value was 0.0025 and our chi-square test statistic was 18.3951.  The image at the left is a screenshot from the TI-84 emulator.   Our conclusion was to reject the null hypothesis, because our p-value was lower than a standard alpha level, like 0.05.

So, where was the difference?  Which colors were the largest contributors to the test statistic.  When we ran the test on the calculator, it created a list called "CNTRB", which contains the individual addends that were used to create the test statistic.  The largest value was about 11.6 for yellow and the second largest contributor was 4.4 for the orange candies.  If you look at the observed and expected counts, this makes sense.

Fun Fact: M&M's are made at two different plants, Cleveland and Hackettstown.  If you look at your bag, you can see where your candies were made.  The batch we used was made in Cleveland.  Notice the CLV in the best before date box on the bag.  This is quite interesting, because we live about 30 minutes from Hackettstown.

Also, you would think that the colors would be made in the same proportions at both plants, but they aren't.  They are close, but they are not exactly the same.  The screenshot below shows the proportions of each color from each plant.  I am not sure when the percentages changed, but I do know that in 2008 the percentages were different than what is listed here.