Lottery is a game in which numbered tickets are sold for the chance to win a prize, by drawing lots. It is a form of gambling, and is typically organized by state governments as a means of raising money for a variety of public purposes. The word lottery derives from the Dutch noun lot, meaning allotment or share; it is also related to Old English hlot “a thing pertaining to fate.”

Lotteries have been around for a long time, but they became popular in the post-World War II period as states sought to expand their social safety nets without increasing taxes. The lottery was viewed as a painless method of raising revenue that could capture people who would otherwise engage in illegal gambling activities.

While many people buy a ticket for the chance to become rich, most players don’t actually win anything. The odds of winning are quite low, and the amount of money that can be won is small compared to other forms of gambling. Lottery purchases can’t be explained by decision models based on expected value maximization, but they may be driven by risk-seeking behavior.

The money from ticket sales is primarily used to pay for the cost of running the lottery, commissions for retailers, and administrative overhead. The remainder of the proceeds go to state government, which often uses those funds for infrastructure, education, and gambling addiction initiatives. The lottery is a great way for the federal and state governments to raise money with little direct cost, and they have a good track record of putting that money to work.