żěè¶ĚĘÓƵ

Beating the odds: the mathematics of gambling

Blackjack, roulette, the lottery – there are ways of maximising your chances. Our guide will also teach you the best time to stop

Roulette wheel

When Edward Thorp, a mathematics student at the Massachusetts Institute of Technology, stood at the roulette wheel in a Las Vegas casino in the summer of 1961, he knew pretty well where the ball was going to land. He walked away with a profit, took it to the racecourse, the basketball court and the stock market, and became a multimillionaire. He wasn’t on a lucky streak: he had harnessed his knowledge of mathematics to understand, and beat, the odds.

Thorp was armed with the first “wearable” computer, one that could predict the outcome of the spin. Once the ball was in play, Thorp fed the computer information about the speed and position of the ball and the wheel using a micro-switch inside his shoe. “It would make a forecast about a probable result, and I’d bet on neighbouring numbers,” he says.

Thorp’s device would now be illegal in a casino. But a knowledge of the workings of probability can help anyone beat the odds in various games. The first person known to do this was Jerome Cardano, a compulsive gambler who in the 15th century used his knowledge of probability to make a ton of money. Well, sort of.

Roulette

There is a simple and sure-fire way to win at the roulette table – as long as you have deep pockets. A spin of the roulette wheel is just like the toss of a coin. Each spin is independent, with a 50:50 chance of the ball landing on black or red. Contrary to intuition, a black number is just as likely to appear after a run of 20 consecutive black numbers as the seemingly more likely red. This false intuition is known as the gambler’s fallacy.

So, always bet on the same colour. If you lose, double your bet on the next spin. Because your colour will come up eventually, this method will always produce a profit.

The downside is that you’ll need a big pot of cash to stay in the game. A losing streak can escalate your bets very quickly: seven unlucky spins on a £10 starting bet will have you parting with a hefty £1280 on the eighth. Unfortunately, your winnings don’t escalate in the same way: when you do win, you’ll only make a profit equal to your original stake. So while the theory itself is sound, the roulette wheel is likely to keep on taking your money longer than you can remain solvent.

Blackjack

In a game such as blackjack you can tip the odds in your favour simply by keeping track of the cards – within the rules, if not the spirit, of a game of chance.

Blackjack starts with each player being dealt two cards face up. Face cards count as 10 and the ace as 1 or 11 at the player’s discretion. The aim is to have as high a total as possible without busting – going over 21. To win, you must achieve a score higher than the dealer’s.

Cards are dealt from a “shoe”, a box of cards made up of three to six decks. Players can stick with the two cards they are dealt or “hit” and receive an extra card to try to get closer to 21. If the dealer’s total is 16 or less, the dealer must hit. At the end of each round used cards are discarded.

The basic idea of card counting is to keep track of those discarded cards to know what’s left in the shoe. A shoe rich in high cards will slightly favour you, while a shoe rich in low cards is slightly better for the dealer. With lots of high cards still to be dealt you are more likely to score 20 or 21 with your first two cards, and the dealer is more likely to bust if his initial cards are less than 17. An abundance of low cards benefits the dealer for similar reasons.

If you keep track of which cards have been dealt, you can gauge when the game is swinging in your favour. The simplest way is to start at zero and add or subtract according to the dealt cards. Add 1 when low cards (two to six) appear, subtract 1 when high cards (10 or above) appear, and stay put on seven, eight and nine. Then place your bets accordingly – bet small when your running total is low, and when your total is high, bet big. This method can earn you a positive return of up to 5 per cent on your investment. A lot of effort for a small return – but in this era of low interest rates, possibly worth a punt.

Lotteries

Ěý14 January 1995 was an evening that Alex White will never forget. It was the 9th ever draw of the UK National Lottery, with an estimated jackpot of a massive ÂŁ16 million, and White (not his real name) matched all six numbers: 7, 17, 23, 32, 38 and 42. Unfortunately, White only won ÂŁ122,510 because 132 other people chose the same combination of numbers and took a share of the jackpot.

Dozens of methods claim to improve your odds of winning the lottery. None works. Every combination of numbers has the same odds of winning as any other – 1 in 13,983,816 in the 49-ball game White was playing. But, as his story shows, the fact that you could have to share the jackpot suggests a way to maximise any winnings: win with numbers nobody else has chosen.

Shortly after the start of the UK National Lottery in 1994, mathematician Simon Cox of the University of Southampton worked out lottery players’ favourite figures by analysing data from 113 lottery draws, comparing the winning numbers with how many people had matched four, five or six of them.

