Treebeard's Stumper Answer

World Record Breaking Stumper
At Dunn Middle School, we all thought of our beloved teacher Cynthia visiting Boston last week just in time for "the storm of the century." Sure it's a short century so far, but what are the odds? That has me wondering about breaking records and expecting the unexpected. Try flipping a coin 100 times. How often can you expect to break a record in the greatest number of consecutive heads and tails in a row? Your first flip is automatically a record of one, but how many more records will you set? What if you double the number of flips? Weather and sports records are more interesting to think about.
Boston, February 2003, just in time for an extreme blizzard and a long way from California. I asked my fellow DMS teacher Cynthia Carbone Ward for a photo from her trip. She obliged with the comment "I like the way the car is completely buried, and there's something forlorn about the bicycle..." I mostly wanted this photo so I could link it to Cynthia's beautiful Zacate Canyon website featuring her remarkable photos, interviews, and writing. What are the odds of encountering recordbreaking weather on your next trip? It's easy to flip a fair coin many times and count the longest runs of heads and tails. I'll try a real experiment at school, and write a BASIC program if I find time, and think about the math. There are real questions here about risk and coincidence!
Sports and weather records are more complicated. I have some local Santa Barbara weather data on my Santa Barbara Rainfall page, and more links at my Water Stress (18 Oct 2002) and Rain or Shine (5 Jan 2001) stumpers. Are these records really different from flipping a coin?
It is prudent to expect the unexpected. We did a science experiment flipping coins 100 times. Our average longest run was 8 heads or tails in a row. Three groups had runs of 15, but I'm suspicious of lazy flips. I asked a few kids to fake the results, and their average run was only 5. The lesson is that even with random events, we should expect to be surprised. The Oakland A's won 20 straight games last year, and we had record rainfall and drought in the last decade in Santa Barbara. This raises interesting questions about coincidence, risk, fame, and trends!
Notes:
I realize there are several ways to understand this stumper. For example, does a run of four heads also count as a run of three? I figure the initial run of three might set a record and then the next head will extend the record one more. So the total number of records is given by the sum of longest runs of heads and tails.
I haven't had time to write a computer program, but we did a real experiment in my science classes at Dunn Middle School, and we flipped lots of coins. The kids divided into pairs, one to flip and one to record.
Each team flipped a coin 100 times and recorded the outcome as a string of Ts and Hs on a data form that I swiped (and modified) from Karen Benbury's "How Many Heads is Enough?" (PDF).
Kids then used a highlighter to mark all the heads, which makes it much easier to tally all the runs of heads and tails.
I did it too. The result of one of my 100flip trials looks like this.
H T H H T H T H H H H H T H T H H H T T T T T H T T H H H H H T T T T H H H H H H H H T H H T H T H H T H T T H T T H H H H T T H T T T H H H H T H T H H H T H H H T H T H H T T H H T T H T T H T T T Now it's time to count heads and tally the runs of every length, top to bottom, wrapping around from right to left. Highlighting one or both outcomes makes it much easier to count! This example begins: 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 3, 5, 1, ...
If I counted right, I end up with this data for my 100flip trial:
Run Frequency Table (100 flips)
Length Count 1 26 2 12 3 5 4 3 5 3 6 0 7 0 8 1
Number of heads: 57 Total number of runs: 50 Length of longest run: 8 Average run = 100 / 50: 2.0 It's easy to make a mistake counting the runs, but there's a simple check. Just add up length times count for each line in the table, and the result must equal 100 (why?): (1x26) + (2x12) + (3x5) + (4x3) + (5x3) + (8x1) = 100.
Here's our school results from all 30 trials. That's 3,000 real coin fips!
All Runs Frequency Table (30 x 100 flips)
Length Count Count/2 Percent Longest Run 1 763 763 25.4% 0 2 386 382 12.9% 0 3 187 191 6.4% 0 4 92 95 3.1% 0 5 51 48 1.7% 3 6 30 24 1.0% 6 7 11 12 0.4% 7 8 8 6 0.2% 7 9 1 3 1 10 4 2 4 11 0 1 0 12 0 0 13 0 0 14 0 0 15 3 0.1% 3
Average number of heads: 50.9 Average longest run: 8.0 I love how unexpected patterns become obvious through repetition. Powers of two dominate here. About 1/4th of all runs have a length of one. The number of longer runs is remarkable close to repeatedly dividing the first number by two. I reckon it makes sense that successive runs are each about half as likely of the one before. If you have a run of four heads, there is a 50/50 chance that it will become a run of five. This suggests a recursive solution to the general math problem. I don't have time to explore the deep math right now, but there are links below.
By the math, we should expect a longest run of about log_{2}(n) heads or tails when flipping n coins. That's the closest power of two to the total number of flips. For n=100, that comes between 6 and 7, since 2^{6}=64 and 2^{7}=128. Our results were a bit more, but I still suspect lazy flips!
I randomly picked one group in each of my four classes to fake their data and make up a run of heads and tails. The longest fake run was five heads or tails in a row. I understand that it feels wrong to make up longer runs. The average in our real trials was eight heads or tails in a row. I'm still skeptical of those three runs of 15, but there they are. What are the odds?
There's a folklore of coincidence that seems incredible, like this from the NY Times (11 Aug 2002):
For instance, although the numbers 9/11 (9 plus 1 plus 1) equal 11, and American Airlines Flight 11 was the first to hit the twin towers, and there were 92 people on board (9 plus 2), and Sept. 11 is the 254th day of the year (2 plus 5 plus 4), and there are 11 letters each in "Afghanistan", "New York City", and "the Pentagon" (and while we're counting, in "George W. Bush"), and the World Trade towers themselves took the form of the number 11, this seeming numerical message is not actually a pattern that exists but merely a pattern we have found. After all, the second flight to hit the towers was United Airlines Flight 175, and the one that hit the Pentagon was American Airlines Flight 77, and the one that crashed in a Pennsylvania field was United Flight 93, and the Pentagon is shaped, well, like a pentagon.Our simple school experiment flipping coins shows that we don't expect the unexpected nearly enough. Our risk perception is also skewed away from real everyday risks like driving your car and eating fatty food that could impact you more than acts of terrorism. These misperceptions could change the world for the wrong reason.
Here are some Web links for your own research on this stumper.
 I want to understand the math behind this stumper, but it's not easy, and I'm out of time again this weekend. This would be another good probabilty science fair project like my Secret Santa project last year! There's some real math at Eric Weisstein's MathWorld, and it's discussed in the Ask Dr. Math archives here and here. There's a mathematical discussion of sports winning streaks that analyzes the Oakland A's 20 game winning streak here. There's more talk about setting records here and here. Ken White's Coin Flipping Page let's you flip a virtual coin on the Web, but it's easier to flip your own penny! The Dartmouth Chance! website has lots of good stuff, including an article on the similar Bathroom Tiles Problem and a complete collegelevel Introduction to Probability textbook.
 Martin Gardner (with tongue in cheek) encouraged the legacy of coincidence stories with his Scientific American articles featuring Dr. Matrix and his essay on "Coincidence" reprinted as the first chapter of the collection Knotted Doughnuts (Freeman, 1986). Some of it is here.
 Maybe flipping a coin really isn't as random as we think? I balanced 33 pennies on the edge of my desk at school. It took three days for them all to fall over with random bumps, and only seven landed as tails. Why did 80% of the coins end up heads? Try it yourself! There's some discussion at Ivars Peterson's MathTrek  A Penny Surprise.
 There is interesting discussion of risk perception (as opposed to real risk) in these recent NY Times and Washington Post articles.
 The connection with local weather records (and global warming) is interesting enough to continue in my next stumper!
Back to Stumper
Last modified .