Lottery is a game in which tickets are sold for the chance to win a prize, which can range from small items to large sums of money. Winners are selected in a random draw, which is typically overseen by government authorities to ensure fairness and legality. The odds of winning are usually quite long, but people still buy tickets. Some even believe in quote-unquote “systems” that are not based on statistical reasoning, such as picking lucky numbers or buying tickets at certain stores and times of day.

The idea of lottery has roots in ancient history, with the Old Testament instructing Moses to divide land by lot, and Roman emperors giving away slaves and property as part of their Saturnalian celebrations. But the modern version of a lottery first appeared in the Low Countries in the 15th century, as towns raised funds for projects and town fortifications by selling tickets. Lotteries have since spread worldwide, and they are the largest form of gambling in America.

But states’ need for revenue fueled this growth, and there are some very real trade-offs here. When you win, for example, you’re likely to pay a large tax on the prize. But it’s worth asking whether that’s worth the price of creating new generations of gamblers. Americans spend over $80 billion a year on lottery tickets, and they are disproportionately lower-income, less educated, and nonwhite. That’s a lot of money that could be better spent on emergency funds and paying off credit card debt.