Tuesday, September 15, 2009

Rosencrantz, Guildenstern & the gambler's fallacy



The opening of Tom Stoppard's play has Rosencrantz and Guildenstern  flipping coins and noticing that the 'laws of probability' seem to be suspended (you should check out the opening scene of the film here, or read the opening of the play here) - the coin always comes up heads. What the characters are experiencing certainly defies common sense, but perhaps it is common sense that is (at least in part) in the wrong.

A good question to ask is, would Rosencrantz and Guildenstern be as alarmed if the coin flips alternated exactly between heads and tails? They should be, but if their psychology is anything like most people's, it would probably take them longer to clue in to the problem. A 'perfectly fair' coin that alternates between heads and tails is just as absurd (and just as unlikely) as a 'completely unfair' coin that always turns up heads, but it seems to be closer to our expectations of how coins should behave.

In his book, Innumeracy, John Allen Paulos presents this problem (as a contest between Peter and Paul, rather than Rosencrantz and Guildenstern), and notes that most people, like our protagonists, expect coin flips to be evenly distributed between heads and tails (but perhaps not perfectly so).  Paulos sets up the problem like this:
Imagine two players, Peter and Paul, who flip a coin once a day and who bet on heads and tails, respectively. Peter is winning at any given time if there have been more heads up until then, while Paul is winning if there’ve been more tails.
Would you expect Peter or Paul to have a long winning (or losing) streak? Or would you expect them to usually alternate between being the winner (or loser)? Paulos continues:
Peter and Paul are each equally likely to be ahead at any given time, but whoever is ahead will probably have been ahead almost the whole time.
The false expectation that the results should more-or-less alternate in order to 'average out' is sometimes referred to as the (false) 'law of averages' or the gambler's fallacy. The (true) law of large numbers, which asserts that for a large samples the number of heads will be roughly equal to the number of tails, does not imply that a head becomes more likely after a string of tails, or vice versa.

The plots below show a game of 100 coin flips - the law of large numbers (regression to the mean) is apparent in the first plot, while the second plot, in which the number of tails is subtracted from the number of heads, shows no evidence for the law of averages (heads is ahead most of the time).




By undermining our expectation, this  simple experiment provides a moment of disequilibration, and, as Paulos suggests, it may help us realize that we shouldn't put too much emphasis on winning or loosing streaks in games, sport, finance, or life - they are a normal occurrence.

A Fathom file to explore the coin game simulation is here, and a completed file that includes plots and charts is here.