A lottery is a procedure for distributing something (usually money or prizes) among a group of people by lot or by chance. Generally, the lottery consists of the purchase of tickets and the drawing of winning numbers or symbols from a pool of such tickets. A lottery also may include other elements, such as a prize distribution system, which involves the allocation of prizes according to some predetermined criteria.

Originally, lottery games were simple raffles in which a player purchased a ticket and waited to see if it won. These passive drawing games were common in the first decades of the twentieth century, but over time they became less popular. Today, most lotteries feature games with a wide range of betting options and payoffs.

In the United States, state governments operate all state lotteries and collect the profits from the sales of tickets. These profits are used to fund state programs. As of August 2004, forty states had operating lotteries, and the total amount collected was $44 billion.

The first recorded European lotteries, which offered tickets for sale with prizes in the form of money, were held in the Low Countries in the 15th century. They were primarily used to raise funds for town fortifications and to help the poor. Several towns also held public lotteries for religious purposes in the seventeenth and eighteenth centuries.

A lottery can be played in a number of ways, including by mail and online. In the United States, many retailers sell lottery tickets, including convenience stores and grocery stores. Retailers are often supervised by the lottery and are required to comply with state laws that govern their operation.

In addition to selling lottery tickets, retailers provide other services, such as delivering the tickets to winners, completing payment transactions, and providing information about lottery events. Some lottery operators provide retailer optimization programs to ensure that the retailers are maximizing their sales potential.

Most retailers are independent businesses, but some are franchisees of large corporations or national brands. Retailers are also sometimes involved in merchandising and marketing the lottery, such as by displaying lottery merchandise on the front counter or offering special promotions to customers.

Some retailers also offer other products or services, such as coffee and candy. The popularity of lottery tickets has led to a growing market for lottery-related goods and services.

As of 2003, there were approximately 186,000 retailers selling lottery tickets across the country. The top three states for lottery retailers were California (19,000), Texas (16,395), and New York (15,300).

About 45% of all retailers sell lottery tickets by phone or through the Internet. A small percentage of retailers sell them in person.

A number of states have joined together to run multi-state lotteries, such as Powerball and Mega Millions. These lotteries offer enormous purses and are a good source of revenue for the governments that run them.

The purchase of lottery tickets cannot be accounted for by decision models based on expected value maximization, although some can be explained by models that assume utility functions defined on things other than the outcomes of the lottery. These models also can account for the behavior of risk-seeking individuals who buy lottery tickets because of a desire to experience a thrill or indulge in a fantasy of becoming wealthy.