Is Mega Millions Positive Expected Value?
Solution 1:
I did a fairly extensive analysis of this question last year. The short answer is that by modeling the relationship of past jackpots to ticket sales we find that ticket sales grow super-linearly with jackpot size. Eventually, the positive expectation of a larger jackpot is outweighed by the negative expectation of ties. For MegaMillions, this happens before a ticket ever becomes EV+.
Solution 2:
An interesting thought experiment is whether it would be a good investment for a rich person to buy every possible number for \$175,711,536. This person is then guaranteed to win! Then you consider the resulting size of the pot (now a bit larger), the probability of splitting it with other winners, and the fact that you get to deduct the \$175.7M spent from your winnings before taxes. (Thanks to Michael McGowan for pointing out that last one.)
The current pot is \$640M, with a \$462M cash payout. The previous pot was \$252M cash payout, so using \$0.32 into the cash pot per ticket, we have 656,250,000 tickets sold. I, the rich person (who has enough servants already employed that I can send them all out to buy these tickets at no additional labor cost) will add about \$56M to the pot. So the cash pot is now \$518M.
If I am the only winner, then I net (\$518M + \$32M (my approximate winnings from smaller prizes)) * 0.65 (federal taxes) + 0.35 * \$176M (I get to deduct what I paid for the tickets) = \$419M. I live in California (of course), so I pay no state taxes on lottery winnings. I get a 138% return on my investment! Pretty good. Even if I did have to pay all those servants overtime for three days.
If I split the grand prize with just one other winner, I net \$250M. A 42% return on my investment. Still good. With two other winners, I net $194M for about a 10% gain.
If I have to split it with three other winners, then I lose. Now I pay no taxes, but I do not get to deduct my gambling losses against my other income. I net \$161M, about an 8% loss on my investment. If I split it with four other winners, I net \$135M, a 23% loss. Ouch.
So how many will win? Given the 656,250,000 other tickets sold, the expected number of other winners (assuming a random distribution of choices, so I'm ignoring the picking-birthdays-in-your-numbers problem) is 3.735. Hmm. This might not turn out well for Mr. Money Bags. Using Poisson, $p(n)={\mu^n e^{-\mu}\over n!}$, where $\mu$ is the expected number (3.735) and $n$ is the number of other winners, there is only a 2.4% chance of me being the only winner, a 9% chance of one other winner, a 17% chance of two, a 21% chance of three, and then it starts going down with a 19% chance of four, 14% for five, 9% for six, and so on.
Summing over those, my expected return after taxes is \$159M. Close. But about a 10% loss on average.
Oh well. Time to call those servants back and have them make me a sandwich instead.
Update for October 23, 2018 Mega Millions jackpot:
Same calculation.
The game has gotten harder to win, where there are now 302,575,350 possible numbers, and each ticket costs \$2. So now it would cost $605,150,700 to assure a winning ticket. Also the maximum federal tax rate has gone up to 39.6%.
The current pot (as of Saturday morning -- it will probably go up more) has a cash value of \$904,900,000. The previous cash pot was \$565,600,000. So about 530 million more tickets have been or are expected to be purchased, using my previous assumption of 32% of the cost of a ticket going into the cash pot. Then the mean number of winning tickets, besides the one assured for Mr. Money Bags, is about 1.752. Not too bad actually.
Summing over the possible numbers of winners, I get a net win of $\approx$\$60M! So if you can afford to buy all of the tickets, and can figure out how to do that in next three days, go for it! Though that win is only a 10% return on investment, so you could very well do better in the stock market. Also that win is a slim margin, and is dependent on the details in the calculation, which would need to be more carefully checked. Small changes in the assumptions can make the return negative.
Keep in mind that if you're not buying all of the possible tickets, this is not an indication that the expected value of one ticket is more than \$2. Buying all of the possible ticket values is $e\over e-1$ times as efficient as buying 302,575,350 random tickets, where you would have many duplicated tickets, and would have less than a 2 in 3 chance of winning.
Solution 3:
Regarding the last part of your question about the probability of nobody winning, I think we can approach it in the following way. Assume for the sake of argument that all tickets are randomly generated and independent of one another. A given ticket will lose the jackpot with probability $p = \frac{175711535}{175711536}$. Since we said the tickets were independent, the probability of two tickets losing $p^2$, and in general, the probability of $n$ tickets all losing is $p^n$. With 612.5 million tickets sold, this equates to roughly a 3% chance that nobody wins $(p^{612500000})$.
Now it is not strictly the case that the tickets in play are random and independent from one another. I suspect that could lead to more duplicate tickets (birthdays, etc.), and consequently a slightly higher chance of nobody winning. I don't have a good framework for estimating that, but I doubt it affects results that much.
Edit: As a related aside, these ticket assumptions allow us to use the binomial distribution to find the probability of exactly $n$ winners for our choice of $n$. Here is a random sampling of that distribution for 50 drawings:
$$7, 3, 3, 4, 0, 4, 1, 3, 5, 1, 7, 4, 3, 5, 5, 6, 5, 6, 3, 5, 2, 2, 2, 1, 5, 3, 5, 2, 3, 6, 9, 1, 4, 1, 4, 3, 4, 2, 2, 5, 3, 3, 4, 0, 2, 5, 6, 5, 1, 3$$
As you can see, there's a decent chance of 4, 5, 6, or more jackpot winners.