Gambling has an undeniable allure—the thrill of a big win and the belief that with just the right strategy, you can beat the casino. But beneath the excitement lies a harsh mathematical reality: the odds are systematically stacked against you.
This is the essence of Gambler's Ruin, a statistical concept that explains why, inevitably, you will go broke.
The Betting Dilemma
Imagine two gamblers, Alvin and Cecilia, walking into a casino. Both start with $100.
- Alvin places small, repeated bets ($10).
- Cecilia is aggressive. She bets her entire $100 in a single round.
Who has a better chance of winning? The answer relates to Volatility and Expected Value.
Expected Value (EV)
Consider a "fair" coin toss where Heads = +$10 and Tails = -$10.
$$E[X] = (10 \times 0.5) + (-10 \times 0.5) = 0$$
This is a fair game. However, casinos introduce a House Edge. Suppose the casino pays only $9 for a win:
$$E[X] = (9 \times 0.5) + (-10 \times 0.5) = -0.50$$
This means you lose an average of $0.50 per bet.
The Law of Large Numbers
The Law of Large Numbers (LLN) states that as the number of trials increases, the actual results converge to the expected value.
$$E[X] = \frac216 = 3.5$$
import numpy as np
import matplotlib.pyplot as plt
def simulate_dice_rolls(n=10000):
rolls = np.random.randint(1, 7, n)
avg = np.cumsum(rolls) / np.arange(1, n + 1)
return avg