Gambler's Ruin for a Fair Coin and a Biased Coin

A fair coin gambler reaches a target with probability equal to the starting stack over the target, and a small edge against the gambler cuts that sharply.

For a fair coin, a gambler starting with i dollars who bets $1 at a time until reaching a target of N dollars or going broke reaches the target with probability exactly i divided by N. For a biased coin with win probability p different from one half, that probability instead depends on the ratio of the losing probability to the winning probability raised to a power, and small unfavorable edges shrink the success probability far faster than intuition suggests.

A gambler starts with i dollars, where i is somewhere between 0 and N, and repeatedly bets $1 on a coin. A win adds $1 to the stack and a loss subtracts $1. The game ends the moment the gambler reaches N dollars, called success, or reaches 0 dollars, called ruin. The question asks for the probability of success as a function of i, N, and the win probability p on each bet.

Let W of i denote the probability of eventually reaching N before reaching 0, starting from a stack of i dollars, under a fair coin with p equal to one half. Conditioning on the outcome of the very next bet gives W of i equals one half times W of i plus 1, plus one half times W of i minus 1, for every i strictly between 0 and N, with boundary conditions W of 0 equals 0 and W of N equals 1.

This recursion says W is a linear function of i, since the equation W of i equals the average of its two neighbors is exactly the discrete condition for linearity. A linear function satisfying W of 0 equals 0 and W of N equals 1 must be W of i equals i divided by N, and this is the unique solution. So a gambler starting with $30 aiming for $100 under a fair coin succeeds with probability 30 divided by 100, or 30 percent, regardless of any detail of how the betting proceeds along the way.

Now let p be the probability of winning each bet and q equal to 1 minus p be the probability of losing, with p not equal to one half. The same conditioning gives W of i equals p times W of i plus 1, plus q times W of i minus 1, whose general solution has the form W of i equals A plus B times the quantity q divided by p, raised to the power i, for constants fixed by the same two boundary conditions.