# Locklin on science

## On beating roulette: part 3

Posted in econo-blasphemy, Gambling systems by Scott Locklin on March 14, 2016

This is third in a four part series. Part 1 here, part 2 here.

To my mind, the most mathematically interesting thing about roulette is the betting system you should use to maximize your wins. Bet sizing systems are important in all probabilistic games, and the types of lessons learned from a winning game of roulette are the same types of lessons you need to learn in betting on other things, like success in trading, or having an edge on the wiener dog races. The nice thing about a game of roulette is it is relatively easy to characterize your edge. Most people’s edge over the roulette wheel is negative, so you should not bet. If you built one of the computer gizmos I went over in part 2, you have a positive edge over the roulette wheel.

We know from results in information theory, that sequential bets in the presence of an edge should be sized according to the Kelly Criterion to maximize bankroll growth rate.

$betsize = \frac{bankroll * edge}{house odds}$

or, in more probabilistic terms;

$betsize = \frac{p * odds + p -1}{odds}$

where $p$ is probability of success.

It’s probably not immediately obvious why this is so, but consider a biased coin toss at even odds ($1 payoff for$1 bet). If your coin’s edge is 100%, you gain money fastest by betting your whole bankroll. If you have 0% edge, you shouldn’t bet anything. If you have a 1% edge, you should bet 1% of your bankroll.

Daniel Bernoulli came up with the same fraction a long time before by maximizing the geometric mean.

Kelly’s original paper figured this out by modeling how a better would place bets assuming he had insider information transmitted over a noisy wire transmitting a binary code; a beautiful way of thinking about predictions in the presence of noise. Kelly is a guy I wish had lived longer. He dropped dead at the young age of 41; in his short life he was a Naval aviator in WW-2, invented computer speech synthesis, made huge contributions to information theory, mentored important mathematicians (Elwyn Berlekamp, who went on to found Axcom/Rentech, based in part on Kelly’s insights) and had the kind of life that would be considered hyperbole if he was in a science fiction novel.  They make big men in Texas. Kelly was a giant.

I’m pretty sure his testicles smoked unfiltered camels

I’ve been known to take sadistic glee in making fun of economists. One of the most mockable economists in American history is (Nobelist -the Swedes have dry humor) Paul Samuelson.  One could write entire books on the ways in which Samuelson was a scoundrel and a numskull who set back human knowledge by decades. One fact will suffice for this essay: Samuelson didn’t believe in Kelly betting. Explaining why he thought this, and why he’s wrong would be pointless; debugging an economist’s faulty thought processes is as pointless as explaining why a crazy lady is breaking dishes in the kitchen. If you’re interested, Ed Thorp is your man here also.

Ed Thorp is the man, period

Following Ed Thorp’s original essay in the Gambling Times, as good little experimental physicists, we need to build up an error budget to figure out our edge.  Thorp breaks down the errors in his and Shannon’s Roulette system into several kinds.

1. E1 Rotor speed measurement error
2. E2 Ball speed measurement error
3. E3 Ball rotor path randomness
4. E4 Ball stator path randomness
5. E5 Fret scatter
6. E6 Rotor tilt (discovered by Shannon and Thorp)

Uncorrelated errors add up as the sum of squares, so the total error budget is

$Error = \sqrt{\sum_{n=1}^{n=6}{E_n^2} }$

The Thorp/Shannon roulette system had a 44% edge on the most favored number; single number payouts in Vegas are 35:1, making the correct bet on one number 0.44/ 35 = 0.01256. Since nobody in 1960s Vegas suspected the mathematical machinators of having a physics edge on the wheel, they were able to place larger bets on parts of the quadrant. While Thorp describes it as “diversification” in his exposition. Another way of thinking about it: he’s just playing more games at once. A friend and former customer explained his trend following method as working in much the same way. The more bets you place, the more likely you’ll hit a winning trend.

Kelly betting isn’t a perfect solution in all cases; fixed fraction betting has certain disadvantages when you can’t exactly characterize your edge, or the payout odds, or you have a limited number of bets before you have to cash in your chips. However, in the case of a machine to beat Roulette, it’s difficult to think of a better technique.

Of course, Kelly betting and things like it figure in other sorts of betting; people do use it in Markets where it is appropriate. Supposedly it was part of Axcom/Rentech’s early secret sauce, and certainly folks who have thought about trading need a bet sizing and risk management strategy that makes sense. Kelly is often a good place to start, depending on your situation. But that’s a topic for another blog post. One more coming on modern techniques to beat Roulette, including the one I came up with in 2010 (which, in case you were holding your breath, didn’t really work, which is why I have to work, and am willing to talk about such things in blogs).

Kelly criterion resources

Kelly’s original paper:

http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6771227

Thorp’s explanation:

http://edwardothorp.com/sitebuildercontent/sitebuilderfiles/TheKellyMoneyManagementSystem.pdf

Thorp’s website:

http://edwardothorp.com/id10.html

### 6 Responses

1. Oleh Danyliv said, on March 14, 2016 at 2:38 pm

Great article and nice to have the original Kelly’s paper.

I derived this formula myself for equal pay-outs after I lost some significant money on the stock market.

Scott, I don’t share your enthusiasm regarding roulette. Since gambling industry is mostly run by gangsters, you are asking for troubles. I stopped researching roulette once I realised that the edge is not possible (unless you cheat).

• flanagan314 said, on March 14, 2016 at 4:51 pm

I don’t think that’s entirely true. Edge is possible, but only temporarily. Anywhere edge can be found (such as counting cards in Blackjack), it can be exploited. The important insight here, though, is that the people running the casinos can CHANGE THE RULES. There are a number of reasons they are generally reluctant to do so except when they really, absolutely must, to avoid losses.

This does not mean that exploiting such edges is a good idea. As gangsters go, these are pretty gentle guys, who have big profitable businesses to run, and they don’t want to catch any heat if they don’t have to. But they are still gangsters at heart, so pissing them off remains a bad idea. One might flippantly say “but if you can make enough money off of them, you can stand the heat”, but the degree of rage they will experience (and likely visit upon you) scales superlinearly with the money you make off them, so at some point it becomes the Worst Idea You Ever Had.

I have no interest in gambling, but I did make a good chunk of money trading foreign currencies about 10 years ago, and that’s a very similar kind of “respectable gangster” business. You take too much money from the banks when you do that, the banks shut you out. Very analogous to being banned from casinos, really.

• Scott Locklin said, on March 14, 2016 at 4:54 pm

Various courts have decided it’s not cheating if you can find an edge in roulette (Nevada has decided otherwise, because it is more or less a casino), and a few teams have had some success at this over the years, including Thorp and Shannon back in the day, as I described in part 1-2 of this series. When I was thinking about this in detail, I had maps of places where I wouldn’t go to jail or die if I won at roulette (Ukraine was not on the map), as well as various ideas about avoiding detection. Ultimately though, you’re correct: writing about this under my real name is a way of avoiding actually doing something dumb.

2. Brian Skourup said, on March 19, 2016 at 3:04 pm

Scott,

Have you read Hans Reichenbach? “The Rise of Scientific Philosophy” seems like something you should read if you haven’t.

Many thanks for producing both this blog and your Amazon reviews.

3. EW said, on April 5, 2016 at 5:03 pm

How’s part 4 going? The anticipation is killing me 🙂

• Scott Locklin said, on April 5, 2016 at 5:21 pm

Well, the part 2 was written 5 years ago, so don’t hold your breath!