The drawing of lots to decide rights has a long record in human history, with references to it in the Bible and in ancient documents. The lottery is a modern form of this ancient practice. It was first used in the United States in 1612 to raise funds for the Jamestown settlement, and has since been employed by public and private organizations to provide money for towns, wars, colleges, and other public works projects.

Lottery revenues typically expand dramatically after their introduction and then begin to level off and even decline. This has forced state governments to continually introduce new games to keep revenue levels up. It also has led to the development of a specialized class of people—people who make a living selling tickets.

These people tend to develop a strong sense of loyalty to the lottery and become a major source of promotion, and they often take advantage of psychological factors to increase the number of tickets sold. One of these is counterfactual thinking, where people imagine what might have happened if they had done something different. This is the type of thinking that leads many people to feel regret when they lose a lottery game.

Several other psychological motivations influence lottery play, too. For example, people often minimize their personal responsibility for negative outcomes by attributing them to “bad luck.” In addition, a person’s perception of the odds of winning are influenced by how much he or she has played the lottery in the past.