Q: If you double your bet every time you lose, won’t you eventually win and come out ahead?

Physicist: Yes, but…

There are good reasons why casinos make money and “how to gamble” books are longer than two sentences.  According to the law of large numbers, if you’re likely to lose a little bit of money in a game, then playing a lot of times effectively guarantees that you’ll lose a lot of money.  It doesn’t matter if you think you have “a system”, gambling is a big business and the business is: you lose.  But if you do want to gamble there are three simple rules to keep in mind:

1) Don’t.

2) The second you’re ahead, walk away.  You’ve already won and it’s all downhill from there.

3) The second you’ve lost money, walk away.  It’s gone forever and if you stay it’s just going to get worse.

A strange game.  The only winning move is not to play.  Or to own the casino.

This system sounds like a clever way to beat any game: just place larger and larger bets, to cover all of your previous loses and a little more, because eventually you’ll win.  Then rinse and repeat until Musk and Bezos come begging for a handout.

At first blush this seems like a reasonable trick.  And technically it does work.  The problem with it is nestled firmly inside that “eventually”.  Like so many things in life, this plan works great if you already have an infinite amount of money.  With infinite funds, you will win eventually.  But without them, you’re screwed as much as always.

Take a simple “double or nothing” scenario like the pass line in craps, where you have a p=\frac{244}{495}\approx0.493 (49.3%) probability of winning.  Assuming you bet 1 “chip” (or whatever currency makes sense), then the first round you can either lose or gain 1 new chip.  The amount of winnings you can expect (a mathematician would call this “the expected winnings”) is the probability of winning times how much you win, minus the probability you lose times how much you lose: E=\left(\frac{244}{495}\right)(1)-\left(\frac{251}{495}\right)(1)\approx-0.014.  This is very intentionally negative, because on average you’re supposed lose.

But if you do lose, then on the second round you can bet 2 chips.  That way if you win, you’ll recoup your 1 chip loss and come out 1 chip ahead.  If you lose again, you’re down 3, so by doubling your bet again (4 chips), you might recoup your net loses and come out 1 chip ahead.  Keep doubling until you win and then you’re back where you started, plus one shiny new chip.

In this scenario you’re guaranteed to gain 1 chip if you keep playing.  The question is: how long can you keep playing?  What’s missing in the “doubling system” so far is the possibility of losing everything (which is a big red flag for any gambling system).  You’re likely to gain a tiny amount (by winning any time before you run out of chips) and unlikely to lose everything (by losing until you run out of chips), but on average you can expect to walk out of the casino with less than you walked in with.

After n rounds you’ve bet 1+2+4+...+2^{n-1}=2^n-1 chips (you can add this up easily because it’s a geometric series).  For example, after three rounds you’ve bet a total of 1+2+4=2^3-1=7 chips.  If you’ve got B chips in your pocket, then after n=\log_2(B+1)\approx\log_2(B) rounds you’ll be broke.

For example, 1023 chips buys you \log_2(1023+1)=\log_2(1024)=\log_2\left(2^{10}\right)=10 rounds.  For the pass line, the probability of losing ten games in a row and going broke is q=\left(\frac{251}{495}\right)^{10}\approx0.0011238 and the probability of winning before then and gaining one chip is p=1-q\approx0.9988762.  So your expected winnings is E\approx\left(0.9988762\right)1-\left(0.0011238\right)1023\approx-0.15.  Despite its cleverness, this system is actually worse than not being clever: if you just bet 1 chip ten times in a row, you can expect to lose about 0.14 chips (and only ten at most).

Gambling systems: thinking really hard doesn’t generally help.

Long story short, you can change the probability of winning/losing and the amount that you might win/lose by using different strategies or playing different games, but on average you’ll always lose money.  By increasing your bet every time you lose, you really can cover your loses and more.  Usually.  But if you’re one of those unlucky people without infinite funds, then you have to take into account the possibility of going broke.  When you do account for every eventuality, you’ll find the casino’s edge is intact.

All that doubling your bets really does is make the chances of winning better while making the consequences of losing worse.

There are a few rare situations where the casino’s edge disappears.  A group of MIT kids famously found one in blackjack and exploited it for years.  But it wasn’t a big edge, it was very difficult to even know that it was there, and they had to play consistently and with a large bankroll for a long time to overcome the Gambler’s Ruin (which, very succinctly, is: you’ll run out of money before the casino does).  But of course gambling isn’t a game, it’s a business.  When the casinos figured out what those MIT kids were doing, they just kicked them out.

