Underneath flashing lights, blaring music and coin clinking machines lies a bedrock of mathematics designed to slowly bleed casino patrons of their money. And for years, mathematically inclined minds have tried to turn that tide by using their knowledge of probability and game theory to find weaknesses in a system that is rigged from the start.

A casino is like an indoor amusement park for adults with the majority of entertainment and profits coming from games of chance. Musical shows, lighted fountains, shopping centers and elaborate hotels help draw in the crowds, but the billions of dollars raked in by casinos every year come from playing slot machines, blackjack, poker, roulette, craps and other table games of chance.

While it may not always be a safe place for gamblers, most people who go to a casino want to have fun. With a wide variety of games to choose from and bright lights, it can be hard to resist the temptation to step up to the tables and try your hand at something new. The thrill of winning big, or just being one of the crowd, can make anyone feel good.

But the dark side of the gambling industry can be scary. In his Academy Award-winning movie Casino, director Martin Scorsese showed the violent underbelly of Las Vegas. Scenes including the torture of a man with a vice, the attempted murder of De Niro and the death by overdose of Sharon Stone’s character, Ginger McKenna, are eerily realistic.

The movie also depicts the opulence of a casino, its beautiful decor and the glitz and glamour that it attracts. It’s not often that a movie digs so deep into the roots of an establishment, while also exposing its darker side.

Casinos rely on a series of mathematical formulas to predict the amount of money they will lose per bet and how much profit they will make from each individual game. These mathematical models are based on a game’s specific rules, the number of cards dealt and the expected reactions from players. Casinos hire mathematicians and computer programmers to develop these formulas and monitor game play for unusual patterns.

While demographics are helpful for targeting a specific audience, the best way to grow your casino business is to focus on the unique amenities you have to offer. Optimize your content for keywords related to your amenities, location and unique offerings, and use geo-targeting tactics to boost discoverability when prospective guests are in the area. This will increase your brand awareness and build buzz that will lead to higher revenue in the long run. For example, promote your spa and health club services, flexible event spaces, delicious restaurants and other unique features that set you apart from the competition. This will help bring in customers that will stay longer and spend more. This type of marketing can help you evolve from a struggling casino into an industry leader.