Lottery is a game in which tickets or chances to win prizes (ranging from small items to large sums of money) are sold and winnings are determined by a random drawing. The games are typically regulated by governments to ensure fairness and legality. Lottery plays a role in many aspects of daily life, including the allocation of units in a subsidized housing scheme and kindergarten placements at a reputable public school. It is also an important source of revenue for state government and a major source of funds for higher education.

Historically, lotteries were a form of gambling wherein people paid for a chance to win a prize that could be anything from land and slaves to cash and goods. The earliest known examples of lotteries in modern form appeared in 15th-century Burgundy and Flanders with towns seeking to raise funds for defense and charitable purposes. Lotteries were often advertised in the newspaper and could require payment of any amount from a participant, from zero to a substantial sum.

The purchase of lottery tickets cannot be accounted for by decision models that maximize expected value. However, it can be explained by the idea that people buy lottery tickets to experience a thrill and to indulge in a fantasy of becoming rich. It is possible that more general models, based on utility functions defined on things other than the lottery outcomes, might be able to capture this risk-seeking behavior.