Last semester, my university put on a production of Tom Stoppard’s play Rosencrantz and Guildenstern Are Dead that got me thinking about the likelihood of flipping a lot of heads in a row. I wrote about it on my other blog, Roots of Unity.
Around the time I saw the play, I read two blog posts about long runs of heads. Ben Orlin of Math with Bad Drawings wrote about The Swindler’s Coin. It is an imaginary dialogue between a teacher and student in which the teacher, who tells the student that he is flipping a fair coin, gets 30 heads in a row. The student, who believed that the coin was fair, finally accuses the teacher of using a swindler’s coin, and the teacher admits it. The post points out the naiveté with which we often teach probability.
“Some probability texts ask a similar question: ‘If a fair coin is tossed 50 times, and comes up heads each time, what is the probability that it comes up heads on the 51st toss?’ The ‘correct’ answer is ½. A fair coin always has a probability ½ of coming up heads, because that’s how we define ‘fair.’
“But guess what? If a coin comes up heads 50 times in a row—a 1-in-a-quadrillion event—then that ain’t no fair coin. The question could be paraphrased: ‘If I tell you a coin is fair, and then overwhelming evidence accumulates to the contrary, would you still believe me?’ And the ‘correct’ answer would be: ‘Yes, because I never reconsider my assumptions.'”
“The other day I heard someone say something like the following:
“‘I can’t believe how people don’t understand probability. They don’t realize that if a coin comes up heads 20 times, on the next flip there’s still a 50-50 chance of it coming up tails.’
“But if I saw a coin come up heads 20 times, I’d suspect it would come up heads the next time.
“There are two levels of uncertainty here. If the probability of a coin coming up heads is θ = 1/2 and the tosses are independent, then yes, the probability of a head is 1/2 each time, regardless of how many heads have shown before. The parameter θ models our uncertainty regarding which side will show after a toss of the coin. That’s the first level of uncertainty.
“But what about our uncertainty in the value of θ? Twenty flips showing the same side up should cause us to question whether θ really is 1/2. Maybe it’s a biased coin and θ is greater than 1/2. Or maybe it really is a fair coin and we’ve just seen a one-in-a-million event. (Such events do happen, but only one in a million times.) Our uncertainty regarding the value of θ is a second level of uncertainty.”
In Rosencrantz and Guildenstern Are Dead, the title characters flip heads more than 90 times in a row. I think Ben Orlin, John Cook, and I can all agree that they should probably take a second look at those coins!
Whenever I think about long runs of heads or tails, I remind myself that any individual string of n flips is exactly as likely (or unlikely) as any other individual one (if the coins are truly just as likely to come up heads as tails). But if someone says she flipped either 10 heads in a row or HTHHTTTTHT, you’re going to say the second one is more likely. Shecky Riemann wrote a post about a similar idea with rolls of a die. One interesting side note is that while any two individual strings of the same length are equally likely, true randomness looks different from human attempts at randomness. Justin Lanier mentioned this in a post on Math Munch, and Jim’s Random Notes fleshes this idea out a bit.
“Not only are people terrible at perceiving randomness, they’re also terrible at generating randomness. Asked to flip a coin 100 times and write down the results, many college students will ‘cheat’ and forego flipping the coin. They’ll just write down what they think is a random sequence. It’s usually easy to catch them because the idea of run of four or five tails just seems ‘not random.’ But getting five heads or five tails in a row is very common given 100 flips of a fair coin.”
He wrote a program to figure out how common different length runs are if you flip a coin 100 times. “If you play with the program a bit, you’ll find that runs of six tails happen more than half the time, runs of seven happen about a third of the time, and you’re twice as likely to get a run of 10 than not get a run of four.” I was definitely surprised about that!
Finally, Ask a Mathematician/Ask a Physicist explores whether “If you flip a coin forever, are you guaranteed to eventually flip an equal number of heads and tails?” The physicist takes a probabilistic look at the question and concludes that the answer is yes, but I would argue that with a literal interpretation of the question, the answer is no. I can easily invent infinite series of +1’s and -1’s such that no partial sum is 0.