# Misc | Roulette

## A winning strategy?

It was suggested to me that, given enough patience, you'll end up ahead in roulette with the following strategy:

If, like me, you know next to nothing about roulette, it may be hard to form an opinion about such a strategy. So, the following section provides some background for those of us who need it (or anyone who enjoys roulette fact checking). If you're already in the know, feel free to skip ahead.

## Roulette background

- There's a table, and there's a wheel.
- Each have 38 numbers on them (00, 0-36).
- The wheel is spun to select a single number to be the winner.
- Before the wheel is spun (obviously), you select numbers to bet on.
- If the wheel does not land on a number you picked, you lose all the money you bet.
- If the wheel
*does*land on a number you picked, you win, meaning you get back all the money you bet plus some payoff, which, as Wikipedia informs me, is*36/n - 1*(*n*= total number of numbers you're betting on) - So, if you walked into the casino with $38, placed it all on a single number, and won, you could walk out with a winnings of
*36/1 -1 = 35*times your bet (i.e.*35*$38 = $1330*), or a total of $1368 (payoff + bet). - Or, if you walked into the casino with $38, placed $1 on each number, and one of those numbers (obviously) one, you could walk out with a 'winnings' of
*36/38 -1 = -.05*times your bet (i.e.*-.05*$38 = -$1.90*), or a total of $36.10 (-$1.90 'winnings + $38 bet - Note: I'm not sure this kind of bet is allowed, but if it is, it should be clear why you should not make it). - You can choose 'chunks' (sorry, making up terms here) to bet on.
- To bet on a third of the numbers (not including 0 and 00), you can choose:
- The first, second, or third column of numbers
- The first dozen (1-12), second dozen (13-24), or third dozen numbers (25-36)
- (There are others you can read about if you interested, but they're not relevant here)
- If you bet on a chunk and any number in that chunk wins, you win. But remember that the n used to calculate your payoff is the number of numbers in the chunk you bet on (i.e. it's the same as if you had bet on each of those numbers individually, this basically just saves you some time and trouble).
- So, if you walked into the casino with $38, placed it all on the first dozen numbers, and one of those numbers won, you could walk out with a winnings of
*36/12 -1 = 2*times your original bet (i.e.*2*$38 = $76*), or a total of $108 (payoff + bet).

## Using math

Returning to the strategy above, if you bet on 2/3 of the numbers (e.g. two columns or two dozens) and win, your payoff is *36/24-1 = .5* times your original bet.

- So, if you walked into the casino with $38, placed $19 on the first dozen numbers and $19 on the second dozen numbers, and one of those numbers won, you could walk out with a winnings of
*36/24 -1 = .5*times your original bet (i.e.*.5*$38 = $19*), or a total of $57 (payoff + bet).

If you always bet all your money and always won, your pot would increase by 50% each time. Not bad at all.

But, of course, you don't always win, and when you lose, instead of a 50% increase, you suffer a 100% decrease (i.e. it hurts to lose double how much it helps to win).

You're betting on 24 out of 38 of the numbers, so you should win ~63% percent of the time. Which means losing ~37% of the time. And if *~63 > 2*~37*, you might be in business. But, unfortunately,

*~63*, meaning, on average, you're going to be losing money.

**<**2*~37Note - Even if there weren't the extra 0 and 00 (meaning you're betting on 24 out of 36 numbers), you still shouldn't come out ahead, since *~66 !> ~33* (in fact, *24/36 = 2*12/36*, meaning you would, on average, break even).

## Using repetition

Because I don't trust my math and don't mind a chance to use some python tricks I learned in CS 6.00x, I made a Monte Carlo simulation of this strategy (you can find my code here).

### Some technical details:

First, I simulated a single person playing roulette. For me, this involved writing functions to

- Play a single round of roulette
- Determine the outcome (win/lose) of a single round
- I always bet on number 1-24 and used
`random.randint()`

to pick a winning number 1-38. - Determine how that outcome affects how much money the player has
- Recall that if you lose, you lose the amount of money you bet. If you win, you keep the money you bet and get an additional 50%.
- Play multiple rounds of roulette until the player runs out of money, or until some fixed number of rounds is reached.
- I kept track of the player's remaining money after each round so that I could graph it using
`pylab`

.

Here's an example of what might happen if you walked up to the table with $60 in your pocket and bet $15 total on 2/3 (minus 0 and 00) of the board, playing for 1000 rounds or until your cash runs out. (Remember, if you put $15 in and win, you get back $22.50. If you lose, you get back $0.)

Okay, that's not going to make anyone fall in love with the strategy, but maybe you were just having a bad day. Let's try it again.

Yikes, it's looking like maybe our math wasn't too far off. Let's try one more time. Lucky number three...

Nope, still doesn't look like a winning strategy.

We could do this all day, but I promised you a Monte Carlo, so here's 5000 runs of walking up to the table with $60 in your pocket and betting $15 total on 2/3 (minus 0 and 00) of the board. Each time you play 1000 rounds or until your cash runs out.

You can see here that, averaging over all 5000 runs of this simulation, by around your 33rd bet, you've lost half your money, and it clearly doesn't get any better as you keep going.

### Some technical details:

To do this, I simply wrote a function that would run my previous code for a single person playing roulette, but repeat it many times. For each round, I averaged the players' remaining money across all the runs so that I could graph is, again using `pylab`

.

## Conclusion

Two things:

- So far as I can tell, this looks like a bad strategy. Though, from what I've seen of roulette, there are no 'good' strategies (the house is always going to have a considerable advantage), but there are some 'less bad' ones (where the house only has a medium-large advantage), and perhaps this is one of them.
- I make lots of mistakes. If I've gone wrong anywhere, please feel free to point it out.