So goes popular opinion: the lottery’s an egregious societal evil implemented and overseen by shape-shifting, blood-drinking reptilian aliens. And that may be largely true – designed to slowly and quietly bleed dry your pockets – that is, unless you learn to drive it.

Assuming drawings actually are random, all the science in the world can’t help you pick the winning numbers. But some fiendishly simple stats can make the dollar you put down likely to win back that dollar and more.

For my book, Brain Trust, I interviewed Emory Mathematician, Skip Garibaldi (yes, the guy who disproved Garrett Lisi’s TOE), who said this: “Find a drawing in which the jackpot is unusually large and the number of tickets is unusually low.”

Argh! It’s so simple! For example, the March 6, 2007, Mega Millions drawing reached a record \$390 million; 212 million tickets were sold. Elaine and Barry Messner, of New Jersey, split the pot with truck driver Eddie Nabors, of Dalton, Georgia, who, when asked what he would do with the money famously said, “I’m going to fish.”

But it was a bad bet.

Despite the massive prize, the huge number of tickets sold meant that a dollar spent on this lottery returned only \$0.74 (versus \$0.95 for roulette). In fact, Mega Millions and Powerball have never once been a good bet: Extreme jackpots generate extreme ticket sales, increasing the chance of a split pot – the average return on a one-dollar Mega Millions ticket is only about \$0.55.

“But state lotteries don’t get the same kind of press,” says Garibaldi. In rare cases, a state lottery jackpot will roll over a couple times without spiking ticket sales.

Here’s the formula for finding a good lottery bet: Look for an after-tax, cash value of the jackpot that exceeds 0.8 times the odds against you, and in which the number of tickets sold remains less than one-fifth this jackpot.

If you happen to be away from your spreadsheets, here’s how to approximate the formula: Look for a jackpot that’s rolled over at least five times and that remains below \$40 million. It’s a good bet that it’s a good bet. And by a good bet, I mean a positive expected rate of return – over time, a dollar invested returns more than a dollar. To wit: a \$1.00 ticket for the March 7, 2007, Lotto Texas drawing had an expected rate of return of \$1.30. That’s a darn good bet.

Take a minute to scroll through online lottery listings till you find one that meets the criteria for a good bet. Okay, so you finally found one – what now?

Pick the most unpopular numbers, that’s what. By playing unpopular numbers you won’t win any more or less often, but you’ll less often split the pot with other winners.

Don’t pick the number one. It’s on about 15 percent of all tickets. Similarly, avoid lucky numbers 7, 13, 23, 32, 42, and 48. Better are 26, 34, 44, 45, and especially overlooked number 46. Avoid any recognizable pattern, but give slight preference to numbers at the edge of the ticket, which are underused. In mathematical terms, picking a unique ticket makes the jackpot look bigger and thus your lottery dollar look smarter.

If players in a 1995 UK National Lottery drawing had played unpopular numbers, they might’ve avoided splitting a £16 million pot 133 ways. That’s right – 133 people picked the numbers 7, 17, 23, 32, 38, 42, and 48, all straight down the ticket’s central column. Each got £120,000.

But despite your newfound ability to punk the lottery, the moral of Garibaldi’s surprisingly accessible paper on the subject is that while you can frequently make the lottery a good bet, it’s almost never a good investment. With money spread like a bell curve across different risk profiles according to the widely used portfolio theory, the extreme risk of a lottery means that in order for the left, risky edge of the bell curve to be a dollar tall, the total area of said curve has to be, like, \$10m.

Play smart over enough drawings, and eventually you'll win more than you spend. But unless you can buy all the tickets (another fun and somewhat involved statistical story!), you’re more likely to run out of money first.