Um... this is a break from our regularly scheduled programming. We'll look at doubles and accumulators next time. Right now I wrote an article on Helium about arbitrage which I thought I should reproduce here.
Arbitrage is the practice of making two or more financial transactions in such a way as to tie in a guaranteed profit. An example in the stock market world would be to buy a share at one price and simultaneously sell it for a higher price.
In gambling terms, an arbitrageur backs all of the possible outcomes in an event in such a way that any outcome results in a profit. An example would be to back one tennis player at 2.10 with one bookmaker and his opponent at 2.10 with another (staking GBP1 on both). Whichever player won, you would win 2.10 less your stakes, making a guaranteed profit of 10p.
In general, if you are to back one player at decimal odds of d1 and another at d2, you can arbitrage only if 1/d1 + 1/d2 < 1 (in the above case, the sum is about 0.95); to guarantee the same profit in either case, you will need to place stakes in the ratio (s1/s2) = (d2/d1) (i.e., so your stakes multiplied by the odds are the same). This is intuitive - you need to put more on the favourite than on the underdog to get the same return. Your profit will be s1.d1 - (s1 + s2).
Saturday, January 27, 2007
Asian Handicaps
OK, THIS time we'll talk a little bit about a specific type of sports betting. Asian Handicap betting is one of the most popular forms among serious soccer* gamblers, perhaps because the over-round is generally quite low**. On betfair, the commission is just 1%, the lowest it offers.
The original idea of the Asian Handicap was to get rid of the possibility of a draw. One of the teams would be given a head start of half a goal, so that a draw would be counted as a win for that team so far as the bet was concerned. If the teams were mismatched, maybe a goal and a half or more could be used as a handicap.
However, half goal head-starts are not the only possible way to eliminate to draw. Another way is to simply ignore it - in a zero-handicap game, if there's a draw you get your money back. Again, handicaps needn't be restricted to zero: one or two-goal handicaps are fairly common. If you backed a team with a two-goal handicap and they lost 1-0, you'd win your bet; if they lost 3-1, you'd get your money back. Only if they lost by three or more goals would you lose.
But not even that was enough for some people. Instead, quarter-goal handicaps were introduced. Now, obviously a quarter-goal handicap, taken literally, is just the same as a half-goal. But that's not what it means. Instead, a quarter-goal handicap comprises a pair of bets with the same stake, one at the handicap above and one at the handicap below. For instance, if you backed a team with a head start of 1/4, you would be effectively backing them with half your money at a handicap of 0, and half at a handicap of 1/2. If the team wins, you win both bets; if it's a draw, you win one bet and get your stake returned from the other; and if they lose... you lose too.
The next article will explore the mystical world of exotic bets, beginning with doubles and heading on to other types of accumulator.
* I apologise to anyone who is offended at me failing to use the word 'football'. I prefer to use 'soccer' and 'American football' to avoid any confusion.
** The over-round, or vigorish, is one minus the total of the implied probabilities for each selection. For instance, if Player 1 is available at odds of 2.00 and Player 2 at 1.80, the total probability is 0.50 + 0.44 = 0.94, or a 6% over-round.
The original idea of the Asian Handicap was to get rid of the possibility of a draw. One of the teams would be given a head start of half a goal, so that a draw would be counted as a win for that team so far as the bet was concerned. If the teams were mismatched, maybe a goal and a half or more could be used as a handicap.
However, half goal head-starts are not the only possible way to eliminate to draw. Another way is to simply ignore it - in a zero-handicap game, if there's a draw you get your money back. Again, handicaps needn't be restricted to zero: one or two-goal handicaps are fairly common. If you backed a team with a two-goal handicap and they lost 1-0, you'd win your bet; if they lost 3-1, you'd get your money back. Only if they lost by three or more goals would you lose.
But not even that was enough for some people. Instead, quarter-goal handicaps were introduced. Now, obviously a quarter-goal handicap, taken literally, is just the same as a half-goal. But that's not what it means. Instead, a quarter-goal handicap comprises a pair of bets with the same stake, one at the handicap above and one at the handicap below. For instance, if you backed a team with a head start of 1/4, you would be effectively backing them with half your money at a handicap of 0, and half at a handicap of 1/2. If the team wins, you win both bets; if it's a draw, you win one bet and get your stake returned from the other; and if they lose... you lose too.
The next article will explore the mystical world of exotic bets, beginning with doubles and heading on to other types of accumulator.
* I apologise to anyone who is offended at me failing to use the word 'football'. I prefer to use 'soccer' and 'American football' to avoid any confusion.
** The over-round, or vigorish, is one minus the total of the implied probabilities for each selection. For instance, if Player 1 is available at odds of 2.00 and Player 2 at 1.80, the total probability is 0.50 + 0.44 = 0.94, or a 6% over-round.
Friday, January 26, 2007
ELO, Élö, it's good to be back
So far, I haven't said anything at all about sports or rating systems. The sports thing, well, that's only going to change tangentially. The thrust of this piece is going to describe one of the best-known rating systems, the Élö system. I'm going to get tired of the accents, which may not show up on all systems, so I'll revert to calling it Elo like everyone else.
Elo is primarily used for chess. The basic premise is to compare how well a player did over a given time frame - say the number of games he* won in a month - with how well he ought to have done, given his ranking and his opponents'. At the end of the time period, his rating is adjusted to take those games into account.
That description leaves at least two questions: how do we know how well he ought to have done? and, how do we adjust the rating afterwards?
How well the player ought to have done depends on who he's played - if he's played ten games against Deep Blue, he might be expected to win one, if he's really good. Against my girlfriend's cat Darwin? Probably seven, if Darwin's on form. In fact, the number of games he's expected to win is the sum of the probabilities of each individual game**.
All well and good. But how do we figure out the probabilities of each game, given the ratings? This, unavoidably, is going to require some maths. If you have a rating of, say, 1700, and Darwin (who's only just started playing chess) is ranked at 1500, you have a rating difference (D) of +200. From Darwin's point of view, it's -200. The probability of you beating him is 1/(1 + 10(-0.025 D))***. In this case, that's 1/(1 + 10-0.5), or 1/(1 + 0.32), about 0.76. For Darwin, if you'd like to do the sums, it's 1/(1 + 3.16), or 0.24. Note that the probabilities add up to one, as they ought to****. Over ten games, you'd expect to win 7.60, while Darwin makes do with 2.4. (Incidentally, he plays worse if you throw a ball for him to chase.)
So, let's say you played ten games against Deep Blue - we'll say it has an Elo rating of 2800 - (D = -1100 for you) your probability for each game is very small (0.18% - about one in 550). In ten games, you'd expect to win about 0.02. Let's say you did well against Darwin and picked him off eight times, and Deep Blue creamed you, as is its way. You won eight games (W=8), and your expected number of wins was E=7.62 - you did better than expected by 0.38 wins. Very good.
The last step of the process is to adjust your rating. A certain weighting (K) is given to your recent results - in chess, it's usually about K=12, but in later articles I'll hopefully determine what the best values for tennis are. In this case, your rating goes up by K(W-E), or 4.62 points. Your new rating would be 1705 (rounded off).
* or she. Take that as read pretty much everywhere in this blog.
** For the mathematicians: The expected number of wins is sum(p_i) +/- sqrt(sum(p_i . (1 - p_i))).
*** The 0.025 is arbitrary, but the only difference it makes (so far as I can see) is to the spacing of rankings.
**** ... so long as we exclude the draw as a possible result. Which we do, for simplicity's sake.
Elo is primarily used for chess. The basic premise is to compare how well a player did over a given time frame - say the number of games he* won in a month - with how well he ought to have done, given his ranking and his opponents'. At the end of the time period, his rating is adjusted to take those games into account.
That description leaves at least two questions: how do we know how well he ought to have done? and, how do we adjust the rating afterwards?
How well the player ought to have done depends on who he's played - if he's played ten games against Deep Blue, he might be expected to win one, if he's really good. Against my girlfriend's cat Darwin? Probably seven, if Darwin's on form. In fact, the number of games he's expected to win is the sum of the probabilities of each individual game**.
All well and good. But how do we figure out the probabilities of each game, given the ratings? This, unavoidably, is going to require some maths. If you have a rating of, say, 1700, and Darwin (who's only just started playing chess) is ranked at 1500, you have a rating difference (D) of +200. From Darwin's point of view, it's -200. The probability of you beating him is 1/(1 + 10(-0.025 D))***. In this case, that's 1/(1 + 10-0.5), or 1/(1 + 0.32), about 0.76. For Darwin, if you'd like to do the sums, it's 1/(1 + 3.16), or 0.24. Note that the probabilities add up to one, as they ought to****. Over ten games, you'd expect to win 7.60, while Darwin makes do with 2.4. (Incidentally, he plays worse if you throw a ball for him to chase.)
So, let's say you played ten games against Deep Blue - we'll say it has an Elo rating of 2800 - (D = -1100 for you) your probability for each game is very small (0.18% - about one in 550). In ten games, you'd expect to win about 0.02. Let's say you did well against Darwin and picked him off eight times, and Deep Blue creamed you, as is its way. You won eight games (W=8), and your expected number of wins was E=7.62 - you did better than expected by 0.38 wins. Very good.
The last step of the process is to adjust your rating. A certain weighting (K) is given to your recent results - in chess, it's usually about K=12, but in later articles I'll hopefully determine what the best values for tennis are. In this case, your rating goes up by K(W-E), or 4.62 points. Your new rating would be 1705 (rounded off).
* or she. Take that as read pretty much everywhere in this blog.
** For the mathematicians: The expected number of wins is sum(p_i) +/- sqrt(sum(p_i . (1 - p_i))).
*** The 0.025 is arbitrary, but the only difference it makes (so far as I can see) is to the spacing of rankings.
**** ... so long as we exclude the draw as a possible result. Which we do, for simplicity's sake.
Thursday, January 25, 2007
The Gambler's Fallacy and the Law of Large Numbers
In its simplest form, the gambler's fallacy is to believe that, just because something hasn't happened for a while, it's due to happen soon. The usual example is a coin that comes up heads ten times in a row. The fallacious gambler thinks it has to come up tails soon - "the law of averages says it must!" But of course it needn't. The chances of the next toss being a tail remain 50-50, as they ever were.
There are occasions in which the gambler's reasoning might not be fallacious - for instance, if you were drawing cards from a pack without shuffling, each non-ace that was drawn would increase the chances of the next card being an ace - but in almost all gambling scenarios (at least in the casino and possibly excluding blackjack), there is no memory involved.
It's possible that the fallacious gambler is misremembering the Law of Large Numbers. This is a much misunderstood mathematical theorem - I once spent an entertaining breakfast arguing with a friend about this, much to the bemusement of everyone else in the backwater Wyoming diner. The Law says that, if you look at a random event for enough trials, the number of successes divided by the number of trials will get as close as you like to the probability. If you toss a million coins, you should end up with an observed probability of almost exactly 0.50. Unfortunately, that doesn't quite mean that you can put the bank on there being exactly 500,000 heads, though. In fact, the Law of Large Numbers even says how far away you can expect to be - in this case, on average you'll be within 500* tosses of that. I just ran a quick test, emptying my piggybank and tossing 1,000,000 coins a hundred times over**. I found:
So the experiment conforms pretty much exactly with what the Law predicts.
* in general, the expected number of successes, each with probability p in N trials, is pN +/- sqrt(Np(p-1)). The square root is a standard deviation; 68% of the time, the answer will lie within one SD of the mean (pN); about 95% of the time, it'll be within two.
** My piggybank is entirely virtual. Code and results are available on request; if there's enough demand I might make a little javascript to demonstrate.
There are occasions in which the gambler's reasoning might not be fallacious - for instance, if you were drawing cards from a pack without shuffling, each non-ace that was drawn would increase the chances of the next card being an ace - but in almost all gambling scenarios (at least in the casino and possibly excluding blackjack), there is no memory involved.
It's possible that the fallacious gambler is misremembering the Law of Large Numbers. This is a much misunderstood mathematical theorem - I once spent an entertaining breakfast arguing with a friend about this, much to the bemusement of everyone else in the backwater Wyoming diner. The Law says that, if you look at a random event for enough trials, the number of successes divided by the number of trials will get as close as you like to the probability. If you toss a million coins, you should end up with an observed probability of almost exactly 0.50. Unfortunately, that doesn't quite mean that you can put the bank on there being exactly 500,000 heads, though. In fact, the Law of Large Numbers even says how far away you can expect to be - in this case, on average you'll be within 500* tosses of that. I just ran a quick test, emptying my piggybank and tossing 1,000,000 coins a hundred times over**. I found:
- the average set of tosses contained 499,978 heads
- the standard deviation was about 460 - pretty close to what the Law predicts.
- 97% of the observations were within 1000 of the real mean
- 71% were within 500.
- None were exactly 500,000 (or even within 10).
So the experiment conforms pretty much exactly with what the Law predicts.
* in general, the expected number of successes, each with probability p in N trials, is pN +/- sqrt(Np(p-1)). The square root is a standard deviation; 68% of the time, the answer will lie within one SD of the mean (pN); about 95% of the time, it'll be within two.
** My piggybank is entirely virtual. Code and results are available on request; if there's enough demand I might make a little javascript to demonstrate.
The Search for Value
Almost any serious article about gambling will mention "value" at some point. Not many of them explain neatly what value is. They will generally give a few examples, assume you've got the point, and move on. So here, once and for all, is the definition of value: the value of the bet is the "real" probability of the result happening divided by the implied probability of the bookmaker's odds. If this number is greater than one, the bet constitutes value.
That seems simple enough. The implied probability might look a bit tricky, but it's not too bad. In decimal odds, the implied probability is simply one divided by the odds - so a team available at 2.00 to win have an implied probability of 0.50, or 50%. If the odds were 1.5, the implied probability would be two-thirds, or about 67%. Odds of 10.00 represent a 10% chance.
All well and good, if you're using decimal odds. What if you prefer the old-fashioned, 100-to-30 style favoured by men in cloth caps making odd gestures? Well, you're going to need to do a little more maths, I'm afraid. Odds in the style x-to-y against simply mean that the bookies imply the selection will lose x races for every y they win. X-to-y on is the other way around - they'll win x for every y they lose. Evens, or 1/1, means wins and losses are (implicitly) equally probable, 2/1 on* represents an implied probability of 2/3, and 9/1 against corresponds to a one in ten chance.
To convert fractional odds like these into implied probabilities, you take the number on the right (left if it's in the style of 2/1 on) and divide it by the sum of the two numbers - so it's the number of races you'd expect to win divided by the total number of races. You can easily see that 9/1 corresponds to 1/10 = 10%. (If you divide one by that, you get the decimal odds, 10.00.)
So much for the maths involved in working out implied probability. There are two burning questions that I can see I haven't answered. One, how do you compute the probability of winning? And two, why is value important? The first is one of the main things The Martingale will be looking into. The short answer is I don't know, but I hope to find out. I can answer the second, though:
A value bet is one where, if you repeated it often enough, you would win more money from winners than you lost from losing. For instance, if a horse was at 10.00 and you figured it had a one-in-eight chance of winning**, over a hundred races you'd expect it to win about 12 or 13 times. Each time, you'd be returned $10 for a $1 stake. So you'd get, let's say $125 back from the bookie after giving him only $100 - a profit of $25. The value (minus one) is the return (here, 0.25 or 25%) you'd expect on your money over the long term if you made bets at that value.
In the next article, I'd better talk about the gambler's fallacy and the law of large numbers.
* This also gets written as 1/2, in which case the first definition is correct - the selection loses one race for every two it wins.
** (1/8) / (1/10) = 10/8 = 1.25, so this is value.
That seems simple enough. The implied probability might look a bit tricky, but it's not too bad. In decimal odds, the implied probability is simply one divided by the odds - so a team available at 2.00 to win have an implied probability of 0.50, or 50%. If the odds were 1.5, the implied probability would be two-thirds, or about 67%. Odds of 10.00 represent a 10% chance.
All well and good, if you're using decimal odds. What if you prefer the old-fashioned, 100-to-30 style favoured by men in cloth caps making odd gestures? Well, you're going to need to do a little more maths, I'm afraid. Odds in the style x-to-y against simply mean that the bookies imply the selection will lose x races for every y they win. X-to-y on is the other way around - they'll win x for every y they lose. Evens, or 1/1, means wins and losses are (implicitly) equally probable, 2/1 on* represents an implied probability of 2/3, and 9/1 against corresponds to a one in ten chance.
To convert fractional odds like these into implied probabilities, you take the number on the right (left if it's in the style of 2/1 on) and divide it by the sum of the two numbers - so it's the number of races you'd expect to win divided by the total number of races. You can easily see that 9/1 corresponds to 1/10 = 10%. (If you divide one by that, you get the decimal odds, 10.00.)
So much for the maths involved in working out implied probability. There are two burning questions that I can see I haven't answered. One, how do you compute the probability of winning? And two, why is value important? The first is one of the main things The Martingale will be looking into. The short answer is I don't know, but I hope to find out. I can answer the second, though:
A value bet is one where, if you repeated it often enough, you would win more money from winners than you lost from losing. For instance, if a horse was at 10.00 and you figured it had a one-in-eight chance of winning**, over a hundred races you'd expect it to win about 12 or 13 times. Each time, you'd be returned $10 for a $1 stake. So you'd get, let's say $125 back from the bookie after giving him only $100 - a profit of $25. The value (minus one) is the return (here, 0.25 or 25%) you'd expect on your money over the long term if you made bets at that value.
In the next article, I'd better talk about the gambler's fallacy and the law of large numbers.
* This also gets written as 1/2, in which case the first definition is correct - the selection loses one race for every two it wins.
** (1/8) / (1/10) = 10/8 = 1.25, so this is value.
Wednesday, January 24, 2007
The Martingale
You're in the casino and place a $1 bet on red. It doesn't come up, so you place a $2 bet on red, so that if you win you pick up $4 - everything you've staked so far, plus a dollar. It misses again, so you bet $4 - the $8 you'll surely win THIS time covers all you've staked - $1 + $2 + $4 = $7, plus a dollar to win. Red's bound to come up eventually, so eventually you'll make your dollar. It's a foolproof system! It's called the Martingale, and - unfortunately - it doesn't work very well.
The word martingale derives from the town on Martigue in Provence, southern France. In Martigue, where trousers were traditionally worn fastened at the back. "A la martingale" soon came to mean 'in a ridiculous fashion' and is applied in exactly that sense to the system above.
The problem with the Martingale is that your bet size gets very big very quickly - as you can see below.
Bet number: Stake size
1: $1
2: $2
3: $4
4: $8
5: $16
6: $32
7: $64
8: $128
9: $256
10: $512
After losing ten bets in a row (which will happen a little fewer than once in a thousand times*), you'll be looking to gamble over $1000 dollars to win just one in return - and the odds you're getting are still a little worse than evens. Yes, you're bound to win your dollar in the end - as long as you have an infinite bankroll. Eventually, you will simply reach a point where you don't have enough to carry on playing, and you have to stomach a devastating loss.
* Actually, in a casino the odds are slightly worse than this because of the house edge. In an American casino with two zeroes, the probability of red is about 0.47 rather than the 50% implied by the odds. That makes the probability of ten losing red bets in a row about one in 610.
The word martingale derives from the town on Martigue in Provence, southern France. In Martigue, where trousers were traditionally worn fastened at the back. "A la martingale" soon came to mean 'in a ridiculous fashion' and is applied in exactly that sense to the system above.
The problem with the Martingale is that your bet size gets very big very quickly - as you can see below.
Bet number: Stake size
1: $1
2: $2
3: $4
4: $8
5: $16
6: $32
7: $64
8: $128
9: $256
10: $512
After losing ten bets in a row (which will happen a little fewer than once in a thousand times*), you'll be looking to gamble over $1000 dollars to win just one in return - and the odds you're getting are still a little worse than evens. Yes, you're bound to win your dollar in the end - as long as you have an infinite bankroll. Eventually, you will simply reach a point where you don't have enough to carry on playing, and you have to stomach a devastating loss.
* Actually, in a casino the odds are slightly worse than this because of the house edge. In an American casino with two zeroes, the probability of red is about 0.47 rather than the 50% implied by the odds. That makes the probability of ten losing red bets in a row about one in 610.
Welcome
My name is Colin and I'll be your guide to all kinds of gambling and probability-related maths in this blog. I'm happy to field questions and try to put right any errors you find. I ought to emphasise the DISCLAIMER:
The Martingale comes with absolutely no warranty of any description. You can use information contained herein any way you like (although if you republish it anywhere, you must include the disclaimer in full as well as a link to the original article), but it's not my fault if you lose all your money. Gambling may not be legal depending on how old you are and where you are. If you get busted, that's not my fault either.
You might well ask - why are you sitting here writing a blog instead of ripping Vegas to shreds, if you know so much about gambling? It's a fair question. My interest is more in sports betting than casino gaming, and I'm currently based in the US where such things are generally illegal - or at best, awfully shady. I'm also the kind of mathematician who's much more interested in solving complex probability puzzles than making much money using them. Which is why this is all free and accessible to everyone.
It's called The Martingale after a staking system that doesn't work, described in the following post. The url is martegal.blogspot.com because martingale was taken, and martegal is the Portuguese word from which Martingale was derived.
The Martingale comes with absolutely no warranty of any description. You can use information contained herein any way you like (although if you republish it anywhere, you must include the disclaimer in full as well as a link to the original article), but it's not my fault if you lose all your money. Gambling may not be legal depending on how old you are and where you are. If you get busted, that's not my fault either.
You might well ask - why are you sitting here writing a blog instead of ripping Vegas to shreds, if you know so much about gambling? It's a fair question. My interest is more in sports betting than casino gaming, and I'm currently based in the US where such things are generally illegal - or at best, awfully shady. I'm also the kind of mathematician who's much more interested in solving complex probability puzzles than making much money using them. Which is why this is all free and accessible to everyone.
It's called The Martingale after a staking system that doesn't work, described in the following post. The url is martegal.blogspot.com because martingale was taken, and martegal is the Portuguese word from which Martingale was derived.
Subscribe to:
Posts (Atom)