Seven was the favourite, chosen 25 per cent more often than the least popular number, 46. Numbers 14 and 18 were also popular, while 44 and 45 were among the least favourite. There was a noticeable preference for numbers up to 31. “They call this the birthday effect,” says Cox. “A lot of people use their date of birth.”

Several other patterns emerged. The most popular numbers are clustered around the centre of the form people fill in to make their selection. Similarly, many players appear to just draw a diagonal line through a group of numbers on the form. There is also a clear dislike of consecutive numbers. “People refrain from choosing numbers next to each other, even though getting 1, 2, 3, 4, 5, 6 is as likely as any other combination,” says Cox. Numerous studies on the US, Swiss and Canadian lotteries have produced similar findings. Perhaps the most notable feature of White’s popular number choice is that they are relatively evenly distributed – they “look” random.

To test the idea that picking unpopular numbers can maximise your winnings, Cox simulated a virtual syndicate that bought 75,000 tickets each week, choosing its numbers at random. Using the real results of the first 224 UK lottery draws, he calculated that his syndicate would have won a total of £7.5 million – on an outlay of £16.8 million. If his syndicate had stuck to unpopular numbers, however, it would have more than doubled its winnings.

So, go for numbers above 31, and pick ones that are clumped together or situated around the edges of the form. Then if you match all six numbers, you’re less likely to share with others. But bear in mind that probability also predicts that you won’t match six numbers in a weekly 49-ball draw until the 28th century.

Racing

Although it would be nearly impossible to beat a seasoned bookie at his own game, play two or three bookies against each other and you can come up a winner, whatever the outcome of a race.

Let’s say, for example, you want to bet on one of the highlights of the British sporting calendar, the annual university boat race between old rivals Oxford and Cambridge. One bookie is offering 3 to 1 on Cambridge to win and 1 to 4 on Oxford. But a second bookie disagrees and has Cambridge evens (1 to 1) and Oxford at 1 to 2.

Each bookie has looked after his own back, ensuring that it is impossible for you to bet on both Oxford and Cambridge with him and make a profit regardless of the result. However, if you spread your bets between the two bookies, it is possible to guarantee success (see diagram, for details). Having done the calculations, you place ÂŁ37.50 on Cambridge with bookie 1 and ÂŁ100 on Oxford with bookie 2. Whatever the result you make a profit of ÂŁ12.50.

Guaranteeing a win this way is known as “arbitrage”, but opportunities to do it are rare and fleeting. The fewer runners there are in a race, the better it works. It’s not necessarily risk-free because you might not be able to get the bet you want exactly when you need it – but it’s enough for some professional gamblers to make a living out of it.

Knowing when to stop

Gambling can be addictive, especially when you get tantalisingly close to finding a winning combination or strategy. And that’s a problem even when you have mathematics on your side: it’s all too easy to lose sight of what you could lose. Fortunately, that’s something probability can help you with too.

If you have trouble knowing when to quit, try getting your head around “diminishing returns” – the optimal stopping tool. One way to demonstrate diminishing returns is the so-called marriage problem. Suppose you are told you must marry, and that you must choose your spouse out of 100 applicants. You may interview each applicant once. After each interview you must decide whether to marry that person. If you decline, you lose the opportunity forever. If you work your way through 99 applicants without choosing one, you must marry the 100th. You may think you have 1 in 100 chance of marrying your ideal partner, but the truth is that you can do a lot better than that.

Interview half the potential partners, then stop at the next best one – that is, the first one better than the best person you’ve already interviewed. A quarter of the time, the second best partner will be in the first 50 people and the very best in the second. So 25 per cent of the time, the rule “stop at the next best one” will see you marrying the best candidate.

You can do even better. John Gilbert and Frederick Mosteller of Harvard University proved that you could raise your odds to 37 per cent by interviewing 37 people then stopping at the next best. The number 37 comes from dividing 100 by e, the base of the natural logarithms, which is roughly equal to 2.72. Gilbert and Mosteller’s law works no matter how many candidates there are – you simply divide the number of options by e. Suppose you find 50 companies that offer car insurance but you have no idea whether the next quote will be better or worse than the previous one. Should you get a quote from all 50? No, phone up 18 (50 divided by 2.72) and go with the next quote that beats the first 18.

This can also help you decide the optimal time to stop gambling. Decide on the maximum number of bets you will make – 20, for example. To maximise your chance of walking away at the right time, make seven bets and stop at the next one that wins you more than the previous biggest win.

This is an extract from żěè¶ĚĘÓƵ’s forthcoming book The World of Numbers (John Murray)

Read more: Jerome Cardano, the gambling genius behind quantum theory

Ěý

Topics: games / Mathematics