Simulation and Modeling

Random Walks and the Gamblers Ruin Intuition

Understand random walks as a model of cumulative luck, why swings grow with the square root of time, and what gambler's ruin says about limited funds.

On this page
  1. Luck as a running total
  2. What a fair random walk does
  3. Streaks are normal, not a signal
  4. Adding a boundary: gambler’s ruin
  5. A small house edge changes the picture
  6. What the model suggests about behavior
  7. Simulating a walk yourself

Luck as a running total

Imagine a simple game in which you win one point or lose one point on each round, with equal chances. Keep a running total. After each round the total goes up one or down one. Plotted over time, the total drifts up and down in an irregular line. That path is a random walk, and it is one of the most useful pictures in probability for thinking about cumulative luck.

The model is deliberately plain. It ignores strategy and rule details and keeps only the essential feature: small random changes that add up. Even so, it explains several things that surprise people.

What a fair random walk does

For a fair walk, the expected total after any number of rounds is zero. At each step there is no push in either direction. Yet the walk does not stay near zero. Its typical distance from the start grows as the number of steps grows, in proportion to the square root of the number of steps. The standard deviation of the total after n steps of plus or minus one is the square root of n.

Some numbers to check:

  • After 100 steps the typical distance from zero is about 10.
  • After 10,000 steps it is about 100.

Notice that 100 times more steps gives only 10 times more spread. So the walk spreads out, but slowly. Relative to the number of steps, the result looks more and more balanced (10 out of 100 is 10 percent; 100 out of 10,000 is 1 percent), which is consistent with the law of large numbers, even while the raw gap in points keeps growing. The law says averages settle, not that the running difference returns to zero.

Streaks are normal, not a signal

Random walks produce long stretches on one side of zero. A path can stay positive for hundreds of steps and then dip negative, with nothing “due” to correct it. This is a main reason people see patterns in luck that are not there. The hot hand belief and the gambler’s fallacy both come from reading meaning into stretches of a walk that are ordinary random wandering. Each step is independent of the last, so the walk has no memory that could pull it back.

Adding a boundary: gambler’s ruin

Now add a real-world constraint: you start with a limited amount, and the game stops if you hit zero. This turns the walk into the classic gambler’s ruin problem. Zero is an absorbing barrier, the way the finish square is in a board game: once you reach it, the walk ends.

Take a fair game, one unit staked per round, even chances. Suppose you start with a units and decide to stop when you reach N units. The probability of reaching N before reaching zero is a / N. Two checks:

  • Start with 10, target 20: chance of reaching the target first is 10/20 = 0.5.
  • Start with 10, target 100: chance is 10/100 = 0.1.

The second result is worth noticing. Even in a perfectly fair game, a modest starting amount aiming for a large target is far more likely to end in ruin than success. The chance is nine in ten, because the walk has a long way to go and the barrier at zero is close.

A small house edge changes the picture

Real games with a house edge are not fair. Suppose, purely as an illustration, that you win each round with probability 0.49 and lose with probability 0.51. That is a small tilt, and the expected change per round is -0.02 units, a negative expectation.

Using the standard gambler’s ruin formula with the same example, start 10 and target 20, the chance of reaching 20 before zero drops from 0.50 to about 0.40. A one-point tilt in each round already costs about ten percentage points in this short race. Over longer horizons, the effect compounds, since each round slightly favors the house and the walk drifts downward on average.

Two lessons follow. First, the drift of a walk with a house edge eventually dominates its random wandering; long play tends toward loss. Second, with a limited bankroll, the chance of ruin is real even in a fair game. That is the intuition behind the risk of ruin and why bankroll concepts matter in risk education. The numbers here are illustrations, not odds for any real game, and none of this offers a way to win money.

What the model suggests about behavior

  • There is no recovery mechanism. Because steps are independent, a losing run does not make a win more likely. Chasing losses by raising stakes does not change the odds, and it speeds up ruin by making the walk’s steps larger relative to the funds available.
  • Higher stakes mean wider swings. If each step is ten units instead of one, the same number of rounds spreads out ten times as far, which is why volatility matters alongside average return.
  • Stopping rules cannot beat a negative drift. Choosing “when to quit” changes which outcomes you see, but not the average, which stays negative in a game with a house edge.

If gambling is a source of stress or financial trouble, a local support service is a better resource than any model. Setting spending limits in advance is a sensible response to the lesson that fair randomness can still wipe out a small bankroll.

Simulating a walk yourself

A random walk is easy to explore with a simulation. Start at a fixed value, add plus or minus one for each simulated round, and stop at zero or at a target. Run it a few thousand times and count how often it reaches each end. Compare the result to a / N for a fair game. The agreement is a good check that your code is right, and then you can experiment with tilted probabilities to watch the effect of an edge. Results from a finite number of runs carry sampling error, so expect the counts to differ slightly from the formula each time.

The random walk strips luck down to its bare structure: independent steps, accumulating totals, and sometimes a floor underneath. That is enough to explain why swings are bigger than people expect, why streaks need no special cause, and why limited funds make ruin a live possibility.

The complete guide to simulation and modeling

Monte Carlo Simulation for Game Odds: A Starter Guide
Read the guide

Keep exploring

Guides from other topics

All topics →