# Frivolous Friday: The Coin Toss Problem

I was playing my flashcard game on my phone, and in the “Mathematics and Measurements” section, I got this question (paraphrasing): “If you toss a coin ten times and it comes up heads each time, is it more likely to come up heads the eleventh?”

And I started thinking.

I know the “correct” answer. The answer is No. If the coin is truly random, each toss is independent of the previous ones, and each toss has a 50/50 chance of coming up heads. In any random sequence of sufficient length, pseudopatterns appear, and if you get one of those it may seem like… well, a pattern. But it’s not. In fact, if you flip a random coin an infinite number of times, it’s essentially guaranteed that any sequence you can think of will come up at some point: ten heads in a row, a hundred heads in a row, the lyrics to “Never Gonna Give You Up” spelled out in Morse code (with heads being dashes and tails being dots). It doesn’t matter how many times it came up heads before: each flip is still 50/50.

But.

The question, as worded, is not about a theoretical coin, a perfect 50/50 randomness generator. It’s about a real coin in the physical world. So I started thinking: If a coin comes up heads some number of times in a row, it’s reasonable to be suspicious that the coin is weighted. What is that number?

I posed the question on Facebook — and damn, was that conversation interesting. People first started talking about p values (very roughly: the odds that a pattern is statistically significant). In much of the scientific world, an experimental result is considered significant if the p value is less than 0.05 — i.e., if there’s a better than 5% chance that the result are statistically significant. But to some extent, that’s just a convention, and for any given situation, you have to consider how much uncertainty you’re willing to accept. (If I’m flipping a coin that came up heads X number of times, and ten bucks is at stake, I’ll accept a higher p value than if my home and all my possessions are at stake.)

But then we got into yet another question, which shifts the answer in a completely different way: How common are weighted coins?

Ten heads in a row is wildly unlikely — but weighted coins are rare, and the odds of having one in your pocket are also wildly unlikely. You then have to do a Bayesian analysis of the question, factoring in the odds of both. If weighted coins were common — if, for instance, the Mint started issuing quarters where Washington’s head is enormous and puffy — I wouldn’t need as many heads-in-a-row coin flips to make me suspicious of this one.

And once you start asking “How common are weighted coins?”, you then have to ask, “Who’s flipping the coin?” If I’m flipping the coin myself, and I just take it out of the change I’ve gotten from various vendors throughout the week, all I need to do is the Bayesian analysis above, based on how many weighted coins are in circulation. But what if someone else is flipping the coin? We then move the question out of statistics, and into psychology, sociology, and game theory. Who’s flipping the coin? How trustworthy are they? Do they have anything to gain from winning the coin toss — and if so, how much? If the person doing the tossing is a stage magician, I’m more likely to think the coin is weighted, even thought weighted coins are generally rare. Ditto if they’re, say, Paul Newman in The Sting.

I don’t really have a conclusion to this story, except to say that this question, which at first seemed fairly straightforward, turned out to be a lot more interesting, more complicated, and more personally variable, than I’d imagined. Thanks to my Facebook friends for a great, thought-provoking conversation!

And yes — I have a peculiar notion of what constitutes “frivolous.”

Frivolous Fridays are the Orbit bloggers’ excuse to post about fun things we care about that may not have serious implications for atheism or social justice. Any day is a good day to write about whatever the heck we’re interested in (hey, we put “culture” in our tagline for a reason), but we sometimes have a hard time giving ourselves permission to do that. This is our way of encouraging each other to take a break from serious topics and have some fun. Check out what some of the other Orbiters are doing!

## 8 thoughts on “Frivolous Friday: The Coin Toss Problem”

1. 1

Deliberately weighted coins are quite rare, but naturally weighted ones are actually quite common – that is, the designs on many coins commonly in circulation lead to a slight bias, but only when the coin is allowed to come to a rest on a hard, smooth surface. This is due to the weighting only dominating when the coin spins before settling (resulting in a strong bias for it to land heavy-side down), and this can only happen on hard, smooth surfaces. If you catch a coin midair before it hits the ground, the bias evaporates. If you toss it onto carpet, it evaporates as well.

