Live data from Hacker News

Cracking the Scratch Lottery Code

wired.com

81–90 of 107 posts

Re: Cracking the Scratch Lottery Code

#81
post #28
post #5

Earlier quoted context omitted.

Ironic? no; sad? yes.

I find irony in the fact that if the populous were better educated, the state would get less money. While not strictly true (a better educated populous would probably earn more, and give more taxes to the state, among other reasons), I find the idea on this small scale amusing.

Given the nature of this comment, I feel that I am justified in commenting to inform you that the word you are looking for is "populace."

Re: Cracking the Scratch Lottery Code

#82
post #75
post #37

Earlier quoted context omitted.

The last thing the lottery people want is a lot of attention to the flaws in their games. Threatening the whistleblower would cause that.

The cynical bastard in me thinks that There Is A Chance To Beat The Lottery is the best headline a lottery PR team could ever hope for. It is like card counting in Vegas: a problem if and only if you can do it well .

or people well assume it's an inside job from the start. That the majority of winning tickets are snatched up before they ever show up at the gas station.

Re: Cracking the Scratch Lottery Code

#83

I wouldn't have been surprised if they had known about the 'flaw', but didn't mind it, because, as Srivastava said "it wasn't worth the time to abuse the flaw". In similar vein, I once randomly generated 2 million out of 40 million possible codes. Consumers would buy products, obtain a code and it would allow them to 'buy one, get one free' for some other product. The code being short and without the usual mixup cand…

It wasn't economical for the statistician, since he was making more than he could possibly make doing this. It would likely be economical for many other people, however.

He said he could make $600/day doing this. Even if you only do this 5 days a week and give yourself 2 weeks of vacation, you still end up making $150,000/yr ($600/day * 50 weeks/yr * 5 days/week). That's well above the national average for both the US and Canada.

Re: Cracking the Scratch Lottery Code

#84
Can someone describe the statistical analysis that would be required to discover something like this? Is it along the lines of guessing different parts of an algorithm till you find something that agrees with the data (IE He'd have to guess that only "singletons" could form winning entries and go from there)? Or, are there some more general approaches here to draw out correlations between the structure of visible numbers and any hidden structure?

More generally, other than saying "statistics," what specific fields of math are applicable to a problem like this? I'd guess there's some relation here with cryptographic attacks and attacks against pseudo random generators, but what specifically would one study to understand these types of problems?

Re: Cracking the Scratch Lottery Code

#85

Can someone describe the statistical analysis that would be required to discover something like this? Is it along the lines of guessing different parts of an algorithm till you find something that agrees with the data (IE He'd have to guess that only "singletons" could form winning entries and go from there)? Or, are there some more general approaches here to draw out correlations between the structure of visible num…

My guess is the following. Lets say that the numbers in the game are in the range [1..N]. Lets further assume that there are M slots (or squares where numbers are placed). Suppose M is about 3*N. So, on average, you'd expect each number to occur 3 times. If you see that number occur only once in the (visible) column on the right, then you are pretty sure that it'll occur at least once or twice in the (hidden) column on the left. So if you see 3 numbers in a row (or column) that each occur only once in the right hand side, then you can be fairly certain that they'll occur at least once in the left side; so you're pretty sure to win the prize.

All you need is some basic knowledge of statistics, uniform distribution, etc. I don't see a need for high-falutin' cryptographic analysis and higher order math.

If you're dealing with online stuff, then some knowledge of PRNGs can help. I remember (a long time ago) hearing about some online poker algorithm which was just calling rand(), and had been seeded with unix time. That leaves a really small number of possibilities to try, and you can reconstruct the stream of random numbers it would generate.

Re: Cracking the Scratch Lottery Code

#86
post #47
post #35

I wish the article had talked about the legality of doing this. Assuming I'm not doing this to launder money and that I report all my earnings, is this legal?

Not a lawyer, but I would be very surprised if the law that creates and regulates the lottery doesn't include a clause to make buying tickets by an algorithm illegal or something like it.

Why? The law says that you can buy tickets, and return unused ones. So just buy a bunch, scratch the winning ones, and return the rest.

There's no law which says that "if you can figure out how the lottery works, it is illegal". Their recourse is to only pull the lottery and discontinue it; they can't accuse you of fraud if you somehow figured out how to pick the right tickets.

Re: Cracking the Scratch Lottery Code

#87
post #78
post #6

Earlier quoted context omitted.

...but you can teach the technique to someone who is not so smart. Or you can use the technique to launder money.

Or you could write a Beat The Lottery iPhone app. (OCR plus counting... I somehow think they can make it work.) There are a variety of business models available at that point.

Oh dear. Why do I sense an impending deluge of iPhone apps in this domain?

Re: Cracking the Scratch Lottery Code

#88
post #45

The lottery system can now confidently continue to extracting money out of idiots who don't know better. Somehow this whole story leaves me feeling that nothing good has happened. The whole story just feels like a good Samaritan helping a schoolyard bully steal change out of the back pockets of unwitting classmates. A happy ending would be the lottery system managers getting thrown out after suffering unexpected sust…

These are scratch cards, so they already have a set payout for the number they produce. So unless the cards are getting returned to the lotteries and refunded (this might even happen in some cases, I'm not sure) they aren't losing any money. It's just the other people who play the lottery who will have a far lesser chance of winning (as they are sold all the losing tickets rejected by the cheaters)

Re: Cracking the Scratch Lottery Code

#89
post #35

I wish the article had talked about the legality of doing this. Assuming I'm not doing this to launder money and that I report all my earnings, is this legal?

I think so. Obviously, the lottery isn't happy if people actually figure out how to break it; but there are quite a few people who think "7 is lucky", and I can't figure out a good way to separate the actual winners from people who only think they are winners. And lotteries make their money from the latter...

Re: Cracking the Scratch Lottery Code

#90
post #85

Can someone describe the statistical analysis that would be required to discover something like this? Is it along the lines of guessing different parts of an algorithm till you find something that agrees with the data (IE He'd have to guess that only "singletons" could form winning entries and go from there)? Or, are there some more general approaches here to draw out correlations between the structure of visible num…

My guess is the following. Lets say that the numbers in the game are in the range [1..N]. Lets further assume that there are M slots (or squares where numbers are placed). Suppose M is about 3*N. So, on average, you'd expect each number to occur 3 times. If you see that number occur only once in the (visible) column on the right, then you are pretty sure that it'll occur at least once or twice in the (hidden) column…

That makes sense, but theres still the problem that, even if you have 3 in a row that you think have a higher probability of occurring in the hidden part, they can still be X or O, not necessarily winning. Maybe theres a statistical edge in knowing that, but I doubt that would give you an edge of 90%.

Also, that seems to indicate the issue is due to the overall structure of the problem of choosing numbers for a game like this, while I got the sense from the article that the problem was more due to the algorithm the company used to control winners and losers (maybe I'm wrong on that). If it is due to how the company controls wins in some way, I could see how observing 3 in a row of singles more often than expected by a random distribution (whatever the distribution is for choice of number and choice of spot on the board) is a giveaway to some nonrandomness introduced by their algorithm. But if you were to approach it by finding divergences from this distribution, wouldn't you need a lot of tickets before you could infer this?

In any case - any guess on the expected number of tickets you'd have to have to discover a flaw like this?

Post reply on HN