Showing posts with label lottery. Show all posts
Showing posts with label lottery. Show all posts
02 February 2011
How to win the Ontario lottery's tic-tac-toe game
Jonah Lehrer writes for Wired on breaking a scratch-off game in the Ontario lottery. In 2003, Mohan Srivastava, a geostatistician, figured out a way to crack a tic-tac-toe game that the Ontario lottery was running at the time. In this game, you're given a set of eight three-by-three grids with numbers between one and thirty-nine on them (seventy-two numbers in total) -- these are visible to you when you buy the tickets. After buying the ticket, you then scratch off a set of "your numbers"; if three of these numbers appear in a row in one of the grids, in tic-tac-toe fashion, you win. Since there are 72 numbers on the ticket and they are between 1 and 39, there is much repetition. It turned out that if a ticket contained three non-repeated numbers in a row it was very likely to be a winner.
The article doesn't say how the tickets are turned out this way, though; what sort of algorithm could produce this behavior? But for Srivastava's purpose of demonstrating that it's possible to tell winning tickets from losing tickets with high probability, this was not necessary. Srivastava also points out that this isn't worth it as a way to make money, unless possibly if you could hypothetically get your hands on a pile of tickets, go through them at home, and return the losing ones to the store.
(I learned about this from metafilter. The commenters there, a usually reliable bunch, seem to be split on whether you could return the losing tickets or not.)
The article doesn't say how the tickets are turned out this way, though; what sort of algorithm could produce this behavior? But for Srivastava's purpose of demonstrating that it's possible to tell winning tickets from losing tickets with high probability, this was not necessary. Srivastava also points out that this isn't worth it as a way to make money, unless possibly if you could hypothetically get your hands on a pile of tickets, go through them at home, and return the losing ones to the store.
(I learned about this from metafilter. The commenters there, a usually reliable bunch, seem to be split on whether you could return the losing tickets or not.)
09 July 2008
Lottery tickets with really bad odds
A CNN.com article talks about lottery tickets with zero probability of winning.
Why, you ask? Because some state lotteries continue selling the tickets for scratch-off games even after the top prize has been awarded. Therefore the odds stated on the ticket are, as of the time the ticket was purchased, incorrect.
But let's say that half the tickets for some game have already been sold, and the top prize not awarded -- then the tickets that are still out there have double the probability of winning that they did originally. You wouldn't see anybody complaining about that.
One way to fix this would be to have all the tickets be independent of each other, but drawn from the same distribution -- so instead of having one grand prize among the 100,000 tickets, each ticket independently has probability 0.00001 of being a grand prize ticket. But then there's a significant probability that there will be no grand prizes awarded, or that there would be two or more.
And some lottery websites actually state which prizes have already been awarded. So it might be possible for somebody to use this information to their advantage, by betting only in lotteries where a disproportionate number of prizes remain to be awarded. This is basically the same principle as card-counting in blackjack, where the player bets more when the cards in the deck are more favorable. I suspect, though, that this wouldn't work well because the house edge in lotteries is much higher than that in casinos.
Why, you ask? Because some state lotteries continue selling the tickets for scratch-off games even after the top prize has been awarded. Therefore the odds stated on the ticket are, as of the time the ticket was purchased, incorrect.
But let's say that half the tickets for some game have already been sold, and the top prize not awarded -- then the tickets that are still out there have double the probability of winning that they did originally. You wouldn't see anybody complaining about that.
One way to fix this would be to have all the tickets be independent of each other, but drawn from the same distribution -- so instead of having one grand prize among the 100,000 tickets, each ticket independently has probability 0.00001 of being a grand prize ticket. But then there's a significant probability that there will be no grand prizes awarded, or that there would be two or more.
And some lottery websites actually state which prizes have already been awarded. So it might be possible for somebody to use this information to their advantage, by betting only in lotteries where a disproportionate number of prizes remain to be awarded. This is basically the same principle as card-counting in blackjack, where the player bets more when the cards in the deck are more favorable. I suspect, though, that this wouldn't work well because the house edge in lotteries is much higher than that in casinos.
16 March 2008
Powerball "curse"? Come on...
From the Powerball FAQ:
They then go on to explain that there's such a thing as the Law of Large Numbers, and that the machine doesn't know anything about who bought the tickets. But this is buried pretty deep in the FAQ, so I wonder if people see it.
I can understand how someone might be suspicious that certain numbers come up more often than others -- maybe for whatever reason some balls come out of the machine more often than others. But how could the machine know what sort of people bought the tickets? (And even if it could, it would be incredibly difficult to load the balls appropriately, given the constraint that you can't get an arbitrary distribution on the many millions of combinations by just weighting down some of the 49 balls. There are nowhere near enough degrees of freedom -- if I want to weight the balls in such a way as to make 1-2-3-4-5 more/less likely, then other combinations involving some of those numbers will be made more/less likely as well.)
But people do ask this question, and some of them seem to believe that Philadelphia is cursed with regard to Powerball winnings.
HOW COME THE ONLY JACKPOT WINNERS ARE FROM THE [EAST - WEST - NORTH - SOUTH - CITIES - RURAL AREAS]?
HOW COME ONLY [WHITE, BLACK, TALL, SKINNY, YOUNG, OLD] PEOPLE WIN?
Powerball is a random game that knows nothing about who buys a ticket or where the ticket was purchased. [...]
They then go on to explain that there's such a thing as the Law of Large Numbers, and that the machine doesn't know anything about who bought the tickets. But this is buried pretty deep in the FAQ, so I wonder if people see it.
I can understand how someone might be suspicious that certain numbers come up more often than others -- maybe for whatever reason some balls come out of the machine more often than others. But how could the machine know what sort of people bought the tickets? (And even if it could, it would be incredibly difficult to load the balls appropriately, given the constraint that you can't get an arbitrary distribution on the many millions of combinations by just weighting down some of the 49 balls. There are nowhere near enough degrees of freedom -- if I want to weight the balls in such a way as to make 1-2-3-4-5 more/less likely, then other combinations involving some of those numbers will be made more/less likely as well.)
But people do ask this question, and some of them seem to believe that Philadelphia is cursed with regard to Powerball winnings.
01 November 2007
Expecting the unexpected in lotteries
Pattern analysis of MegaMillions Lottery Numbers, from omninerd.com, via slashdot. The author suggests that one should play the numbers which have come up often in the lottery, because they're more likely to come up often again, and backs it up with a pile of meaningless charts.
But of course some numbers are going to come up more often than others. It would be kind of creepy if all the numbers had come up equally often! For example:
Let's assume that the number of times each of the balls has appeared is independent (this is roughly true because there are so many balls). These should be independent binomial distributions with mean np and variance np(1-p), where n is the number of drawings in question and p is the probability that a ball comes up in a given drawing; these can be approximated by normal random variables. The maximum of k numbers chosen uniformly at random from [0,1] has expected value k/(k+1) (this isn't obvious, but it's a fairly standard fact); the maximum of the 56 z-scores (number of standard deviations from the mean) for the balls should be at the 100(56/57) = 98.3 percentile of the normal distribution.
And that's about 2.11 standard deviations from the mean.
Not to mention that expressing things in terms of standard deviations really throws away a huge amount of the data...
I'm not going to dissect this much further. But by the previous analysis, consider a 56-ball lottery where 5 balls are picked each day. After n days, the number of times that ball 1 (or any other ball fixed in advance) has been picked is approximately normally distributed with mean 5n/56 and variance n(5/56)(51/56); the standard deviation is thus the square root of this, about .285n1/2. The maximum of the 56 random variables defined like this is about 2.11 standard deviations above the mean, so about 5n/56 + .602n1/2.
Say n is 1000; then the maximum of the number of times ball k has been picked, over all k from 1 to 56, can be estimated by plugging in n = 1000 here; you get 108. But the average ball gets chosen 5000/56 times, or about 89 times. Each individual ball will be chosen near n/56 times; but there's bound to be some outlier. More generally, something unexpected happens in just about any random process, but you can't predict what unexpected thing will happen. That's why it's unexpected!
(Incidentally, if I were going to pick numbers to bet on based on probability, I'd pick the ones that come up about the expected number of times. Some people will bet on numbers that have come up a lot recently because they think they're "hot"; some people will bet on numbers that have come up rarely recently because they think they're "due". Since I don't believe numbers are "hot" or "due", my key to success in playing the lottery would be to play numbers that other people are less likely to play. But an even more successful strategy is not playing at all.)
But of course some numbers are going to come up more often than others. It would be kind of creepy if all the numbers had come up equally often! For example:
Players have had the option of drawing numbers between 1 and 56 since June 22, 2005. Every number has been drawn at least ten times while the most frequently drawn number has appeared thirty times. Overall, each number has appeared an average of twenty times. Despite being drawn the most, both 7 and 53 are only 2.17 deviations from the mean. Even the least drawn number, 47, is -2.17 deviations from the mean.
Let's assume that the number of times each of the balls has appeared is independent (this is roughly true because there are so many balls). These should be independent binomial distributions with mean np and variance np(1-p), where n is the number of drawings in question and p is the probability that a ball comes up in a given drawing; these can be approximated by normal random variables. The maximum of k numbers chosen uniformly at random from [0,1] has expected value k/(k+1) (this isn't obvious, but it's a fairly standard fact); the maximum of the 56 z-scores (number of standard deviations from the mean) for the balls should be at the 100(56/57) = 98.3 percentile of the normal distribution.
And that's about 2.11 standard deviations from the mean.
Not to mention that expressing things in terms of standard deviations really throws away a huge amount of the data...
I'm not going to dissect this much further. But by the previous analysis, consider a 56-ball lottery where 5 balls are picked each day. After n days, the number of times that ball 1 (or any other ball fixed in advance) has been picked is approximately normally distributed with mean 5n/56 and variance n(5/56)(51/56); the standard deviation is thus the square root of this, about .285n1/2. The maximum of the 56 random variables defined like this is about 2.11 standard deviations above the mean, so about 5n/56 + .602n1/2.
Say n is 1000; then the maximum of the number of times ball k has been picked, over all k from 1 to 56, can be estimated by plugging in n = 1000 here; you get 108. But the average ball gets chosen 5000/56 times, or about 89 times. Each individual ball will be chosen near n/56 times; but there's bound to be some outlier. More generally, something unexpected happens in just about any random process, but you can't predict what unexpected thing will happen. That's why it's unexpected!
(Incidentally, if I were going to pick numbers to bet on based on probability, I'd pick the ones that come up about the expected number of times. Some people will bet on numbers that have come up a lot recently because they think they're "hot"; some people will bet on numbers that have come up rarely recently because they think they're "due". Since I don't believe numbers are "hot" or "due", my key to success in playing the lottery would be to play numbers that other people are less likely to play. But an even more successful strategy is not playing at all.)
23 June 2007
You can't win if you don't play
A Dutch woman has sued the Nationale Postcode Loterij ("National Postcode Lottery"); from what I can gather, some of the winnings in this lottery are shared among all the people who bought a ticket and who share the same postal code as the jackpot winner.
This woman didn't buy a ticket, and sued for emotional distress.
A lot of US states (Pennsylvania, my home state, included) have two fairly low-stakes lottery games, one of which consists of picking three numbers from 0 to 9, and one of which consists of picking four. One could concatenate those numbers to get something of the form 867-5309, which is coincidentally the form of US phone numbers without the area code. I've always thought it would be kind of amusing if the people who had that phone number got some money. Not a large amount, because they didn't buy a ticket -- maybe a few thousand dollars. That would cause a lot less neighborly stress; Pennsylvania has ten area codes and the people who won would be in ten different geographical places, and almost certainly don't know each other.
This woman didn't buy a ticket, and sued for emotional distress.
A lot of US states (Pennsylvania, my home state, included) have two fairly low-stakes lottery games, one of which consists of picking three numbers from 0 to 9, and one of which consists of picking four. One could concatenate those numbers to get something of the form 867-5309, which is coincidentally the form of US phone numbers without the area code. I've always thought it would be kind of amusing if the people who had that phone number got some money. Not a large amount, because they didn't buy a ticket -- maybe a few thousand dollars. That would cause a lot less neighborly stress; Pennsylvania has ten area codes and the people who won would be in ten different geographical places, and almost certainly don't know each other.
Subscribe to:
Comments (Atom)