That being said, most coins that have a natural bias are biased toward tails, due to the fact that heads are circular and bulgy, which is likely to add more weight to the heads side of the coin. So in this particular question, it’s not likely that this is simply a result of the natural bias of a coin.

2. 2

I knew a guy who could flip a quarter to a precise height from his hand, catch at nearly the exact same point every time, and thus had near-perfect control over the results. If he started heads up, it would be heads when he slapped it on his wrist more often than statistics would allow. He learned the trick from his father, who used it to win bar bets.

If the person doing the flips is a stage magician, I’d watch to see if the flips are a little too similar for randomness.

3. 3

This question has really vexed me ever since you posed it. It’s an interesting CompSci problem, combining both statistics and massive data crunching. I’ve tried three or four different approaches, and only recently started to earn some success. While that promised blog post is still forthcoming, I can share some preliminary results.

If your barrier for “reasonably certain” is as high as you can reasonably put it, the odds of getting a biased coin are 1%, and “biased” means a 60/40 split, then 110 heads on a row are enough to be reasonably certain of bias. Lower the barrier, increase the prior of a biased coin, or increase the bias of that coin, and the number of flip will go down; at the other extreme, 6 flips are enough if the prior is 10%, “bias” means 85/15, and “reasonably certain” is in line with most published scientific research.

Your scenario is kinda contrived, though; the most biased of coins won’t come up heads 100% of the time. If we relax that constraint, things get REALLY complicated. Some empiric tests suggest you’ll need about 1,800 tosses in the extreme scenario above or 20 on the opposite end. I haven’t come up with an analytic solution yet, but I’m still plugging away.

All of the above is very “spherical coin,” admittedly. I’ve read studies which pointed out that a coin is intrinsically 51/49 biased, simply because it flips a small but finine number of times in the air. Another study asked students to try adjusting how they flipped coins to create bias; at best, they could generate a 65/35 split when handed a fair coin. I’ve also read an article about a researcher and amateur magician who trained himself to flip heads 10 out of 10 tries.

You question is really complex, under the surface.

4. 4

“…the most biased of coins wonโt come up heads 100% of the time.”

This does assume that you’re sticking to actual money issued by a government. The most biased of coins is a two-headed coin.

5. 5

“Ten heads in a row is wildly unlikely โ but weighted coins are rare, and the odds of having one in your pocket are also wildly unlikely.”

The probability of getting ten heads in a row is far greater than having a weighted or two headed coin. So if I were to bet on the next toss, I would calculate that it would be 50/50.

When I was about 13 years old, I obtained a two headed nickel . At that time I did not know the value of that coin! Oh well….

6. 6

This reminds me so much of when people talk about going against the grain. They’ll ask a permutation of, “Well if you were walking on a bridge and everyone else around you started jumping off, would you just jump too?”

I dunno. What if the bridge were about to collapse? What if there were a truck going full speed directly at us? Maybe I would jump in if it seemed like the most rational thing to do at the time! ๐

7. 7

This is a big problem in cryptography. Attempting to generate random numbers is actually quite challenging. And attempting to develop an auditable process for generating a random number even harder.

There are some ciphers which require a set of parameters to be generated for use by all the parties in a communication. These are called shared parameters. And it turns out that it might be possible for a malicious party to generate shared parameters with some sort of ‘backdoor’.

So for a period of about ten years various people attempted to set up various projects designed to generate genuinely random shared parameters. And the problem was that however good the process was on paper, there was no way of convincing people who didn’t attend that the process was fair. So now we use different, non random criteria.

All of which is a long way of saying that what people usually want from a coin toss is not an unbiased outcome but a provably fair choice. And there are better ways to do that than tossing a coin.

8. 8

(Relevant to the previous comment: http://www.xkcd.com/1170/)