A lottery is a competition based on chance in which numbered tickets are sold and prizes are given to the holders of numbers drawn at random. State governments, which typically oversee the lotteries, use them as a source of revenue. The earliest evidence of the drawing of lots is found in Chinese documents dating from the Han dynasty (205 to 187 BC).

Since their inception, most state lotteries have operated along similar lines: they legislate a monopoly for themselves; set up a public agency or corporation to run them; begin operations with a modest number of relatively simple games; and then, under constant pressure to generate more revenues, progressively expand their offerings by adding new games. This expansion is accompanied by a heavy emphasis on promotion, which often focuses on persuading target groups to spend more money on the lottery.

While the vast majority of lottery proceeds are paid out as prizes, some is kept by administrators for operational costs; for retailers who sell tickets; and for advertising. In addition, many states also earmark some percentage of proceeds to specific programs. Historically, these include education and public works projects.

Most people who play the lottery do so based on the assumption that the odds of winning are very high and the prize money is large enough to justify the effort required to buy tickets. This attitude is often reinforced by the fact that lottery winners are usually disproportionately represented among those who are able to afford the highest ticket prices, and by popular images of lotteries as “wacky” and “fun.” In addition, some people try to increase their chances by using strategies that are unlikely to improve their odds.