You’ve probably heard of the lottery — people buy tickets, hoping to be one of those lucky winners who gets rich from a random drawing. But what do you know about how it actually works? And how does it impact your life? I’ve had the chance to talk to a lot of lottery players, people who play for years, spending $50, $100 a week. And the thing that surprises me most is that they don’t seem to care about the odds.

In fact, I think they’re a little bit proud of how irrational their gambling behavior is. They’ve figured out all these quote-unquote systems that are totally not borne out by statistical reasoning, about which numbers are luckier, which stores have the best chances of selling winning tickets, what time of day to buy them, and so on. But for whatever reason, they’ve come to the conclusion that their odds are long and they might as well try and win something anyway.

The first state-sponsored lotteries popped up in the fourteen-hundreds, mostly in the Low Countries, where they were used to raise money for town fortifications and charity. Soon, they were spreading across Europe, and by the sixteenth century, Queen Elizabeth I chartered England’s first national lottery, with proceeds going toward “reparation of the Havens and strength of the Realme.” And then, the practice made its way to America.

Lotteries were especially popular in the Northeast and the Rust Belt, where states wanted to expand their social safety nets but couldn’t raise taxes too high to enrage anti-tax voters. The heyday of the lottery was in the immediate post-World War II period, when more and more states started them.

As the game became more widespread, states began to focus on promotional messages that told players they were helping children and families, boosting the economy, and reducing crime, among other things. But the truth is that most of the money raised by these drawings goes to administrative costs and prize payouts. Only about a quarter of it stays with the state, Cohen reports.

Despite this, some people have found a way to beat the odds and win big. In the article, Lustig explains that if you really want to improve your chances of winning the lottery, it’s important to choose a good number, avoid numbers that have appeared in previous draws, and avoid picking multiple numbers from the same group. He also recommends checking out the statistics of past winners to see what numbers have been more frequent or less frequent in the past.

And while it’s not a guarantee that you’ll win the lottery, there are plenty of other ways to make smart financial decisions, like paying off debts, saving for retirement, and diversifying your investments. And if you’re thinking about trying the lottery, don’t forget to set aside some cash for an emergency fund as well. After all, winning the lottery isn’t as easy as it might look on television.