While the lottery might seem like a modern invention of the culture that birthed Instagram and the Kardashians, it actually has deep roots in America’s history. In fact, it is the oldest form of gambling.

The first lotteries were largely traditional raffles, with members of the public purchasing tickets to be entered into a drawing at some future time. But after innovations in the 1970s, such as the introduction of scratch-off tickets with lower prize amounts and higher odds of winning, lottery revenues began to rise dramatically.

These revenues became a source of funding for everything from schools to prisons. But the biggest beneficiaries were probably local governments, who used them to avoid raising taxes. The first university buildings in the United States, for example, were paid for with lottery funds, as were a number of government offices and a host of other institutions that helped make early America a prosperous and democratic society.

But the lottery has a problem: It is regressive, with poorer people tending to buy more tickets than richer people. Moreover, it is not a good way to help people escape poverty: It is not as effective as other forms of welfare, such as public school scholarships or social security payments.

Regardless, lotteries remain popular, and their popularity seems unrelated to the actual fiscal health of state governments. The logical conclusion is that it depends on other factors, such as the public’s overall sense of well-being or the perception of a specific benefit of the lottery, such as education.