Risk of (gambler’s) ruin

Suppose that you start with an initial bankroll of m dollars, and repeatedly make a wager that pays $1 with probability p, and loses $1 with probability 1-p.  What is the risk of ruin, i.e., the probability that you will eventually go broke?

This is the so-called gambler’s ruin problem.  It is a relatively common exercise to show that if p \leq 1/2, the probability of ruin is 1, and if p > 1/2, then the probability is


But what if the wager is not just win-or-lose a dollar, but is instead specified by an arbitrary probability distribution of outcomes?  For example, suppose that at each iteration, we may win any of (-2,-1,0,+1,+2) units, with respective probabilities (1/15,2/15,3/15,4/15,5/15).  The purpose of this post is to capture my notes on some seemingly less well-known results in this more general case.

(The application to my current study of blackjack betting is clear: we have shown that, at least for a shoe game, even if we play perfectly, we are still going to lose if we don’t vary our bet.  We can increase our win rate by betting more in favorable situations… but a natural constraint is to limit our risk of ruin, or probability of going broke.)

Schlesinger (see Reference (2) below) gives the following formula for risk of ruin, due to “George C., published on p. 8 of ‘How to Win $1 Million Playing Casino Blackjack'”:

(\frac{1 - \frac{\mu}{\sigma}}{1 + \frac{\mu}{\sigma}})^\frac{m}{\sigma}

where \mu and \sigma are the mean and standard deviation, respectively, of the outcome of each round (or hourly winnings).  It is worth emphasizing, since it was unclear to me from the text, that this formula is an approximation, albeit a pretty good one.  The derivation is not given, but the approach is simple to describe: normalize the units of both bankroll and outcome of rounds to have unit variance (i.e., divide everything by \sigma), then use the standard two-outcome ruin probability formula above with win probability p chosen to reflect the appropriate expected value of the round, i.e., p - (1-p) = \mu / \sigma.

The unstated assumption is that 0 < \mu < \sigma (note that ruin is guaranteed if \mu < 0, or if \mu = 0 and \sigma > 0), and that accuracy of the approximation depends on \mu \ll \sigma \ll m, which is fortunately generally the case in blackjack.

There is an exact formula for risk of ruin, at least as long as outcomes of each round are bounded and integral.  In Reference (1) below, Katriel describes a formula involving the roots inside the complex unit disk of the equation

\sum p_k z^k = 1

where p_k is the probability of winning k units in each round.  Execution time and numeric stability make effective implementation tricky.

Finally, just to have some data to go along with the equations, following is an example of applying these ideas to analysis of optimal betting in blackjack.  Considering the same rules and setup as in the most recent posts (6 decks, S17, DOA, DAS, SPL1, no surrender, 75% penetration), let’s evaluate all possible betting ramps with a 1-16 spread through a maximum (floored) true count of 10, for each of five different betting and playing strategies, ranging from simplest to most complex:

  1. Fixed basic “full-shoe” total-dependent zero-memory strategy (TDZ), using Hi-Lo true count for betting only.
  2. Hi-Lo with the Illustrious 18 indices.
  3. Hi-Lo with full indices.
  4. Hi-Opt II with full indices and ace side count.
  5. “Optimal” betting and playing strategy, where playing strategy is CDZ- optimized for each pre-deal depleted shoe, and betting strategy is ramped according to the corresponding exact pre-deal expected return.

Then assuming common “standard” values of $10,000 initial bankroll, a $10 minimum bet, and 100 hands per hour, the following figure shows the achievable win rate ($ per hour) and corresponding risk of ruin for each possible strategy and betting ramp:

Win rate vs. risk of ruin for various betting and playing strategies.

Win rate vs. risk of ruin for various betting and playing strategies.

There are plenty of interesting things to note and investigate here.  The idea is that we can pick a maximum acceptable risk of ruin– such as the red line in the figure, indicating the standard Kelly-derived value of 1/e^2, or about 13.5%– and find the betting ramp that maximizes win rate without exceeding that risk of ruin.  Those best win rates for this particular setup are:

  1. Not achievable for TDZ (see below).
  2. $20.16/hr for Hi-Lo I18.
  3. $21.18/hr for Hi-Lo full.
  4. $26.51/hr for Hi-Opt II.
  5. $33.09/hr for optimal play.

Fixed basic TDZ strategy, shown in purple, just isn’t good enough; that is, there is no betting ramp with a risk of ruin smaller than about 15%.  And some betting ramps, even with the 1-16 spread constraint, still yield a negative overall expected return, resulting in the “tail” at P(ruin)=1.  (But that’s using Hi-Lo true count as the “input” to the ramp; it is possible that “perfect” betting using exact pre-deal expected return could do better.)


  1. Katriel, Guy, Gambler’s ruin probability – a general formula, arXiv:1209.4203v4 [math.PR], 2 July 2013
  2. Schlesinger, Don, Blackjack Attack: Playing the Pros’ Way, 3rd ed. Las Vegas: RGE Publishing, Ltd., 2005
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to Risk of (gambler’s) ruin

  1. Edward says:

    I wonder how you ran the simulation with optimal/perfect play(care to share your program?), also tc 5 and above rarely happens i think near 2%? Ive been using this program with 50% pen to simulate online blackjacks and ive gathered that Hilo with (r)18 is better vs some advanced counts.(http://www.blackjackforumonline.com/content/powersim_blackjack_simulation_software_accuracy.htm) ive found that. Havent tried hi opt 2 full/asc tho will edit tomorrow.

    • The software, source code included, is available here, and the description of CDZ- strategy and how it is calculated are in various other posts both here and on blackjacktheforum.com.

      You’re right that true counts +5 and higher are rare (about 2.76% of the time using Hi-Lo in the 6-deck 75% pen data analyzed here)… but I’m not sure whether this was a question or a lead-in to another point? Re your link to the article on PowerSim, there are several points I would disagree with. The overall theme seems to be “accuracy means high resolution,” e.g. the true count calculation uses the exact number of cards remaining in the shoe in the denominator. Sure, the computer can easily do that… but when evaluating human-playable strategy performance, that’s not what a *human* does at the table. Worse, if the player is using strategy indices, those indices are optimized *assuming* a particular deck estimation method in calculating the true count; so to evaluate SCORE, the two should match.

      Similarly, regarding the calculation of RoR, and the comment that, “Although other formulas for RoR are possible, to the best of our knowledge this is, or should be, the formula most consistent with the SCORE methodology,” well, that was the objective of this post, to point out that the referenced (and indeed other) methods are *inaccurate*, and that inaccuracy can influence SCORE calculations in a significant way.

  2. BLackjack Risk of Ruin Formula: K(K+1) * PE + K(K-1) * BE/BR
    K = Amount of Bet, BE (bet efficiency) = 9%, PE (player effiiency = 6%, BR (bank roll) = Amount Planning to Spend, (K + 1) = amount earned, (K – 1) = amount lost

    • You don’t give a reference, but this looks like it’s at least derived from a formula from Griffin’s ToBJ; note that the various formulas described here are exact (at least under the assumptions of each corresponding model), where the formula you give is simply a best-fit curve approximation. One difficulty is that playing and betting efficiency are, at worst, rarely precisely defined, and at best, also approximations based on decades-old computational approaches that I think can be improved on; see here, for example.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.