[quick post publication note – one of my former students thought that I was a little too loose with my language with the kids in this project. He thought, quite fairly, that I needed to be clearer about the fact that it wasn’t just one trial that we were looking at, but rather looking at many rounds and the expected number of flips for HTT to appear the first time and the expected number of flips for HTH to appear the first time.

Sorry for not being clearer about that point in this post, but I’m glad to have people pointing out ways to make these posts better.]

Saw this incredibly interesting probability problem on Twitter yesterday:

If you click through to the Peter Donnelly Ted Talk video, you’ll see a discussion of the problem starting around 4:00.

I had a hard time getting my arms around Donnelly’s explanation of the answer to the problem, and ended up spending a couple of hours last night thinking of how to explain this problem to the boys. Eventually I decided a computer-based approach might be the most enlightening way since that would allow us to talk informally about the math and then see the results relatively quickly. It ended up being one of the more interesting projects that we’ve done in a while.

We started with a quick explanation of the problem followed by some neat discussion from the kids. It was really interesting to me to hear their thoughts about probability.

Next up we tried a little “coin flipping.” Except that we did some dice rolling because it is hard to see coin flips on camera. Even numbers were “heads” and odd numbers were “tails.” It took 5 rolls to get a HTH sequence and it took only 3 rolls to get HTT. The boys understood that one time looking for each sequence wasn’t enough to tell us what the expected value was, and suggested instead that we’d need an infinite number of trials – ha ha.

Because of the random luck of getting HTT in 3 rolls, I decided to take a little diversion to talk about the probability of that happening. Although this diversion made the project a little longer, I’m glad that we took a closer look at this situation since computing the probability of getting HTT in 3 rolls was a little bit confusion to the boys. The mathematical idea we are talking about here is independent events.

Next we switched over to a little computer program I wrote last night. I know that some people have strong feelings about Khan Academy, but their computer program interface makes it easy to share programs like this one – feel free to play around with it:

A simple little program for HTH and HTT

The first part of the video below is just me explaining the computer program. After a couple of minutes we begin using the program to analyze the coin flipping game. We start by looking at how often we get a match in round 3. From the calculations we did in the previous video we expect to find a match 12.5% of the time. That’s about what we find. We also find that we get a match on round 4 about 1/8th of the time.

Now we took a second diversion to take a closer look at getting a match on round 4. Again this exercise proved to be slightly confusing at fist, but the boys seemed to catch on fairly quickly. Their understanding led to a great discussion of what could happen on round 5. The reason round 5 is important is that’s the first time you see a difference between the two sequences:

Finally we returned to our computer program to look at what happens in round 5. We found that both sequences behaved more or less how our conversation from the prior video predicted (despite my incorrect calculation of 75% of 12.5 . . . sheesh).

After that we looked at how many flips we expect to have to do to find a match to each of our sequences. Unfortunately and super unluckily our camera ran out of storage in the middle of this discussion, so I had to break this discussion into two videos. Sorry about that 😦

So, a super fun project and a super interesting math problem. Thanks to Bob Lochel and Math Curmudgeon for sharing it!