Wednesday, February 3, 2016

Coin Flips, Probability, and the Lumpiness of Chance

Did you hear the big news from Iowa? Hillary Clinton is the luckiest lady in the world, winning 6 coin flips! (Maybe this guy did those flips?)

Okay, not really.

Really not really.

Despite the fact that the whole 6 coin flips story appears to be bogus, and that even if it were true, it didn't really win her much, this incident highlights a misunderstanding about probability. So I decided now was a good time to blog a little about the basics of probability. Probability forms the basis of all statistical analysis, but even if you have no interest in learning statistics, probability is pretty darn important.

It's true that when you flip a coin, you have two possible outcomes, each of which has an equal chance of happening - 50%. This means that on average when you flip a coin, you should get heads half the time and tails half the time.

I stress on average. Because if something is truly random, you have a 50% chance of heads each time,  meaning you could very easily end up getting heads multiple times in row. It's only in the long run that you see the probabilities even out to 50%. But in the short run, you could get 10 heads in a row.

Why? Each coin flip is independent of the previous one - definitely in this case, since they were different coins tossed by different people in different places at different times. If you get heads on the first flip, that outcome should have no impact whatsoever on the next flip, meaning you could get heads again. And again. And again. If getting heads the first time (50% probability of heads) guaranteed you would get tails on the next flip (100% probability of tails), your flips are no longer independent of each other.

Try an experiment for me. Grab a coin, any coin. Flip it and note the outcome. Now flip it again and note the outcome. Do that a few more times. You probably did not get a perfect 50/50 split on heads and tails. In small samples, you won't get perfect results, because chance is lumpy - you'll get clusters of certain outcomes, rather than clean outcome 1, outcome 2, etc. Even the size of the clusters (for example: 8 heads, 2 tails, 1 heads, 5 tails, etc.) will be random. In 10 flips, you could get any combination of heads/tails. If you increase your number of flips, over time (as you approach an infinite number of flips, actually) you'll start to see things level out.

Or you can try using this website, which flips coins for you. I asked the site to flip 6 coins for me, all US Connecticut $0.25 coins, and here's what I got:

That's right, 5 heads. Looks like I won Iowa.

Interestingly, I flipped 6 coins again with the site and got 3 heads, 3 tails. So now my totals are 8 heads, 4 tails. I flipped those 6 coins 8 more times. Overall, I had 27 heads and 33 tails. It's not exactly 50/50 (it's a lumpy distribution, after all, because truly random events aren't clean or pretty) but it's closer than when I started.

The 50% probability is kind of a guideline, but for each individual flip, the outcome is random and independent of the previous one, so anything can happen.

Now one thing the first article I linked did was figure out the probability of that particular combination of heads/tails. Yes, that approach is valid. You can figure out the probability of any combination, so long as each flip is random and independent. But if something has a non-zero chance of happening, it can happen! Completely at random without any need for outside intervention.

You know what's even less probable than the 6 heads? Pretty much any 5-card poker hand better than 3-of-a-kind. Maybe the new Iowa procedure should be to have the candidates play a hand of poker?

I should note that I can't take credit for the "chance is lumpy" expression - I learned that in this wonderful book that you should definitely check out if you're interested in learning more about probability:

Probabilistically yours,

No comments:

Post a Comment