## Gambler’s fallacy fallacy?

The gambler’s fallacy is the belief that roulette wheels, dice, etc., have “memory,” so that, for example, having observed an unlikely streak of losses, the probability that the next outcome will be a win has increased, as a correction toward the expected long-term trend. The Wikipedia page provides a good example involving repeatedly flipping a fair coin:

“If after tossing four heads in a row, the next coin toss also came up heads, it would complete a run of five successive heads. Since the probability of a run of five successive heads is [only] 1/32, a person might believe that the next flip would be more likely to come up tails rather than heads again. This is incorrect and is an example of the gambler’s fallacy.”

That is, having observed a streak of four heads in a row, we are actually just as likely to observe heads again on the subsequent fifth flip as we are to observe tails. Similarly, even after betting on red at the roulette wheel and losing four times in a row, we should still expect to win a fifth such bet on red the same stubborn 18/38 of the time (assuming a typical double-zero American wheel).

Right?

So, here is what I think is an interesting puzzle: let’s play a game. I will flip a fair coin $n=100$ times, and prior to each flip, if you have observed a current streak of $s=4$ or more consecutive heads, then make a note of the outcome of the subsequent flip. After all 100 coin flips, tally the noted “streak-following” flips: if there are more heads than tails, then I pay you one dollar. If there are more tails than heads, then you pay me one dollar. (If there are an equal number of heads and tails, then we push.)

If the gambler’s fallacy is indeed a fallacy, then shouldn’t this be a fair bet, i.e., with net zero expected return? But I claim that I have a significant advantage in this game, taking more than 15 cents from you on average every time we play! Following a streak of heads, we expect to observe a much larger proportion of “trend-correcting” tails than “streak-extending” heads.

And there is nothing special or tricky about this particular setup. Try this experiment with a different number $n$ of coin flips, or a longer or shorter “target” streak length $s$, or even a roulette-like bias on the coin flip probability. Or instead of focusing only on streaks of consecutive heads (i.e., ignoring streaks of tails), look for streaks of either $s$ or more heads or $s$ or more tails, and note whether the subsequent flip is different. The effect persists: on average, we observe a larger-than-expected proportion of outcomes that tend to end the streak.

This entry was posted in Uncategorized. Bookmark the permalink.

### 10 Responses to Gambler’s fallacy fallacy?

1. wilmington says:

Do you have a simulation program that you could post?
Are the results sensitive to the particular pseudo random number generator?
Could pseudo random number generators themselves be the issue?

2. Robert says:

Let me guess…when a streak of s>=4 appears at, say 97th flip, if 98th is trend-correcting，the game finished. If it is streak-extending, game continue.

3. Łukasz says:

I think the game is unfair because we take only consecutive streaks of heads only. In this case if the streak is longer than 5 then you win twice or even more times for every long streak. If there is a long streak of tails then it does not matter.
I was surprised by last paragraph though. Especially: `The effect persists: on average, we observe a larger-than-expected proportion of outcomes that tend to end the streak.`
I checked it with simple program and probability always goes to 50% as I would expect. Are you sure about that?

• When you say that your program indicates that “probability always goes to 50%,” what probability is being estimated/calculated? Note that the game described in the post has *three* possible outcomes: win (the number of noted heads is greater than the number of noted tails), lose, or push.

Also, in the modified experiment described in the last paragraph, there is an important detail: after each streak of s identical flips (either s heads or s tails), we note whether the subsequent flip is *different*, i.e., whether it “ends the streak” (call this +1) or “extends the streak” (call this -1). Add up the +1/-1 values over the course of the 100 flips, and win if the total is positive, lose if it’s negative, push if it’s zero. (This is not the same as scoring +1 for *heads* and -1 for *tails*. This is part of why I think this problem is interesting; it is not obvious that these two different games should yield different expected returns.)

4. Robert says:

Simplified version:

Two flips only.

If the first flip is Tail, end of the game, result=Tail more (50%)

If the first flip is Head, one more flip, result=HH, Head more (25%) and HT Push(25%)

So, 50% +1, 25% +0, 25% -1,,,but overall, total number of H,T are the same.

5. wilmington says:

Nice explanation, Robert. I had to unroll it for myself. Let me do so for others. (more words, your idea)

Suppose that we have seen our streak of s = 4 heads and that only two flips remain. To this point we’ll assume that the number of head and number of tail ending streaks are equal. Or set the number of flips to 6 so that we know that no streaks have yet ended.

Then, if next flip is tails, it is no longer possible to start another streak. So, whether the final flip is heads or tails, that sequence ends having seen more tails following a streak of heads than having seen more heads following a streak.

Now consider if the next flip is heads.

If the final flip is a head, then we’d have 2 more heads ending streaks of heads than tails ending streaks. But that counts for only one bet settlement. The extra head is in some sense wasted.

If the final flip is a tail then a head would have ended one streak and a tail would have ended another resulting in a push.

In summary the final two flips and bet results are:
TH -> more tails ending streak.
TT-> more tails end streak.
HT -> push.

Thus 2 ways to have more tails ending a streak, 1 way to have more heads ending the streak and 1 way to have a push.

Bonus question: How does this result in the 15 cent per game advantage?

• Great description, particularly the “extra heads is in some sense wasted.” And I think the “bonus question” is key. That is, the above argument, particularly the assumption “that the number of head and number of tail ending streaks are equal” near the end of the sequence, seems like it should follow independent of the target streak length s. But larger s, even leaving n fixed, yields significantly larger advantage.

6. Kaz says:

This sounds to me like two different questions.

“Will this one particular toss be T or H” has the answer: 50% chance of either, independent of other flips.

The other question is “How clumpy is the distribution that comes out of this RNG” which is an interesting question indeed but also it suddenly seems much less paradoxical when considered in that light. And now I’m more curious what the histogram of “lengths of streaks” is and how that changes as number of tosses increases. And how, if the “clumpiness” changes, how that would affect the outcome of the “fair bet.”

Does that make sense or am I missing something?

• You mention (pseudo-) random number generation; I should clarify that the phenomenon described in the article is not an RNG side effect of a particular computer implementation of simulated coin tosses. The effect is purely mathematical, so to speak– that is, the advantage described would be realized even if we wagered on flipping actual coins.

The “clumpiness” of purely iid Bernoulli trials is indeed a critical part of what’s going on, though. See this paper for a good overview of calculations of distributions of “run lengths.” I’ll follow up shortly with more details in another brief post describing motivation/context for this puzzle.

7. Pingback: The hot hand | Possibly Wrong

This site uses Akismet to reduce spam. Learn how your comment data is processed.