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).
- $14.90/hr for Hi-Lo I18.
- $16.70/hr for Hi-Lo full.
- $20.94/hr for Hi-Opt II.
- $29.26/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 20%. 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