Thursday, March 5, 2009

Starbursts + Math = Fun

Most people just eat the candy. Me? I do the math.

Explanation: Not so long ago, I was eating from a box of Starbursts. While not a huge fan of candy, I seem to have a bit of a weakness for their chewy goodness. Anyway, the Starbursts were individually wrapped and inside a box, so I could reach in and just grab a bunch. My normal Starburst eating style is to grab 4 or 5, vow that I'll stop after those, and repeat until the box is empty.

At one point, I took 4 Starbursts out and they were all red. As the red ones are my favorites, I didn't have much of a complaint, but I did notice how unusual it seemed that all four were red. Most people would stop there, but me? I did the math.

Embarrassingly, I had to look to see how many varieties of Starburst were in the box. The answer was five: red, pink, yellow, orange, and green. Furthermore, I assumed that I would have been impressed to pick any four of the same color, not just reds. That means the probability of this occurrence was really just the probability that I picked four Starbursts, where the color of one didn't matter and the color of the other three were the same as the first.*

From there, the math was straightforward. Five to the third power is 125, so the probability was 1/125, or 0.8%. Not inconceivable odds, but not very likely either. I then ate my little math project.

*People tend not to consider this assumption, but it is quite important. For instance, you may look at a family with four daughters and say that it's amazing because the probability that all four children were girls is 1/16, or 6.25%. In reality, though, you would have thought the same thing about four boys. The probability you would be computing is NOT the probability that there would be four girls, it's the probability that you'd be amazed by the genders of the four children. The probability that four kids are all the same sex is just 1/8 or 12.5%. I once demonstrated this to somebody by flipping a coin three times. The coin came up heads all three times. Admittedly, my demonstration could have gone worse, but luckily, it was a friendly coin.**

**Yes, I just said "luckily" in a post about probability. Deal with it.


Jeremy said...

I think your math is a little flawed. You're assuming that there are an equal number of each color remaining in the assumption which is thrown out the window the instant you pick the first one out of the bag. The odds have to change depending on how many Starbursts are in the bag in the first place. If there are 25 (5 of each color) the odds of pulling the 5 reds are much lower than if you have a bag of 250 (50 of each color) and you pull 5 out of the 50 reds.

Your simple math is assuming an infinite number of Starbursts in the bag to the point where removing one red one infinitessimally changes the odds of pulling the next red one. How big is that bag?

Willie Y said...

I think you should just eat the Starbursts and enjoy. And the Starburst enjoyment could be dangerous as this story suggests.

Michigan woman files lawsuit because Starburst candy is “Dangerously Chewy”!

Jeremy said...

Some people eat the Starbursts, some people do the math, and some people whine on other people's blogs, huh?

My math is perfect for the calculation I performed. I could certainly have computed the actual probability in my exact situation by dumping the remainder of the box on the table, tallying up the totals of each color and grinding out the math. I was assuming (for the sake of time, so I could go back to chewing that cherry goodness) that there were an infinite number of evenly distributed chews to select from.

This is why people don't give you candy.