A lottery is a game of chance operated by a state government, offering people the opportunity to win a prize in exchange for a small amount of money. Prizes are usually cash, though some states offer goods or services, such as a chance to buy a new car, for a fixed price. The value of prizes typically exceeds the number of dollars paid in to play, so lotteries produce a profit for the sponsoring state.

The practice of drawing lots to determine property or other rights is ancient, as recorded in the Old Testament when God instructed Moses to take a census of the Israelites and divide land by lot, and in Roman history when Nero gave away slaves through the apophoreta (drawing wood). Modern lotteries are most widely used to raise funds for public and private projects, including schools, townships, towns, and roads.

Most states use a computer to select the winning numbers and distribute the prize money. The computer’s selection process is based on probability theory, which says that every number has the same chance of being drawn. This makes the odds of picking a winning set of numbers, such as 1, 2, 3, 4, and 5, equally likely as selecting any other number combination, such as 11, 12, 13, 14, and 15.

Lotteries also are controversial because they prey on the illusory hopes of poor people, who tend to play the games more often than the wealthy. They are criticized for being an expensive form of gambling with slim chances of winning, and some say that the prize money is better spent on helping the poor.