"Round and round she goes, where it stops, nobody knows."

I heard a casino dealer rhyme that out loud once as he spun a little white ball around a roulette wheel. Players waited anxiously for the ball to land in its final destination, letting them know whether or not they had gotten lucky on that try. Let's face it -- everyone knows that it takes a whole lot of luck to win at the casino. Especially in roulette, with the house holding an edge of about 5% on every single spin, it's simply a matter of time before you lose all of your money.

Unless, of course, your name is Gonzalo Garcia-Pelayo.

The pain in Spain bets mainly on the same
Garcia-Pelayo is not your average roulette player. In the early 1990s, this Madrid native discovered that certain roulette wheels were not completely random. In fact, they were biased. Because of small imperfections -- tiny flaws in the roulette wheel's gears, differences in the sizes of the pockets, or even an unlevelled floor -- some numbers tended to come up more often than others. Garcia-Pelayo painstakingly recorded the winning numbers on thousands of spins, then conducted a statistical study on this raw data.

By continuously betting on the numbers that his analysis showed came up most often, Garcia-Pelayo turned a 5% disadvantage into a near 15% advantage over the powerful casinos of Europe. What can an individual do with such a favourable proposition? Well, over a span of a just a couple of years, Garcia-Pelayo and his family exploited this edge to win more than two million euro. Not a bad jackpot, if you ask me.

Nothing up their sleeves
But Garcia-Pelayo is just a single name out of the hundreds of players who have beaten the casino without having to blatantly cheat. No trickery used. No lethal force employed. No inside information needed. Instead, with some intuition, a ton of determination, and most importantly, the laws of mathematics, many others have beaten casinos over long stretches. Even Nobel laureate Claude Shannon, best known as the father of information theory, was famous for inventing ingenious computers that allowed a player to record a heap of winning numbers to analyze.

It makes you wonder: If individuals out there have built great fortunes at something considered as unpredictable and unbeatable as roulette, why do many people continue to view the purchase of business ownership through stocks as a losing gamble? Why would anyone just randomly "play" the market, haphazardly buying and selling stocks, in the hopes of catching lightning in a bottle? Wouldn't it be far better to figure out what the stock market really is, what it's there for, and then identify its flaws before buying a single share -- just as Mr. Garcia-Pelayo did with the roulette wheel?

Stock bargain bookies
There are indeed master investors who have applied the same type of meticulous approach to stock market investing. I call them the "Garcia-Pelayos" of the stock market. Peter Lynch, the former manager of the Fidelity Magellan fund; Sir John Templeton, the pioneer of global value investing; and Warren Buffett, the CEO of Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B), are some of the more famous names to have beaten the stock market casino over the long haul. Of course, lesser-known gamers like Bill Nygren of the Oakmark fund and Bruce Berkowitz, manager of the Fairholme fund, have also turned the market into their own personal jackpot.

How do they do it? Like Garcia-Pelayo, their advantage doesn't come from any sort of cheating. Instead, these master investors spend inordinate amounts of time observing the stock market, trying to determine its precise workings. Then they identify ways to take advantage of its biggest weakness -- short-term thinking.

They've all figured out that the stock market sells the ownership of businesses, not pieces of paper whose price fluctuates on daily basis, and that a share price may bear little or no resemblance to the value of its underlying company. These expert investors will put money on the table only if the market offers them an attractive discount on a company they like.

Plenty of anomalies to go around
Not all master investors favor the same opportunities. For example, Peter Lynch's favorite investments are simple, rapidly growing businesses whose small sizes let them fly beneath Wall Street's radar. Lynch bought into companies like media giant Rogers Communications (NYSE:RG) when it was still a tiny fraction of the multibillion-dollar company it is today.

Warren Buffett, on the other hand, prefers to bet on some of the biggest and best companies in the world when the market gets bored with them. Buffett swooped in when industry leaders like Coca-Cola (NYSE:KO) and Home Depot (NYSE:HD) were selling at attractive prices.

Even the aforementioned Claude Shannon managed investments for a good while. In fact, from 1966 to 1986, Shannon's 28% average return surpassed even Buffett's. Shannon achieved this feat by concentrating his portfolio in three main stocks: Hewlett-Packard (NYSE:HPQ), Motorola (NYSE:MOT), and Teledyne Technologies (NYSE:TDY).

Just as each roulette wheel may be biased toward a set of different numbers, there are also different sets of ways to outperform the stock market over long periods of time. Wall Street's master investors simply bet on businesses at the odds with which they are most comfortable, using careful research and foresight to give themselves an "edge" over the stock market house. By closely studying the approach of these brilliant capital allocators, Foolish individual investors may begin to view stocks the same way Gonzalo Garcia-Pelayo looks at a roulette table: as an entirely beatable opportunity.

Coca-Cola and Home Depot are Motley Fool Inside Value recommendations. Get up to speed on the fundamental tools that value investors like Warren Buffett use to beat the market, and discover Fool value guru Philip Durell's full list of superior stock bargains, with a free 30-day trial.

Fool contributor Brian D. Pacampara bets with the best and owns shares of Berkshire Hathaway. The Fool's disclosure policy is a guaranteed lock.