A lottery is a form of gambling in which tickets are sold and prizes are determined by random drawing. Often, lottery tickets have a face value, and the prize is money or other goods. Lottery games are popular in many states, and the funds raised by them can be used for a variety of purposes. Some people find lottery play entertaining and rewarding, but others find it addictive and irrational. The word lottery is also used to describe a process of choosing the members of a group, such as a baseball team or a school class.

In the late 16th and early 17th centuries, the Dutch organized state lotteries to collect money for a wide range of public purposes, including helping the poor. The name lottery is probably derived from Middle Dutch loterie “action of drawing lots,” or perhaps from Old French loterie.

When the jackpot is high, the odds are long, and the chance of winning can be incredibly slim. But if you play regularly, you’re likely to come close enough to win sometimes. That’s why so many people play, even though they know the chances of winning are slim.

People who buy lottery tickets can’t be accounted for by decision models based on expected value maximization. The tickets are more expensive than the expected payout, so a person who maximizes their expectation of utility would not buy them. Instead, people purchase lottery tickets because they enjoy the thrill and fantasy of becoming wealthy, or because the ticket buying provides other non-monetary benefits that they consider worth the cost.