Publish AI, ML & data-science insights to a global community of data professionals.

Water Cooler Small Talk: Gambler’s Fallacy and Ruin

An intuitive and thorough explanation of gambling, luck, and risk to keep you from looking foolish

Photo by Amanda Jones on Unsplash
Photo by Amanda Jones on Unsplash

Water cooler small talk is a special kind of small talk, typically observed in office spaces, particularly around a water cooler. There, much like contemporary cavemen gathered around a fire, employees frequently gather and share all kinds of corporate gossip, myths, and legends, inaccurate scientific opinions, indiscreet personal anecdotes, or outright lies. Anything goes. So, in this post, I discuss a water cooler scientific opinion I overheard the other day that literally left me speechless.

Here’s the water cooler opinion of today’s post:

‘In a game of roulette, if you initially lose but have enough money to continue gambling – doubling your bet each time to cover all previous losses – you will eventually win. In other words, if you lose, say, 100 times, your luck is going to eventually turn around, and you’ll win – and this is supposedly a good strategy.’

🤪🎲

Intuitively, this idea might seem to make some sense but is wrong in so many different ways. In reality, it’s a terrible strategy – so terrible that there even are specific terms in culture and mathematics to describe just how misguided it is.

🍨 DataCream is a newsletter offering data-driven articles and perspectives on data, tech, AI, and ML. If you are interested in these topics subscribe here.


💸 Gambler’s Fallacy

The first level of the wrongness of this water cooler opinion is due to the Gambler’s Fallacy. The gambler’s fallacy, also known as the Monte Carlo fallacy, is the concept that something that has happened less frequently than anticipated in the past, is more likely to happen in the future, in order to even out the outcomes.

For instance, if we toss a fair coin 10 times and all 10 times we get tails, the 11th time we’ll most probably get heads, right? No, of course not. In reality, each coin flip is an independent event, and the probability of getting heads or tails remains 50% each time, regardless of the previous results.

Oh, but what about the law of large numbers? 🙄

The law of large numbers (LLN) states that as the number of independent random samples increases, the average of their results will converge to the true expected value, assuming it exists. That is, if we toss the coin a large number of times, the results are going to converge into getting tails 50% of the time and heads 50% of the time. However, the key phrase here is ‘large number’, which means a very large number – approaching infinity. If we tossed the coin an infinite number of times, for sure half of the times (what is the half of infinite though?) we would get heads. But we cannot actually toss it infinite times, or bet an infinite amount of money, can we? LLN is true and applies in gambling like rolling a dice or a roulette game, nonetheless, the convergence may start to appear after 10, 10,000, or 1 trillion tries – who knows? Our human minds, being as bad as they are at perceiving probabilities and randomness, struggle to understand that ‘large’ and ‘convergence’ can mean a bunch of different things, and cannot secure us with a deterministic result.

A somewhat similar concept is the ‘hot-hand fallacy’ – that is thinking that after a winning streak, a person is more likely to have another win. A typical example of the hot-hand fallacy is thinking that a basketball player who has won three shots is more likely to win a fourth shot. Nonetheless, similarly to tossing a coin, each basketball shot is an independent event, and the win/lose probabilities remain the same for each shot, regardless of the previous outcomes. Apparently, in basketball shots, the probability won’t be by default 50% but rather depends on the skill of the basketball player. Nonetheless, winning a couple of shots is a tiny sample that we cannot use to infer any conclusions about the nominal probability of each shot.

If we take a closer look, it is interesting to notice how contrasting the hot-hand fallacy and the gambler’s fallacy really are. This contrast effectively highlights the absurdity of our minds when it comes to statistics. Think about it:

  • In the winning streak of the hot-hand fallacy, consecutive wins indicate a higher probability of a win on the next try.
  • In the losing streak of the gambler’s fallacy, consecutive losses indicate a higher probability of a win on the next try.

🤷🏻 ‍♀️

Sounds very much like just projecting what we wish would happen next, and then rationalizing it as some kind of ‘statistics’. In any case, unlike in theoretical statistics, real-life concepts like the time and money of an individual, are finite. Thus, it is a rather foolish strategy to rely on the LLN evening out the outcomes of any probability-based game – tossing a coin, rolling a dice, roulette, or basketball shots.

💸 House’s Edge and Gambler’s Ruin

Apart from the gambler’s fallacy, said water cooler opinion is unfortunately wrong from an additional perspective. That is, the gambler’s ruin – the fact that a gambler playing a game with negative expected value will eventually go bankrupt, regardless of their betting system. In games like roulette, the player faces a negative expected value, meaning the house always has an advantage, also referred to as ‘house edge‘.

