HH versus HT Pattern Expectations in Sequences of Coin Flips
This Demonstration considers a sequence of fair coin flips and computes the expected number of tosses until heads are immediately preceded by heads and similarly for the pattern. At first you might expect that those values must be the same, because the probability of getting a or after the first is the same. The theoretical values are and .[more]
See the histogram of the flips between and patterns. Use the the "random seed" slider to explore different random sequences.
Finally, you can set the "show cases" slider to 1 and change the "random seed" slider to observe which pattern comes first on average.[less]