## Coin toss visualisation

A while back, while working with probabilistic forecasting, I watched this TED video

where some issues regarding common misconceptions of probability and randomness are mentioned.

One of which is: a coin toss is random, therefore any patterns of heads or tails must appear equally frequent. One example mentioned in the talk was that of heads-tails-heads and heads-tails-tails (HTH & HTT) patterns and how one is more likely to encounter HTT first, when tossing a coin repeatedly.

6998 cointosses in sequence:

Just the Heads of the sequence:

Tails, approximately 3500 of each:

Counting the appearances of “Heads Tails Heads” and “Heads Tails tails”, which appear in equal numbers:

Even though each sequence appear in equal numbers in total,

HTT is likely to appear first due to clustering of HTH’s:

To conclude:

The probability of getting either heads or tails when tossing a coin is 1/2.

The probability of getting a sequence like heads tails heads (HTH) or heads tails tails (HTT) is 1/2 x 1/2 x 1/2 = 1/8.

Due to differences in distribution, the average number of tosses to get HTT is 8 and for HTH 10.http://oostring.com/wordpress_mainsite