Lottery is a form of gambling in which the participants make a payment for a chance to win. The prize may be money or goods. Modern lottery-type arrangements include military conscription, commercial promotions in which property is given away through a random procedure, and selection of jury members.

Those who play the lottery spend billions every year on tickets, some hoping to change their lives for good and others thinking that winning will help them escape a dreary existence. But the odds of winning are incredibly slim and those who do find themselves rich can quickly run into trouble.

It is hard to see how lottery purchases can be explained by decision models based on expected value maximization, because the cost of tickets exceeds their expected returns. But more general models based on risk-seeking behavior can explain lottery purchases. For example, a ticket allows purchasers to indulge in fantasies about becoming wealthy and experience a thrill of anticipation.

Lotteries have been used to raise money for a variety of purposes, from repairing buildings in Rome to funding the construction of the British Museum and public works projects across the colonies. They have also been used to fund state governments and private enterprises. In the early post-World War II period, states used lotteries to finance a broad array of social services without increasing taxes on the middle class and working classes. That arrangement began to crumble as states faced rising inflation and the cost of the Vietnam War.