Let’s take a closer look into a simple red/black European roulette bet and why it has a negative expected value. European roulette has 18 red slots, 18 black slots, and 1 green zero. Now, let’s consider what happens if the player bets on red:

Player win probability for a red slot would be P(Win) = 18/37

Player loss probability for a black slot or zero would be P(Loss) = 19/37

Payout for winning is 1 (if the player wins, they receive 1 unit profit – the original bet is returned plus 1 unit profit).

Loss for losing is (-1) – (if the player loses they lose their entire bet).

So, the player’s expected value would be:

EV = ( P(Win) × Win Amount ) + ( P (Lose) × Loss Amount )

EV = (18/37 x 1) + (19/37 x (-1) )

EV ≈ −0.0270 or EV ≈ -2.70%

This negative expected value means that, on average, a player will lose about 2.7% of their total bet over the long run in every roulette spin. In other words, a built-in house edge means that the house will always have an advantage in the long term, and if a player keeps playing such a game with a negative expected value, they will almost certainly eventually go bankrupt.


We can further explore the gambler’s ruin concept by running a mini simulation in Python. Let’s assume a roulette player with an initial balance of 100 USD, aiming to double their money, thus, with a target balance of 200 USD. The player bets a fixed amount in each round (say 20 USD), and they are willing to play a fixed number of roulette rounds (say 20). As explained, the player winning probability is 18/37, and I also assume 20 simulations.

We can easily set up these parameters in Python, run a simulation, and visualize the results with matplotlib:

import random
import matplotlib.pyplot as plt

# Simulation parameters for a European roulette red/black bet (set A)
initial_balance = 100  # Starting amount for the player
target_balance = 200  # Target amount for the player
bet_amount = 20  # Amount bet per round
win_probability = 18 / 37  # Probability of winning on red (or black) in European roulette
num_simulations = 20  # Number of simulations to run
max_rounds = 20  # Maximum rounds per simulation

# Simulation
plt.figure(figsize=(10, 6))

for _ in range(num_simulations):
    player_balance = initial_balance
    balance_history = [player_balance]
    rounds_played = 0

    while player_balance > 0 and player_balance < target_balance and rounds_played < max_rounds:
        # Betting on red
        if random.random() < win_probability:  # Player wins
            player_balance += bet_amount
        else:  # Player loses
            player_balance -= bet_amount

        balance_history.append(player_balance)
        rounds_played += 1

    plt.plot(balance_history)

