Gambler's ruin

The basic meaning of gambler's ruin is a gambler's loss of the last of his bank of gambling money and consequent inability to continue gambling. In probability theory, the term sometimes refers to the fact that a gambler will almost certainly go broke in the long run against an opponent with much more money, even if the opponent's advantage on each turn is small or zero.

Coin flipping
Consider a coin-flipping game with two players where each player has a 50% chance of winning each flip. After a flip the loser transfers one penny to the winner. The game ends when one player has all the pennies. If there is no other limit on the number of flips, the probability that the game will eventually end this way is 100%. If player one has n1 pennies and player two n2 pennies, the chances P1 and  P2 that players one and two, respectively, will end penniless are:


 * $$P_1= \frac{n_2}{n_1+n_2}$$
 * $$P_2= \frac{n_1}{n_1+n_2}$$

It follows that the player that starts with fewer pennies is most likely to fail. Even with equal odds, the longer one gambles, the greater the chance that the player starting out with the most pennies wins. However, this does not imply positive expected value for the richer player since, for each complete game (many flips) that the richer player loses, he will forfeit more pennies than his poorer playmate.

If the coin is not fair, such that player 1 wins each toss with probability p, and player 2 wins with probability q = 1-p < p, then


 * $$P_1= \frac{1-(\frac{q}{p})^{n_1}}{1-(\frac{q}{p})^{n_1+n_2}}$$
 * $$P_2= \frac{(\frac{q}{p})^{n_1}-(\frac{q}{p})^{n_1+n_2}}{1-(\frac{q}{p})^{n_1+n_2}}$$

Casino games
A typical casino game has a slight house advantage. The advantage is the long-run expectation, most often expressed as a percentage of the amount wagered. In most games, this edge remains constant from one play to the next (blackjack being one notable exception). If the long-run expectation is expressed as a percentage of the amount that the player starts with, however, then the cumulative house advantage increases the longer the player continues.

For example, the official house advantage for a casino game might be 1%, and thus the expected value of return for the gambler is 99% of the total capital wagered. However, this calculation would be exactly true only if the gambler never re-wagered the proceeds of a winning bet. Thus after gambling 100 dollars (called "action") the idealized average gambler would be left with 99 dollars in his bankroll. If he continued to bet (using his 99 dollars in proceeds as his new bankroll), he would again lose 1% of his action on average and the expected value of his bankroll would go down to 98.01 dollars. If the proceeds are continually re-wagered, this downward spiral continues until the gambler's expected value approaches zero. Gambler's ruin would occur the first time the bankroll reaches exactly 0, which could occur earlier or later but must occur eventually.

The long-run expectation will not necessarily be the result experienced by any particular gambler. The gambler who plays for a finite period of time may finish with a net win, despite the house advantage, or may go broke much more quickly than the mathematical prediction.