House edge and expected value are useless when applied to the lottery (lotto)
Here's a lesson about how sometimes you have to put the math into perspective.
Last update: August 2019
As they say, a little knowledge is a dangerous thing.
Some people learn about the house edge and expected value, which are important for understanding casino games. They then try to apply those concepts to the lottery, where those ideas are all but useless.
First, let's have a refresher on those concepts.
 The house edge is the casino's average profit per bet, in percentage terms. For example, the house edge in roulette is 5.26%.
 Expected loss is the average loss of your bets. If you bet $100 on roulette, then $100 x the 5.26% house edge is $5.26. That's how much you'd lose on average on each $100 bet if you made $100 bets forever. Of course, on a single bet, you're either gonna lose your whole $100, or win some more. "Expected loss" is poorly named, since it's not the amount you actually expect to lose. A better term is "average loss", which is what I use sometimes. Note that since the house edge is a percentage, when your total bet is $100 or $1 (like with a state lotto), the house edge and the expected loss look the same. e.g., On a lotto with 40% house edge, the expected loss on a $1 bet is 40¢.
 Expected value is the flip side of expected loss. It's how much you get back, on average. If you bet $100 on roulette, and lose an average of $5.26, then what you wind up with is $94.77. That's your expected value (aka, average value). It's also called the return.
Let's see a practical example. Here's how we calculate expected value for roulette:
Expected Value of $100 Roulette Bet  
Outcome  Result  Odds  Expected Value 
Win  $200*  0.4737  $94.74 
Lose  0     
$94.74 
And here it is for the Texas Lottery's "Lotto Texas":
Expected Value of $1 Lotto Texas
Ticket 