# Plot
plt.axhline(y=initial_balance, color='grey', linestyle='--', label='Initial Balance')
plt.axhline(y=0, color='red', linestyle='--', label='Bankruptcy (0)')
plt.axhline(y=target_balance, color='green', linestyle='--', label='Target Balance (200)')
plt.xlabel('Rounds')
plt.ylabel('Player Balance')
plt.title('Gambler's Ruin Simulation: European Roulette Red/Black Bet')
plt.legend()
plt.show()

Each colored line represents a different simulation run, the grey line represents the player’s initial balance, the green line represents their target amount and the red line represents bankruptcy. The game stops when the player goes bankrupt, doesn’t have enough balance for the next bet, or reaches the maximum number of rounds.

Image by the author
Image by the author

In this example, the player gets to play a small number of rounds, because the maximum number of rounds is set to be relatively small (just 20 rounds), and the bet amount is sufficiently large in comparison to the target amount (50 USD/ 200 USD). In other words, the player doesn’t get to play the game long enough in order for the gambler’s ruin effect to appear; in some simulations, the player goes bankrupt, in some others, they just reach the maximum game rounds, and in two simulations they even reach the target amount.

Nevertheless, if we appropriately adjust the simulation parameters to force the player to play a larger number of rounds, the results become much clearer. In particular, I ran the simulation again with the below parameters:

# Simulation parameters for a European roulette red/black bet (set B)
initial_balance = 100  
target_balance = 200 
bet_amount = 1  
win_probability = 18/37
num_simulations = 20  
max_rounds = 10000 
Image by the author
Image by the author

Even with occasional wins, the player has a high risk of going bankrupt over time, especially when continuously betting a fixed amount. The simulation demonstrates that the longer a player continues to play, the greater the likelihood of eventually losing all their money, aligning with the concept of Gambler’s Ruin.

💸 But what about doubling my bet?

What if we follow a different betting strategy, say for instance, double the betting amount each time we lose (aka Martingale betting strategy).🤪 By doubling the bet for each loss, our first win would recover all our previous losses plus win a profit equal to the original stake. Ah, what a great idea! The Martingale strategy makes some sense, given that it is certain that our luck will eventually turn around due to the LLN. Even if we are on a losing streak, we just need one win, in order to win back all of our original balance. Nevertheless, as already explained, this would also require an infinite number of rounds and an infinite budget – only in this case, Martingale is a winning strategy. Unfortunately, no real-life gambler has an infinite budget, so once again this is a rather foolish approach.

Our script can appropriately be adjusted to illustrate the Martingale strategy, using the first set of parameters.

# Simulation parameters for European roulette red/black bet with Martingale betting
initial_balance = 100 
target_balance = 200  
initial_bet_amount = 20  
win_probability = 18 / 37 
num_simulations = 20 
max_rounds = 20  

# Simulation
plt.figure(figsize=(10, 6))

for _ in range(num_simulations):
    player_balance = initial_balance
    bet_amount = initial_bet_amount
    balance_history = [player_balance]
    rounds_played = 0

    while player_balance > 0 and player_balance < target_balance and rounds_played < max_rounds:

        if random.random() < win_probability:  # Player wins
            player_balance += bet_amount
            bet_amount = initial_bet_amount  # Reset bet amount after win
        else:  # Player loses
            player_balance -= bet_amount
            bet_amount *= 2  # Double the bet amount after loss

        balance_history.append(player_balance)
        rounds_played += 1

        # Checking if the player can afford the next bet
        if player_balance < bet_amount:
            break 

    plt.plot(balance_history)

plt.axhline(y=initial_balance, color='grey', linestyle='--', label='Initial Balance')
plt.axhline(y=0, color='red', linestyle='--', label='Bankruptcy (0)')
plt.axhline(y=target_balance, color='green', linestyle='--', label='Target Balance (200)')
plt.xlabel('Rounds')
plt.ylabel('Player Balance')
plt.title('Gambler's Ruin Simulation with Martingale Strategy: European Roulette Red/Black Bet')
plt.legend()
plt.show()
Image by the author
Image by the author

Due to the doubling of the bet for each loss, many lines stop early before the bankruptcy line, because the player’s balance is not enough to cover the next (doubled) bet.

Then, using the second set of parameters in order to force a longer play we get an even more informative plot.

Image by the author
Image by the author

Notice how the simulation ends at 200 rounds, either resulting in bankruptcy or a target amount, even if the maximum number of rounds is set to be much higher. Martingale’s strategy is not forgiving at all – a single prolonged losing streak can wipe out the player’s entire balance, before ever landing a recovery win. While some lines reach the target balance, most do not. This demonstrates that while the strategy may produce short-term wins, over the long term, the risk of total loss is substantial. The longer you play, the more likely it is that a losing streak will occur, ultimately, resulting in bankruptcy. The sharp declines in balance show the effects of exponential bet growth when doubling after losses, which quickly leads to unaffordable bets and bankruptcy.

Again, all these are so arbitrary and emotionally charged, that there is even an anti-martingale betting strategy, in line with the hot-hand fallacy. According to the anti-martingale strategy, the player doubles their bet on wins, in order to get advantage of their winning streak or ‘hot-hand’. 🤷‍♀️ Overall, there isn’t much of actual statistics in any of these.

On my mind

Since our silly human minds struggle to grasp concepts like randomness, infinity, or probability, many of these gambling-related ‘statistics’, are really hormonal and emotional reactions. For instance, continuing to place double bets that eventually lead to bankruptcy, is kind of irrational, isn’t it? This kind of behavior can be interpreted as ‘escalation of commitment‘ – that is, maintaining behaviors that are irrational, but align with previous decisions and actions.

Dopamine – our ‘feel-good’ hormone – is primarily released not during the experience of pleasure itself, but in anticipation of it. That is, there is a dopamine spike in our brains when we see a gift-wrapped present, see the waiter at a restaurant bringing our dish, or hear the ding of a new text message. Similarly, a gambling addict experiences a dopamine spike right before they place a bet or pull the lever on a slot machine, not after they win; in fact winning or losing the bet is irrelevant to the dopamine release, which can be caused solely by the anticipation of a win. Hormonal and emotional reactions make it easy to rationalize irrational decisions and mask them as ‘statistics’.

There is no such thing as a ‘winning strategy’ for the gambler. In the long term the strategy of the casino is winning and the strategy of the player – whatever this may be – is losing. It is simply impossible to win in the long run even in a fair game with zero expected value, much more so in casino games like roulette, with negative expected value.

Loved this post?

💌 Join me on Substack or LinkedIn ☕, or Buy me a coffee!

or, take a look at my other water cooler small talks:

Water Cooler Small Talk: The Birthday Paradox 🎂🎉A l_ook at the counterintuitive mathematics of shared birthdaystow_ardsdatascience.com


Towards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program.

Write for TDS

Related Articles