A lottery is a game of chance in which participants pay a small amount for the opportunity to win a larger sum. The prize is usually cash or goods. Lotteries are often portrayed as harmless and fun, but there is evidence that they have serious consequences for the people who play them. In the United States, the lottery is a major source of revenue and has been associated with a number of social problems. The lottery is a form of gambling and is therefore illegal in some jurisdictions. It is also an example of economic inefficiency, since the profits of lottery organizers are often misappropriated and spent on items that do not add to the overall wealth of a community.

The earliest records of a lottery date from the 15th century, when towns in the Low Countries held public lotteries to raise funds for town fortifications and poor relief. These were largely charitable acts, but it was not until the 17th century that they began to be used for governmental purposes as well.

One of the first elements of any lottery is a pool of tickets or their counterfoils from which winners are selected by a drawing. To ensure that the winner is chosen by chance and not by bribery or other manipulation, these tickets must be thoroughly mixed before the drawing, a process that may involve shaking or tossing. In addition, the winning numbers or symbols must be randomly selected. Computers have increasingly become the standard method for this task because of their capacity to store large amounts of data and produce random results quickly.

Another requirement of a lottery is a means for collecting and pooling the money paid for tickets. Typically, this is accomplished through a hierarchy of sales agents who pass the money they receive from purchasers up to the organization responsible for organizing and promoting the lottery. The remaining money is then available to award the prizes. Various expenses, including costs of organizing and promoting the lottery, must be deducted from this pool before the awards are distributed.

In the United States, the early history of state lotteries was tangled up with slavery in sometimes unpredictable ways. George Washington managed a Virginia-based lottery whose prizes included human beings, and Denmark Vesey won a South Carolina lottery and went on to foment slave rebellions. But, as Cohen points out, lottery advocates hoped that the games would fill state coffers without raising taxes, and this proved to be the case.

By the nineteen-sixties, however, increasing awareness of the huge profits to be made in the gambling business, combined with a growing crisis in state funding due to population growth, rising inflation and the cost of the Vietnam War, brought about a shift in the lottery’s fortunes. More and more states began to embrace the idea that lotteries could offer a painless alternative to raising taxes. This shifted the lottery’s appeal away from the public and toward the private sector.