Casinos are perfectly happy to let you test your theories out.  So if you think you’ve got a winning system, it might work.  But don’t bet on it.


Gravy: When you want to prove something to death, it helps to do it in extreme generality with everything left as non-specified variables.  That way you cover the “yeah, but what if…” questions all at once, which is good, but you often end up in an algebra blizzard, which is work.

Assume that the amount of money you make after placing a bet is described by an gaining factor, f.  So if you bet x chips, you either lose x chips or gain fx chips.  For example, f=1 is “double or nothing”; if you play x chips and win you get 2x chips back, so you gained 1x chips.

You can sum up the casino’s edge pretty succinctly: fp-q<0.  This means that the average amount you lose from betting a chip, q, is more than the average amount you gain, pf.  For example, the pass line in craps is f=1, p=0.493, q=0.507, and fp-q=(1)(0.493)-(0.507)=-0.014.  Or, if you bet on any particular number in roulette, f=35, p=1/37, q=36/37, and fp-q=(35)(1/37)-(36/37)=-1/37.  fp-q<0 is practically a natural law on the casino floor.

Mathematically speaking, the system here is really simple: take whatever your last bet was and multiply it by m (m=2 for doubling, m=3 for tripling, etc.).  On the first round you bet one chip, on the nth round you bet m^{n-1} chips, and if you win on the nth round, you’ll earn f times your last bet, fm^{n-1}.

However, if you lose n rounds in a row, you’ll have bet and lost 1+m+m^2+\ldots+m^{n-1}=\frac{m^n-1}{m-1} chips.  This means that if you lose the first n-1 rounds and win on the nth, then your take-home winnings are W(n)=fm^{n-1}-\frac{m^{n-1}-1}{m-1}.

If p is the probability of winning and q is the probability of losing, then the probability of n-1 loses followed by a win is P(n)=q^{n-1}p.  So P(n) is the probability your ship will come in on the nth round and W(n) is how many chips you gain when it does.  With those two equations in hand, you can find your expected winnings, E[W].

\begin{array}{rcl}E[W]&=&E\left[\left(f-\frac{1}{m-1}\right)m^{n-1}+\frac{1}{m-1}\right]\\[2mm]&=&\frac{1}{m-1}+\left(f-\frac{1}{m-1}\right)E\left[m^{n-1}\right]\\[2mm]&=&\frac{1}{m-1}+\left(f-\frac{1}{m-1}\right)\sum_{n=1}^\infty m^{n-1}P(n)\\[2mm]&=&\frac{1}{m-1}+\left(f-\frac{1}{m-1}\right)\sum_{n=1}^\infty m^{n-1}q^{n-1}p\\[2mm]&=&\frac{1}{m-1}+\left(f-\frac{1}{m-1}\right)p\sum_{n=1}^\infty (mq)^{n-1}\end{array}

That sum blows up when m>\frac{1}{q}, so if you can keep playing forever, then just by picking a large enough multiplier, m, the expected return is infinite.  This is because the number of chips you get back after n rounds increases very exponentially with the number of rounds you play and there’s no chance of ever losing.  It’s good to be richer than god.

But in practice, that’s pretty unreasonable.  When you walk into the casino, you have a finite number of chips and can play at most B rounds (where B is some distinctly not-infinite number) at which point you run out.  In this far more realistic situation, you might win in any of the first B rounds or you might lose every one of them.  It’s this “lose every time” scenario that’s ruled out by being infinitely rich.  In B rounds you bet a total of \frac{m^B-1}{m-1} chips, which is all of them (because that’s how B is defined).  The chance of losing all B rounds is q^B.

So you’re expected winnings is:

