Math and Life

# The House Always* Wins

Let’s play a game.

Place any amount of money on the table. I’ll roll a fair, six-sided die. If it comes up 1 or 2, I’ll match your bet, and you get to keep it. If it’s 3 or over, you lose your money. We can play as many rounds as you want.

Do you want to play?

(I hope) Your immediate response is “hell no.” Every 6 rolls, you should expect two wins. If you bet a dollar each time, you’ll win 2 and lose 4. Not a wise financial decision.

So you refuse and walk away, but an hour later, you come back to ask if the offer is still on. Why? Well you think you might have a strategy to win money. Here’s how it goes:

1. Bet a dollar.

2. If you win, pocket it and go to step one. If you lose, go to step 3

3. Double your previous bet and go to step 2.

I’ll play out a few rounds to show why this might be a good idea:

Round 1: Bet a dollar. Win. Profit: 1 dollar

Round 2: Bet a dollar. Lose. double it.

Round 3: Bet 2 dollars. Win. Profit: 1 dollar (2 for winning this minus 1 for losing the previous)

Round 4: Bet a dollar. Lose. double it.

Round 5: Bet 2 dollars. Lose. double it.

Round 6: Bet 4 dollars. Lose. double it.

Round 7: Bet 8 dollars. Win. Profit: 1 (8 - (4 + 2 + 1)).

The system is setup so that each win guarantees you one extra dollar. This is clear if you tally up the money that you lose after each loss: 1, 3, 7, 15, 31…1 each is one less than the next bet, so every win will net you one dollar.

But even now, you aren’t sure. I’ll make a spreadsheet to try to convince you:

Let’s break this down. Along the top, we have the chance of winning and the payout. Chance of winning is exactly what you think it is. In this case, .33 is 33%.

The payout is how much money you win from a bet of one dollar. In this case, a payout of 1 means you win exactly however much you bet, so you bet \$32 and win, you get \$32 back. If the payout were 2, you would win two dollars for every one dollar you bet.

In the first column, we have the round number. This is pretty simple, just a list of the natural numbers all the way out to 10,000.2

Next we have the Rand function. Essentially, this just chooses a random number between 0 and 1.3 I will use this to simulate rolling a die.

Next up, the win/loss column. This is an “if” statement and  is easy to understand in regular English. This cell says “if the random value that was just generated is less than the chance of winning, this cell is equal to 1, if it isn’t, this cell is equal to 0.”

“1” represents a win and a “0” represents a loss.

Think about why that works for a second.

If the random number generator picks a number between 0 and 1 randomly, we should expect it to be less than .33 a third of the time. This means that the “Win/Lose” column will be “1” a third of the time, which is the same frequency as the chance of winning.

Now for the bet. This is also an if statement. It says “If I lost the previous bet (the previous bet’s win/loss column = 0), my new bet is double my previous bet. If I won my previous bet, my new bet is 1.”

If you look back to the rules I spelled out, this should make sense.

I also used an if statement for the return. Here, I am using “return” to mean how much you gained or lost from a specific bet. The if statement reads “If I won the bet, the return is the payout times however much I bet. If I lost the bet, the return is however much I bet times negative one.” Negative numbers represent lost money.

The formulas above were copied all the way down, 10,000 cells later.

Finally, we have the total profit. This is fairly simple to calculate: just add up the return column.

Taken as a whole, this spreadsheet is a workable simulation of the betting. We can change the payout, the chance of winning, hit enter and see what happens.

Let’s try it with the game I offered you:

Looks like you’ve earned yourself a tidy profit of \$3,280! Just to be sure, let’s run the simulation again:

Again, your profit is in the thousands!

So you take 50 dollars out of your wallet and agree to play. Here’s how it goes down:

Round 1: Bet 1 Dollar. Win. you have \$51.

Round 2: Bet 1 Dollar. Win. you have \$52.

Round 3: Bet 1 Dollar. Lose. you have \$51.

Round 4: Bet 2 Dollars. Lose. you have \$49.

Round 5: Bet 4 Dollars. Lose. you have \$45.

Round 6: Bet 8 Dollars. Lose. you have \$37.

Round 7: Bet 16 Dollars. Lose. you have \$21.

Now you’re in quite a predicament. As per the system, you should bet \$32, but you only have \$21. In this situation, you’ve basically lost. You have to make \$29 more just to break even, and that seems unlikely.

But that’s not how it’s supposed to work. I just made a spreadsheet that said you could make thousands with this. Why isn’t it working now?

The answer, as you may have guessed, is that my simulation didn’t account for not having enough money to bet; I assumed you have an infinite amount of cash.

Let’s try to fix that:

First, I’ll add a column that tallies up how much money you have. In betting circles, this is called your “bankroll.”

So basically just add the previous bankroll and the return.

Next, I’ll check if you have enough money to bet.

The if statement says “if the bankroll is greater than the next bet, this cell is 1, if it isn’t, this cell is 0” Here, “1” signifies “has enough to bet” and “0” signifies “doesn’t have enough to bet.”

Just to recap. In our betting game, you lose if you don’t have enough money to bet again, so if there’s a single “0” in the “Enough to bet?” column, you’ve lost.

If I had only a couple rows, this would be easy: just look down the row and see if there are any zeros. I have 10,000 rows, so I’ll do it digitally:

This is a countif function. It counts the number of cells that meet a certain criteria. In this case, it is counting the number of zeros in the “Enough to bet?” column.

If this number is greater than 1, you lose.

Let’s try:

Not once, not twice, but 273 times you were unable to pay for the next bet.

This makes sense if you think about it. Starting at \$50 dollars, you only need to lose 5 bets in a row to be unable to pay. That may seem unlikely when you start the game, but eventually it will happen. And what do you stand to gain from this risk? Only one dollar per win.

Is that worth it?

To simplify this, let’s say you are going to start with \$50 and play until you win one dollar.

There are two outcomes of this: 1. You lose 5 bets in a row, and lose \$31. And 2. After losing between 0 and 4 rounds, you win one, and gain a single dollar.

The chance of losing 5 in a row is

The chance of winning at least one game is one minus the chance of losing all 5:

Say we were to play this game 243 times. We should expect to lose \$31 thirty two times, and to gain one dollar 211 times.

So every 243 games, you should expect to lose \$781.

The house always* wins.

For all practical purposes, this phrase is accurate. It’s impossible to gain a mathematical edge over an unfavorable betting game.

*provided you have a finite amount of money

Of course, it’s impossible to have infinite wealth in the real world, so it may seem pointless to add that asterisk, but from a mathematical perspective, it’s fairly interesting.

Moral of the story: don’t play betting games with strangers.

1These numbers are Mersenne numbers (link)

2Because, why not?

3How it actually chooses this number and if it is truly random is a story for another time.

4Somehow, I ended this without mentioning that this betting system is called the "martingale Betting System"

Image sources can be found here.

Noah CaplingerComment