## The Gambler’s fallacy is actually based on our experience

We don’t understand randomness very well. When asked to produce a random sequence we never produce enough repeating patterns thinking that they are less probable. This is the Gambler’s fallacy.  If heads come up 3 times in a row, the Gambler will bet on tails on the next throw   Why?  This reasoning is actually based on experience.

The following comes from a very interesting paper of a few years ago  [ Proc. Natl. Acad. Sci. vol. 112 pp. 3788 – 3792 ’15 ].  There is a surprising amount of systematic structure lurking within random sequences. For example, in the classic case of tossing a fair coin, where the probability of each outcome (heads or tails) is exactly 0.5 on every single trial, one would naturally assume that there is no possibility for some kind of interesting structure to emerge, given such a simple form of randomness.

However if you record the average amount of time for a pattern to first occur in a sequence (i.e., the waiting time statistic), it is longer for a repetition (head–head HH or tail–tail TT  (an average of six tosses is needrequired) than for an alternation (HT or TH, only four tosses is needed). This is despite the fact that on average, repetitions and alternations are equally probable (occurring once in every four tosses, i.e., the same mean time statistic).

For both of these facts to be true, it must be that repetitions are more bunched together over time—they come in bursts, with greater spacing between, compared with alternations (which is why they appear less frequent to us). Intuitively, this difference comes from the fact that repetitions can build upon each other (e.g., sequence HHH contains two instances of HH), whereas alternations cannot.

Statistically, the mean time and waiting time delineate the mean and variance in the distribution of the interarrival times of patterns (respectively). Despite the same frequency of occurrence (i.e., the same mean), alternations are more evenly distributed over time than repetitions (they have different variances) — which is exactly why they appear less frequent, hence less likely.

Then the authors go on to develop a model of the way we think about these things.

“Is this latent structure of waiting time just a strange mathematical curiosity or could it possibly have deep implications for our cognitive level perceptions of randomness? It has been speculated that the systematic bias in human randomness perception such as the gambler’s fallacy might be due to the greater variance in the interarrival times or the “delayed” waiting time for repetition patterns. Here, we show that a neural model based on a detailed biological understanding of the way the neocortex integrates information over time when processing sequences of events is naturally sensitive to both the mean time and waiting time statistics. Indeed, its behavior is explained by a simple averaging of the influences of both of these statistics, and this behavior emerges in the model over a wide range of parameters. Furthermore, this averaging dynamic directly produces the best-fitting bias-gain parameter for an existing Bayesian model of randomness judgments, which was previously an unexplained free parameter and obtained only through parameter fitting. We show that we can extend this Bayesian model to better fit the full range of human data by including a higher-order pattern statistic, and the neurally derived bias-gain parameter still provides the best fit to the human data in the augmented model. Overall, our model provides a neural grounding for the pervasive gambler’s fallacy bias in human judgments of random processes, where people systematically discount repetitions and emphasize alternations.”

Fascinating stuff