Lottery is a form of competition in which entrants pay to enter and names are drawn for prizes, whether money or goods. It is considered a form of gambling because it relies on chance. Some lottery participants use a strategy to win, but others choose their numbers based on luck or personal preferences. Lotteries are used to select people for public service positions, fill sports team vacancies, or choose students at a university.
The first documented lottery was held in the Low Countries in the 15th century to raise funds for town fortifications and the poor. King Francis I of France tried to organize a national lottery to help state finances, but it failed because the tickets were costly and the social classes that could afford them did not participate.
A lottery must have some means of recording the identities and amounts staked by each bettor. This can be done by having the bettor write his name on a ticket that is deposited with the lottery organization for shuffling and selection in the drawing, or by buying a numbered receipt that he knows will be included in the pool of potential winners. Most modern lotteries use computers to record the information.
Most lotteries have retail outlets where players purchase tickets. Lottery officials work closely with these retailers to improve sales and marketing. Lottery officials supply retailers with demographic data and other information to help them optimize their marketing techniques.