With c=3 colors, you got p(n=54) = 0.25. And since it’s not possible to have an even number of M&M’s for every color if n is odd, then p(n=53) = 0. So p(n=53,54) = (0.25 + 0)/2 = 0.125. Since p(n=53,54) = 1/8 = (1/2)^3 for c=3 colors, then I think it stands to reason that p(53,54) = (1/2)^6 when there are c=6 colors.

I’m sure the numbers would differ slightly for larger/smaller values of n, but I think it’s insightful to consider a pair fo consecutive n where one is odd and one is even. I think your calculations seem to support rather than refute my contention.

On the other hand, I’m glad this problem is leading to such great discussion! It highlights why I love probability: Doing the calculations for a specific case can be quite onerous; but considering the general case, if you think about it correctly, can be enlightening as well as require simple calculations.

Good times!

]]>Of course, we need to consider only case when n is an even number.

A priori, we take the probability of this event equal to 1/2

I did a numerical calculation with the n=54 and for simplify assumed only 3 colors in a pack (in this case the Excel spreadsheet serves ideally).

Let proportions be p1=p2=p3=1/3.

Because n is large and n*pi (i=1,2,3) are moderate (n*p1=n*p2=n*p3=18) the multinomial distribution (trinomial in given case) can be approximated by the multiple poisson distribution:

e^[-(p1+p2)*n] * [(n*p1)^k1*(n*p2)^k2]/(k1!*k2!)

Summing over all possible even numbers k1,k2 gives the probability P, that there will be an even number of M&M’s of each of the three colors

P is approximately 0.25

I hope i did not make any mistake. You may want to verify or disprove this result.

Honestly, i expected that in this case (p1=p2=p3), P=0.5 and differs from this only when p1,p2,p3 are all different from each other.

My hypothesis is that in case of 4 and more color P < 0.25

I agree with you that for small n, we’ll need to do a very large multinomial calculation.

What I wonder is whether, for the typical size of packs, n is large enough for the approximation of (1/2)^6 to be good enough.

I also wonder whether the model of a pack being a random sample from the large container is good enough. Data I’ve collected in teaching statistics classes suggests that if you buy a large number of M&Ms from a given store on a given day, the proportions don’t match those that are announced by the company, and the deviation is far too large to be explained by random sampling.

]]>0.24:0.13:0.16:0.14:0.20:0.13 correspondingly.

0.24+0.13+0.16+0.14+0.20+0.13=1

To fill a pack of M&M’s a random sample of size n is taken from the container. The probability that blue occurs k1 times, brown k2 times,…, and red k6 times follows multinomial distribution.

k1+k2+…+k6=n

You will need to sum all probabilities with k1,k2,… being even numbers.

]]>No, wait, even for large packs it’s somewhat suspect. These totals are not independent. If the total number in the pack is odd, you have no chance at all! But then maybe when you have an even number in the pack the chances are closer to 1/32?

Maybe I am convinced after all by your argument that with large packs you can just figure they dump some of each color in, and the likelihood of an odd or even number of each color is about the same, treating a priori the pack as having some distribution of number of each color rather than a fixed total number.

I’d like to see the machines they actually use for filling them! I know from exercises we did in my stats classes that neither individual (large) packs nor averages of many packs seem to match the numbers they give on the web site. But of course that doesn’t mean much – maybe Californian packs are heavy in some colors and Virginian in another, or maybe the particular shipment to the particular store on the particular day is different than other shipments. Who knows. But I do think the procedure the machine uses to fill them might matter here. Among other things, it might guarantee a total number that’s always odd, in which case your probability is 0!

I think you need to start recording the number of each color in each pack and after a few dozen packs you can share the data with us.

Or maybe I’m hungry enough to go and do that myself. Only nowadays I usually buy the multi-pound costco packs.

]]>With a probability of 1/64, and given the frequency with which I eat M&M’s, I’m likely to encounter more than one perfect pack before the end of my days.

]]>Seems like a bigger “problem” might be that if you actually encounter a “perfect pack” then

a) how can you prove it? (you’ve just consumed the evidence unless your OCD is really kicking in and you have actually done the sorting up front)…

and

b) would that make you give up being able to encounter another in your life? Given [y]our bent toward OCD, could you continue to eat them knowing you would likely never encounter another “perfect pack”?

]]>