Yesterday I watched a talk at TED website, given by Oxford mathematician Peter Donnelly. The main focus of the 21 minute talk was statistics, uncertainty and probability, with the emphasis on the common tendency of human to fail interpreting statistical data and how intuitive approach to the easiest probabilistic matters yield to wrong results with some striking examples.
It is probably a common example among mathematicians, but I found this example interesting nonetheless:
Person A tosses a coin until she reaches the “head tail head” pattern once in a row, and Person B follows the same procedure but the pattern she looks for is “head tail tail” instead. Then they count the number of tosses they needed to reach that HTH or HTT combination.
Suppose they repeat this procedure a million times(yuck!) and then average the number of tosses needed to reach the destination pattern. Assuming the coins are identical and they really give us random results in each toss, we then compare these averages for HTH and HTT patterns.
The intuitive approach to such a problem would direct most of us to say “blah, the averages should be equal!” as heads and tails have equal probability and if we are looking for patterns of three, the organization patterns should not really matter. But that is not the case.
In reality, it is easier to achieve a HTT pattern than the HTH pattern. Donnelly summarizes as follows:
Each pattern starts with H and T so the probabilities for HT combo are equal. The twist is in the last toss. After the HT combo, if we are aiming for HTH but reach T instead in the last flip, we’d then need to start over and flip another three, as the sequence needs to start with an H. But if we were to aim the HTT pattern, after the HT combo if we reach T, then the tossing is over. But if we reach at H, then we wouldn’t need to start over as in the HTH case because the last toss is a H and we are then at 1/3rd of the road already, we’d need just another TT.
Since this is an easy case to simulate, I quickly wrote a Python script to see if that was the case. To be exact, the HTH pattern needs an average of 8 tosses(after the initial 2) and the HTT pattern needs an average of 6 tosses.
Since I mangle with probability a lot in my music, I found the case interesting and wanted to experiment. Found out that the HHH/TTT pattern needs an average of 12 tosses and the HHT/TTH pattern needs 6. The first calculations were carried out with the pseudo-random number generator in Python, but since these operations rely on true randomness, I also tried a few with the help of online Quantum Random Bit Generator Service, and the results were the same.
I find simple things that confuses people interesting.