Random walks and gambler’s ruin
PROB · Chapter 413 min readAsked at SIG, Jane Street, Citadel, Optiver
Assumes Conditioning: the tower property.
After this lesson you should be able to
- Set up and solve a boundary problem as a system of equations in the states.
- Quote the gambler’s ruin result for both a fair and a biased game.
- Use a martingale argument to get hitting probabilities in one line.
A surprising number of interview problems are a walk between two absorbing barriers wearing a disguise: two ants on a shape, a gambler with a stack, a trader with a stop-loss. Once you see the states, the method is always the same — write one equation per state and solve.
Definition 4.1
The object
Simple random walk, — A position that moves up one with probability and down one with probability at each step. Absorbing barriers are values at which the walk stops.
Proposition 4.2
The method, every time
Let be the probability of the outcome you want, starting from state . Write the boundary conditions, then one equation per interior state by conditioning on the next step. Solve the system. This works whether the states are money, positions on a graph, or anything else finite.
Holds when
- The states must be a complete description — if the answer depends on history, you have not found the right state variable.
- Boundaries are where the process stops: and are known, not unknown.
Derivation 4.3
The fair game
With , the recursion says each state is the average of its neighbours — which forces the solution to be a straight line.
Equal increments, so the solution is linear in .
Why the fair answer is your share of the stack. The walk is a martingale, so your expected final wealth equals your starting wealth. You end at either or , so , giving immediately. That is the optional stopping theorem doing in one line what the recursion does in three.
Equation 4.4
The biased game
The probability of reaching before , starting from , when each step is up with probability .
- The odds against you per step. recovers the fair case .
- The combined stack — your money plus the opponent’s.
Example 4.5
The SIG version
Your opponent has and you have . Each round you both stake a dollar; you win each round with probability . You play until someone is broke. What is the probability you win?
Show the worked solutionHide the worked solution
Worked solution
- Formula
- Substitute
- Solve
- Answer
Sanity check. Above , which is what a fair game would give from a one-in-three share of the stack, but well below — being the better player does not compensate for being short of capital.
- Reaches — 10 of 100
- Goes broke first — 90 of 100
The rest of this lesson is in Premium
You have read the opening. 12 more sections follow, including 5 worked examples and 3 quick checks.
Nothing is charged for 7 days, and you can cancel before then. Or read Arithmetic that survives a clock in full, free.