Cracking the Scratch Lottery Code: a good Wired article

Jonah Lehrer wrote an article for the February 2011 edition of Wired called "Cracking the Scratch Lottery Code." It's about Mohan Srivastava, a statistician with degrees from MIT and Stanford who has been looking into ways to beat the scratch ticket lottery system, a $70 billion a year business in North America.

Srivastava examined some tic-tac-toe lottery tickets published by the Ontario Lottery and found a defect. The visible numbers on the tickets could be used to figure out information about the numbers hidden under the scratch off material.

2781216199_1d6fd7b3dd.jpgThe trick itself is ridiculously simple. (Srivastava would later teach it to his 8-year-old daughter.) Each ticket contained eight tic-tac-toe boards, and each space on those boards--72 in all--contained an exposed number from 1 to 39. As a result, some of these numbers were repeated multiple times. Perhaps the number 17 was repeated three times, and the number 38 was repeated twice. And a few numbers appeared only once on the entire card. Srivastava's startling insight was that he could separate the winning tickets from the losing tickets by looking at the number of times each of the digits occurred on the tic-tac-toe boards. In other words, he didn't look at the ticket as a sequence of 72 random digits. Instead, he categorized each number according to its frequency, counting how many times a given number showed up on a given ticket. "The numbers themselves couldn't have been more meaningless," he says. "But whether or not they were repeated told me nearly everything I needed to know." Srivastava was looking for singletons, numbers that appear only a single time on the visible tic-tac-toe boards. He realized that the singletons were almost always repeated under the latex coating. If three singletons appeared in a row on one of the eight boards, that ticket was probably a winner.
Cracking the Scratch Lottery Code

Photo by Moacir P. de Sá Pereira. Creative Commons Attribution 2.0 Generic license.



  1. Doesn’t really matter if you can’t individually select the cards you’re buying; you get whatever scratch-off comes next in the roll. I guess you could decide whether you’d buy a visible ticket under the counter, but that’s alot of driving to find a winner.

  2. The thing that’s not clear to me is, what liquor store is he buying tickets from that lets him just stand around and inspect which lottery tickets he wants to buy?

    And why should what’s printed on the outside of the ticket have any bearing on whether it wins? What’s the sense in that? Shouldn’t they all just be exactly the same and not reveal anything until scratched off?

  3. That was a fascinating read. It had occurred to me that lottery numbers must not truly be random and that someone had to design the system of production, but I hadn’t imagined that cracking it could have such far reaching implications. The organized crime money laundering angle is mind-blowing.

    It wouldn’t take a brilliant mathematician to crack it either. Just one corrupt employee who knew how the system was designed.

  4. What about the ping pong balls? Aren’t those random? What could I do to maximize my probability of winning the regular lotto?

  5. Well, that’s what you get for not using an approved CSPRNG standard. Insufficient entropy strikes again!

  6. The thing that’s not clear to me is, what liquor store is he buying tickets from that lets him just stand around and inspect which lottery tickets he wants to buy?

    Liquor stores in Ontario aren’t the place to get lottery tickets. They’re sold at lottery kiosks in malls and at the counter in convenience stores. The scratch tickets are in a flat display case like this where you’re allowed to pick your ticket(s).

    I foresee a big increase in scratch’n win ticket sales this week in Ontario!

    This happened years ago. They pulled them from the stores once the statistician convinced the lottery people that their game was broken.

  7. I came across this article earlier in the week on another site. What was said was one could do is claim they need to buy a whole bunch of tickets as a prize for a raffle or something, and ask the vendor if they could return the unscratched ones for a refund. The vendor would usually say yes, and you could sort your winners out at your leisure at home.

  8. I, too, saw this on another blog a few days ago (the only conservative site I regularly read), and thought that the money-laundering part at the end was the most interesting. (They let you RETURN un-scratched tickets?!?!)

    Also interesting is the fact that the system doesn’t have to be unbreakable; It just has to have a sufficiently low profit-per-effort return to not be worth the time of the people who are smart enough to figure out how to do it.

    How unfortunate that the kind of math that I do all day (I have a Finite Element analysis running on the other window as I type this) cannot be used to extract profit from illegal activities ;]

  9. In Canada we mostly commonly refer to them as “Scratch and Win” tickets. And they’re most often sold on display under glass so you can examine and choose the exact ticket you want before you buy.

Comments are closed.