Suppose that you start with an initial bankroll of dollars, and repeatedly make a wager that pays $1 with probability , and loses $1 with probability . 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 , the probability of ruin is 1, and if , 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 units, with respective probabilities . 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'”:

where and 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 ), then use the standard two-outcome ruin probability formula above with win probability chosen to reflect the appropriate expected value of the round, i.e., .

The unstated assumption is that (note that ruin is guaranteed if , or if and ), and that accuracy of the approximation depends on , 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

where is the probability of winning 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:

- Fixed basic “full-shoe” total-dependent zero-memory strategy (TDZ), using Hi-Lo true count for betting only.
- Hi-Lo with the Illustrious 18 indices.
- Hi-Lo with full indices.
- Hi-Opt II with full indices and ace side count.
- “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:

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 , 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:

- Not achievable for TDZ (see below).
- $20.16/hr for Hi-Lo I18.
- $21.18/hr for Hi-Lo full.
- $26.51/hr for Hi-Opt II.
- $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.)

**References:**

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

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.