In a lottery, prizes are allocated by a process that relies wholly on chance. Hence, it cannot reasonably be expected that a significant proportion of people who wish to participate in the arrangement will do so.

The first recorded lotteries, in which tickets were sold for a prize of money, appeared in the Low Countries in the 15th century. The town records of Ghent, Bruges, and other cities mention raising funds for the building of walls and town fortifications through these lotteries.

State governments, whose coffers swell thanks to ticket sales and winnings, are big supporters of lotteries. But there’s a problem: studies have shown that lottery ticket sales are disproportionately concentrated in poor neighborhoods, and that winners tend to be lower-income, minorities, or people with gambling addictions. In a recent study, Vox looked at Connecticut lottery data and found that the state’s top winners largely came from its poorest zip codes.

Lotteries also have a peculiar type of buyer, one who takes a gamble and then buys more tickets. This player is a rare creature, a gambling anthropologist’s dream: the educated fool. He or she mistakes “expected value” for a comprehensive understanding of the game and thereby makes a fatal mistake.

Expected value is the average amount you expect to win if you buy every possible combination of numbers. This is a simple formula, but it’s easy to make mistakes when choosing your numbers. Many players choose birthdays or other personal numbers, like home addresses or social security numbers, that have patterns that are easier to replicate. This is a bad idea, because the odds of selecting those numbers are much less than picking random ones.