A lottery is a scheme for raising money by selling chances to share in a distribution of prizes. Usually, it is a simple game of chance in which a person buys a numbered ticket and hopes that his numbers will match those drawn on a specific day.

In the United States, most states have a state-run lottery and the District of Columbia has a small one. In other countries, private organizations organize their own lotteries for the purpose of raising money.

The first European lotteries were held during the Roman Empire, mainly as an amusement at dinner parties. Each guest received a ticket and prizes were often dinnerware or fancy items of unequal value.

To make a lottery successful, it must be organized and run by an organization able to control the numbers and payouts. This requires a pool of money for bettors to stake, a method for recording each bettor’s number(s), and a way to shuffle and select winning tickets for the drawing.

Many modern lottery games also use computers, which record the names and numbers of each bettor and randomly generate winning numbers for each draw. This computer-generated system helps to maintain system integrity.

In the United States, state-run lottery operators have a legal obligation to comply with federal statutes. They must be licensed, have a lottery division that oversees retail operations, train retailers to sell lottery tickets and redeem winning tickets, assist retailers in promoting lottery games, pay high-tier prizes to players, and ensure that their employees and customers follow all lottery rules.