Prize  Odds  Expected Value 
$15,000,000*  0.00000004  $0.600 
$2,000  0.00001115  $0.022 
$50  0.00065512  $0.033 
$3  0.01339365  $0.040 
$0  0.98594004  $0.000 
$0.695* 
Mistake 1: Thinking that the low expected value makes lotto a horrible waste of money
So let's see how our aspiring analyst "Bob" goes wrong about this. He's learned about the house edge for casino games and knows that games with a high edge are a bad bet because they result in a low expected value. He knows that lotto games have an expected value of only 5070¢ on the dollar, while while games like blackjack or craps return an impressive >99¢. He therefore concludes that lotto is "a tax on the people who are bad at math" and that anyone who buys a lottery ticket is foolish.
Bob went wrong in three ways. First, he failed to consider that the total amount you lose is based on the total amount you bet. The most you can lose on a $1 or $2 lottery ticket is $1 or $2. Big freaking deal. Most of us can afford to lose a dollar or two. Every damn week.
And if Bob had done the proper comparison with blackjack, blackjack would have come out worse. Buying a single lottery ticket is a common play for that game. But nobody plays a single hand of blackjack. Playing a 3:2 blackjack game with proper strategy at $5 a hand for two hours results in an average loss of about $5. That's more than twice what you'd lose on a lotto ticket. Yet Bob thinks that playing blackjack is perfectly reasonable because of its low house edge, and views lotto players as suckers, even though they typically lose less than blackjack players.
Bob erred by looking at only the house edge, and failed to consider that average loss is based on much more than that. The whole formula for average loss is:
House edge x Amount bet per round x Number of Rounds
Sure, blackjack has a lower house edge than the lottery. But blackjack has a higher amount bet per round: $5 or more on the table, vs. $1 or $2 for a lotto ticket. And blackjack players typically way more rounds: an hour or two at the blackjack table is dozens to hundreds of rounds, while most lotto players buy just one or a few lottery tickets a week.
The second way Bob went wrong is that he failed to consider the entertainment value of the purchase. If you get $2 worth of entertainment for your $2 ticket, then it's a good deal for you. With most forms of entertainment you don't get any of your money back, like with movies, video games, bowling, etc. Also, most forms of entertainment cost more than a single lotto ticket. Bob doesn't think that spending dozens of dollars on other kind of entertainment is unreasonable, even though you don't get any of your money back, but as soon as someone spends a mere $2 on a lotto ticket, Bob is quick to look down his nose at them and call them foolish.
Finally, somehow Bob missed the fact that the whole reason that people play lotto is for the thrill of possibly winning tens or hundreds of millions of dollars. That is essentially impossible with blackjack. It's like if someone were trying to buy a bicycle for exercise, but Bob tried to get them to buy a car instead because it goes faster...missing the whole goal of the purchase.
(Yes, in theory, you could take a $5 blackjack or baccarat bet and let your winnings ride, doubling it until you get to $1 million, and then continue to make $1 million bets, which is the most any ultrahigh limit room will accept, but the reality is that you'd chicken out and stop betting once your bet was several thousand dollars or less. A lotto ticket lets you win suddenly without the agonizing choice of whether to let a massive table game bet ride.)
Of course, all the above assumes that you're not buying a gazillion lottery tickets and that you follow the cardinal rule of gambling, which is to never bet more than you can afford to lose. Buying lots of tickets naturally results in a much bigger loss. But one or a few tickets at a time is how most people play lotto.
Mistake 2: Thinking it's better to play when the jackpot goes positive
As a lotto jackpot grows, so does the expected value. Many state lotteries actually become positive on occasion, which means that the expected value of a $1 lottery ticket is more than a dollar. Here's how that would work:
Expected Value of Lotto TX
w/big jackpot 

Prize  Odds  Expected Value 
$22,900,000  0.00000004  $0.916 
$2,000  0.00001115  $0.022 
$50  0.00065512  $0.033 
$3  0.01339365  $0.040 
$0  0.98594004  $0.000 
$1.01 
So, Bob figures that when Lotto Texas jackpot grows to $22,900,000, it becomes a positive expectation game and it's suddenly worth playing! Right? Wrong! For so many reasons.
The reason that expected value works for casino games is that it doesn't take long for your actual losses to approach the expected losses. You'll probably be within 5 percentage points of the house edge after just 100 rounds on a table game. By contrast, with the lottery you likely won't be anywhere near the house edge even after a million plays.
Let's use my House Edge Simulator to see how expected value is useful for a casino game. It plays roulette a bunch of times and you can see the results.
House Edge Simulator  
Bet $5 on red...  or Lost 

1 time  
10 times  
100 times  
1000 times  
100,000 times  
1,000,000 times  

What you saw is that you're gonna be a longterm loser, and
anything can happen in the short term, but even after just 100
rounds your actual losses were likely in the ballpark of expected
losses. The house edge and expected value are useful
here because this is a game where you'll likely play a bunch of
rounds, and the chances of winning any individual round is almost
5050. Wins are frequent in this game.
And now let's see it for the Lotto Texas:
Lotto Texas Simulator  
Buy $1 ticket... 

w/$10M jackpot 
w/$22,9M jackpot 
1 time 



10 times 



100 times 


1000 times 



100,000 times 



500,000 times 




What you likely saw is that even with half a million freaking lottery tickets, your results were pretty much the same for both the smaller and larger jackpots. The jackpot size doesn't matter.
The thing is, the odds of hitting the top jackpot in Lotto Texas are incredibly long: a whopping 1 in 25 million. Even if you bought a million tickets you're very unlikely to hit the top prize. That being the case, the size of the jackpot means exactly squat.
And remember, the odds are 1 in 25M no matter how high the jackpot grows. A positive jackpot is exactly as hard to hit as a negative one.
When you buy a ticket, one of two things is gonna happen: you're either gonna win or you're not. If you win, then all that matters is that you're suddenly multiple millions of dollars richer. If the game had been negativeexpectation when you played, so freaking what? Your actual return was way better than your expected return, which is all that will matter to you.
If you lose, then again, the size of the jackpot was completely irrelevant.
The only thing that really matters when buying a lottery ticket is this: Is the chance of winning $X jackpot worth a dollar to you, if the odds are Y to 1 against your winning? If yes, then buy one. If not, then don't. But don't even consider the expected value, because it has no usefulness when applied to the lottery.
Looking at expected value has a lot of benefit in casino games where your actual loss will likely approach the expected loss fairly quickly, but it shouldn't become a religion that's applied blindly to longodd games like the lottery.
Even if it were a "good" time to buy tickets when the jackpot goes positive, the fact is that when the jackpot grows, more people buy lottery tickets. Not because those buyers are calculating the expected value (most people have no idea what that is), but because they're more excited about winning a bigger pile of money. The more people play, the more likely it will be that more than one person picks the winning numbers, so the prize will be split among all the winners. If two people win a $20 million jackpot, they each get $10 million—the same as if one person won a $10 million jackpot. Therefore, you can't assume that the expected value goes up in relation to the amount that the jackpot goes up, because if you do win, you're less likely to have won the whole thing yourself.
So, there's no point in waiting for a bigger jackpot. If you want to play the lottery, play it whenever you like, it won't affect your odds.
And about those odds: about 1 in 300 million for Powerball and Megamillions. Those odds are so long that they're impossible to visualize. I thought about creating a web page showing 300 million different numbers, to help visualize it, but even just 1 million numbers is enough to choke most web browsers.
If you do want to get the best odds when going for a big jackpot (and why wouldn't you?), then you can get a better return on a progressive slot machine or at a table game using my jackpot betting system.