The country is in the throes of lottery fever, with millions of people in multiple states buying up tickets for a chance at winning the Mega Millions jackpot Friday night, now at $540 million. But are they suckers? Or is the lottery actually a good deal?

Feeling lucky tonight. (Gabe Hernandez/Associated Press)

“Unfortunately for those of you hoping to buy a sports team,” concludes Elson, “this means the expected value of a $1 ticket is only 63.2 cents (or a bit more or less, depending on your state).” So Friday night’s lotto isn’t such a good deal after all. Unless, like Felix Salmon, you find the act of playing the lottery itself a pleasant experience.

Of course, another strategy would simply be to buy up every single ticket combination. That would cost $176 million. But you’d be guaranteed to win about $293 million after taxes. Good deal, right? But there’s one big hitch: “First, if it takes five seconds to fill out each card, you’d need almost 28 years just to mark the bubbles on the game tickets. You’d also use up the national supply of special lottery paper and lottery-machine printing ink well before all your tickets could be printed out.” (Also, if just one other person picked the winning number, you’d end up losing $30 million all told.)

Alternatively, you could try to hack the lottery, as these people did. This can be done even for completely random drawings. The numbers on the tickets for the Massachusetts Cash WinFall, for instance, are totally random. But, as the Boston Globe discovered, Marjorie and Gerald Selbee appear to have discovered a different loophole in the game. If no one wins the lottery’s big $2 million prize, then, after a few weeks, payouts for smaller prizes start rising automatically. And, at that point, anyone who buys gobs and gobs of tickets — at least $100,000 worth — is assured a profit. Perhaps there’s a similar pattern with Mega Millions.

In any case, however, your biggest problem might be what happens if you actually win. A 1978 study out of Northwestern and the University of Massachusetts compared the happiness of lottery winners with non-winners and paraplegic accident victims. It turns out that the non-winners and the paraplegics actually derived more pleasure from everyday activities like talking with friends and watching television than the lotto winners did. As Simon van Zuylen-Wood explains, “winning the lottery sets a new baseline for happiness, rendering winners unable to enjoy the simple pleasures they used to.”

View Photo Gallery: The latest Mega Millions game did not have a lucky winner in its most recent drawing Tuesday, sending the jackpot to an estimated $540 million, the largest in U.S. history. Here’s a look at some of the past winners who scored huge jackpots and/or set records playing the multi-state Mega Millions and Powerball games.

More from Post Business:

The next economic indicator: Happiness?

Is Google planning iPad competitors?

Struggling BlackBerry maker to return focus to its business customers