The lottery came up in a recent comment, with the claim that the expected return is negative - and the implicit conclusion that it's irrational to play the lottery. So I will explain why this is not the case.
It's convenient to reason using units of equivalent value. Dollars, for instance. A utility function u(U) maps some bag of goods U (which might be dollars) into a value or ranking. In general, u(kn) / u(n) < k. This is because a utility function is (typically) defined in terms of marginal utility. The marginal utility to you of your first dollar is much greater than the marginal utility to you of your 1,000,000th dollar. It increases the possible actions available to you much more than your 1,000,000th dollar does.
Utility functions are sigmoidal. A serviceable utility function over one dimension might be u(U) = k * ([1 / (1 + e-U)] - .5). It's steep around U=0, and shallow for U >> 0 and U << 0.
Sounds like I'm making a dry, academic mathematical point, doesn't it? But it's not academic. It's crucial. Because neglecting this point leads us to make elementary errors such as asserting that it isn't rational to play the lottery or become addicted to crack cocaine.
For someone with $ << 0, the marginal utility of $5 to them is minimal. They're probably never going to get out of debt; someone has a lien on their income and it's going to be taken from them anyway; and if they're $5 richer it might mean they'll lose $4 in government benefits. It can be perfectly reasonable, in terms of expected utility, for them to play the lottery.
Not in terms of expected dollars. Dollars are the input to the utility function.
Rationally, you might expect that u(U) = 0 for all U < 0. Because you can always kill yourself. Once your life is so bad that you'd like to kill yourself, it could make perfect sense to play the lottery, if you thought that winning it would help. Or to take crack cocaine, if it gives you a few short intervals over the next year that are worth living.
Why is this important?
Because we look at poor folks playing the lottery, and taking crack cocaine, and we laugh at them and say, Those fools don't deserve our help if they're going to make such stupid decisions.
When in reality, some of them may be making <EDITED> much more rational decisions than we think. </EDITED>
If that doesn't give you a chill, you don't understand.
(I changed the penultimate line in response to numerous comments indicating that the commenters reserve the word "rational" for the unobtainable goal of perfect utility maximization. I note that such a definition defines itself into being irrational, since it is almost certainly not the best possible definition.)
FWIW, Charles Karelis makes this argument extensively in his book The Persistence of Poverty.
While it's plausible that utility functions are sigmoidal, it's not obviously true, and it's certainly not true of many of the utility functions generally used in the literature.
Moreover, even if experienced-utility (e.g. emotional state) functions are sigmoidal, that doesn't imply that decision-utility functions are, except in the special case that individuals are risk-neutral with respect to experienced utility. More generally than that, a consistent decision-utility function can be any positive monotonic transform of an experienced utility function.
EDIT: I should have added that the implication of that last point is that you can rationalize a lot of behavior just by assuming a particular level of risk preference. You can't rationalize literally anything (consistency is still a constraint), but you can rationalize a lot. All of this makes it especially important to argue explicitly for the particular form of happiness/utility function you're relying on.
(EDITED again to hopefully overcome ambiguities in the way different people are using the terms happiness and utility.)