6 ms·
Not directly related but while I have the eyes of some technical people reading about the lottery, I want to throw this out there. I have 4+ years worth of dai
by eihli 5y ago
Not directly related but while I have the eyes of some technical people reading about the lottery, I want to throw this out there.
I have 4+ years worth of daily scratch off lottery ticket results from a dozen or so different states.
Every day, the state updates their website with the numbers of tickets remaining at each ticket level. I've been scraping that and saving it.
If anyone would find this data interesting I'd be happy to share the SQLite database. I just ask that you share your code/queries and what you find.
- Are the grand prizes truly random? Or are they stratified?
- Do games end with an unusually high number of grand prizes unclaimed?
- Is there a buffer when a game is first released when no grand prize is possible?
You could scan some Working Papers to get ideas of things to check the integrity of: https://docs.zohopublic.com/file/pze38fbeed85562834d5696105bc58aca2666 https://docs.zohopublic.com/file/pze38fbeed85562834d5696105b...
Those working papers have things like "guaranteed low-end prize structures" per pack of tickets.
Tips based on those working papers:
- Buy from a fresh pack until you get a winner then stop. Since there's a guaranteed number of winners per pack, each loser you scratch improves the odds for the rest of the pack.
- Don't buy from a pack that's already had a big winner. Most working papers stipulate no more than 1 large prize per pack.
- rPlayer6554 5y agoWow I'd be very interested in that
- YeBanKo 5y agoI would be interested, if you are willing to share the data. Actually, I am thinking now: what if you introduce some anomaly in the data. Something like the man did in the article (draw from a different distribution), and a challenge would be to detect it.
- rbassett3 5y agoI am a university Prof and a statistician. I'd love to get these data into my courses if you are willing to share it. It's a great example that students can easily relate to.
- stainforth 5y agoTo #2, as typical consumer walking in to buy a scratch-off, it's unlikely you will know the results of a in-use pack.
- eihli 5y agoEmployees could really game the system. On average there's 1 "big" prize (outside the GLEP prizes) every 4 packs. Any time you see a pack go from start to ~5 remaining without a big prize, buy every remaining ticket. There's also guaranteed restrictions on the maximum number of losers in a row. So if you see ~6+ (depends on ticket) losers in a row, then buy the next few until you win. I've run simulations on those distributions and it's profitable. But it's a situation that only an employee could take advantage of. And it probably comes up rarely.
- User23 5y agoI knew a bartender who did exactly this with pull tabs.
- jallen_dot_dev 5y agoI'm a bit confused. How does the employee know that the previous 6 tickets were losers? It's not like all customers are scratching them off then and there in front of them?
- wahern 5y ago> It's not like all customers are scratching them off then and there in front of them? A good number of tickets (most tickets?) are purchased by habitual players who'll buy many tickets per sale, and many of those people will even scratch them off in the store: > “Some customers come in up to three times a day to play, spending up to one hour to scratch-off tickets right in the store after spending $300 or more.” https://www.cspdailynews.com/technologyservices/inside-market-basket-c-store-lottery-buyer https://www.cspdailynews.com/technologyservices/inside-marke... If you don't see this happening often, you're not likely living in poor or low-income neighborhoods, not patronizing the local convenience stores, or at least not paying attention to the 1 or 2 individuals that you'll often see lingering near the counter.
- eihli 5y agoHere's the data through ~October of last year. ~500MB. https://docs.zohopublic.com/file/pze38c35faf87eb654907b51890b684fb7d7d https://docs.zohopublic.com/file/pze38c35faf87eb654907b51890... I'm using it to power https://scratchoff-odds.com https://scratchoff-odds.com right now.
- eihli 5y agoIf you do something cool with it, let me know at support@scratchoff-odds.com.
- 41b696ef1113 5y agoWhat is with the fractional numbers in `game.num_tx_initial` for some of the rows? I am assuming this is number of tickets sold. Parsing error? Edit: The site is pretty cool. I get strong vibes of the Winfall lottery story[0] [0] https://highline.huffingtonpost.com/articles/en/lotto-winners/ https://highline.huffingtonpost.com/articles/en/lotto-winner...
- eihli 5y agoSome states only publish claim numbers for prizes over a certain amount. For prizes below that amount, I estimate using the % claimed of all published prizes. If 25% of the prizes greater than $30 have been claimed, then I assume 25% of the prizes lesser than $30 have been claimed. Everything in the low numbers has large enough data pools for it to average out accurately. It's not until you get to the $600+ prize level where things would be really inaccurate. You'll also note there's usually a lag for prizes $600+. When you look at aggregates across states, you might see something like 25% of prizes below $600 have been claimed but only 19% of prizes above $600 have been claimed. I figure that's because $600+ has to be claimed at lottery headquarters and go on taxes. So people might delay, try to hide the money from their spouse, wait for tax reasons, the headquarters has to manually process it rather than the automated machine at a retail outlet, whatever...
- eihli 5y agoActually that other explanation is for fractional tickets in other locations of the database, like prizes remaining. Specifically in `num_tx_initial` it might be because they don't report the number of tickets printed. But if they print the odds of a win and numbers of winners available, then you can estimate how many non-winners there are and thus how many printed tickets there are.
- overtonwhy 5y agoAre you addicted to scratchers?
- m4tthumphrey 5y agoA relative did this math the.. not so legal way... and the most he "won" on about 50k cards was £100.