If you buy a lottery ticket, you’re essentially betting that your luck will change for the better in the near future. And while there’s no guarantee you’ll win, the chance is real, as many people can attest.

Lotteries are a fixture in American culture, and they’re also the most popular form of gambling in the country. They’re a key part of state budgets, and they raise a lot of money. But how meaningful that revenue is, and whether it’s worth the trade-offs to people who lose their money, remains a debated issue.

The idea of making decisions or determining fates by the casting of lots has a long history, dating back centuries. For example, Moses was instructed to count the Israelites and divide land by lot in the Old Testament, while Roman emperors used it as a way to give away slaves and property.

Modern lotteries have their roots in the Low Countries in the 15th century, when towns raised funds for building walls and town fortifications, as well as to help the poor. The first recorded public lottery to offer tickets with prize money was in 1466 in Bruges, Belgium.

Today, lottery games are regulated by state governments and supported by broad and diverse constituencies, including convenience store owners (lotteries tend to be their most profitable products); suppliers (heavy contributions from lottery providers to state political campaigns are reported); teachers (in states in which a portion of the revenues is earmarked for education); state legislators (who quickly become accustomed to the additional revenue); and, of course, the players themselves.