Almost every state in the United States has a lottery, offering either cash prizes or goods to those who buy tickets. Typically, the winner must pick a combination of numbers. Some games allow you to choose numbers based on significant dates (such as birthdays), but a Harvard statistics professor recommends choosing random numbers to increase your chances of winning — and avoiding sharing the prize with others who have the same numbers.

The earliest known lotteries took place in the 15th century in the Low Countries, where towns held them to raise funds for town fortifications and help the poor. Unlike today’s lotteries, the prize fund was usually a fixed amount of cash rather than a percentage of ticket sales.

Lotteries gained popularity in the United States after World War II, with many states seeking to expand their social safety nets without raising taxes too much. Politicians argued that lotteries were a painless revenue source, because voters were voluntarily spending their money for the public good rather than having it taken away by taxation.

But there are limits to this argument. Research shows that the majority of lottery players are white and middle-class, and low-income residents participate in lotteries at a level that is far lower than their proportion of the population. This is in part because those living in poverty generally have fewer dollars to spend, and they are often unable to afford the high prices of lotteries, particularly scratch-off tickets.