\begin{array}{rl}  E[W]=&\sum_{n=1}^BP(n)W(n)-q^B\frac{m^B-1}{m-1}\\[2mm]  =&\sum_{n=1}^Bq^{n-1}p\left(\left(f-\frac{1}{m-1}\right)m^{n-1}+\frac{1}{m-1}\right)-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\sum_{n=1}^B\left(p\left(f-\frac{1}{m-1}\right)(qm)^{n-1}+\frac{p}{m-1}q^{n-1}\right)-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\left(pf-\frac{p}{m-1}\right)\sum_{n=1}^B(qm)^{n-1}+\frac{p}{m-1}\sum_{n=1}^Bq^{n-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  <&\left(q-\frac{p}{m-1}\right)\sum_{n=1}^B(qm)^{n-1}+\frac{p}{m-1}\sum_{n=1}^Bq^{n-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\left(q+\frac{q-1}{m-1}\right)\sum_{n=1}^B(qm)^{n-1}-\frac{q-1}{m-1}\sum_{n=1}^Bq^{n-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\left(\frac{qm-q+q-1}{m-1}\right)\sum_{n=1}^B(qm)^{n-1}-\frac{q-1}{m-1}\sum_{n=1}^Bq^{n-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\left(\frac{qm-1}{m-1}\right)\sum_{n=1}^B(qm)^{n-1}-\frac{q-1}{m-1}\sum_{n=1}^Bq^{n-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\left(\frac{qm-1}{m-1}\right)\frac{(qm)^B-1}{qm-1}-\frac{q-1}{m-1}\frac{q^B-1}{q-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\frac{(qm)^B-1}{m-1}-\frac{q^B-1}{m-1}-\frac{(qm)^B-q^B}{m-1}\\[2mm]  =&\frac{(qm)^B-1-q^B+1-(qm)^m+q^B}{m-1}\\[2mm]  =&0  \end{array}

In short, E[W]<0.  There are two subtle truths that got weaved in there.  First, p+q=1 (the chance of either winning or losing a given round is 1).  And second is the casino’s edge, pf<q.  This is ultimately where that inequality comes from.

This sort of terrifying algebra storm is why math is so damnably useful: even if you can’t keep an idea in you head all at once, you can still explore it and learn new things from it.

The casino picture is from here.

This entry was posted in -- By the Physicist, Math, Probability. Bookmark the permalink.

3 Responses to Q: If you double your bet every time you lose, won’t you eventually win and come out ahead?

  1. FranciscoLisboa says:

    The answer is yes : Doubling your bet every time you lose, you eventually win and come out ahead.

    That is one of the reasons why Casinos operate maximum bet amounts across their range of games…

    Having a max bet limits players simply doubling their bets until they win… some high rollers would be able to break casino’s if this was possible.

    Another reason is because a casino has to be able to afford a payout to any of its customers and if there is a chance that a casino would accept a bet, and then be unable to payout a customer if they won, then that would reflect badly both on that casino and the industry as a whole.

    Therefore, this is why different casinos operate different max bet amounts .

  2. Working Physicist says:

    Having a top-end, maximum bet is exactly designed to cover that very tiny and rather expensive “hole” where the player can for that one brief instant in time, beat the casino. It goes part and parcel with the table’s minimum bet.

    Roulette is my favorite example of this. There is an Internet-famous “get rich quick” scheme for beating the casino. I’m convinced this was marketing BY the casino. All you have to do is bet on red or black, doesn’t matter which, and double each time you lose. Since red or black is 50/50 you should eventually win and with each win you double your money. The strategy also says not to change your color and stay with it until you win. Then, start all over again.

    *bzzz* Wrong. Just wrong, in so many ways.

    First, there is a third color besides red or black – green, and sometimes there are 2 green panels! Second, the table min and max are set to specifically to fall statistically outside where it does you any good over a period of time long enough to make more than $50. Let’s say the table minimum is $10 for outside bets (as red/black is) and the max bet is $500. I put $10 on red – lose. $20 on red – lose. $40 on red -lose. $80 on red – green WTH!, $160 on red – green again?!, $320 c’mon red – lose… ut oh. I can’t double now. Most I can do is $500 and even with a hit, I am under.

    The strategy would now tell me to switch to the other color and start at $10 again.

    So you get 5 chances to play that strategy during a losing streak. Now look at the history on your table. How many times do you see the color streak way more than 5 black or red in a row?

    There is this one machine on the casino floor that always pays. I will share its secret with you. All you need to do is guess 4 numbers. You insert a credit card, enter 4 numbers, select how much you want to win, and press Enter. If you got the 4 numbers right, money comes out right there. You can try this a few times, but eventually the machine will keep the card if you guess wrong. These machines are all over the place – gas stations, libraries, even places where gambling isn’t legal. I’m not sure the abbreviation but Ay Tee Emm is the game. I think it might be Native American.

  3. Enrique Rivera says:

    Although I have a hard time understanding the math I loved your article. There is these roulette formula out there that gives the player a little bit of an edge. I would be in your debt if you could mathematically calculate for me the average times a color (red or black) may appear in a sequence. For example, we are less likely to see one of the colors appear 20 times in sequence than maybe 8. Taking that average and combining it with the other technique we can increase that edge just slightly. Of course I understand that anything can happen that’s why it’s called the devil’s wheel.

Leave a Reply

Your email address will not be published.