When you lose money on an investment, it's natural to start wondering whether the pundits are right when they say investing has a lot in common with gambling. After all, there's a good deal of uncertainty in investing; there are absolutely no guarantees that any particular investment will make money.

It can be frustrating to put money into a stock like Merck (NYSE:MRK), a pharmaceutical company with a long history, very strong brands, a formerly impeccable financial picture, and extraordinary consumer trust, only to see things begin to unravel right before your eyes. Merck's former blockbuster pain medicine Vioxx and the legal battles related to it are shaking public and investor confidence in this once-great institution. Likewise, it can be painful to see a market leader like computing and business consulting powerhouse IBM (NYSE:IBM) struggle in the marketplace. As dominant and solid as IBM continues to be, its shares still command less than they did five years ago.

As an investor, if you're looking at pages and pages of red ink on your brokerage statement, despite owning well-known brands like IBM and Merck, you might very well think of the stock market as a casino, with the chips stacked against you and your eventual financial well-being. And with a situation like that, you might think that it makes more sense to cash in your chips and go home, rather than continue to fork over your hard-earned money to a system where the odds are not in your favor.

You're in good company
If so, you're not alone. The father of value investing, Benjamin Graham, likened the stock market to a roulette table -- a game of chance where the house has a built-in advantage. The difference, though, is that Graham's strategy stacked the odds in his favor. While nobody can guarantee a house win with every spin of the wheel, that built-in house advantage means that over time, the casino will rake in cash at the roulette wheel. Likewise, Graham's proteges know there are no certainties in the market, but there are ways to help assure that, over time, the value investor will have the advantage and come out ahead.

Graham's lessons are simple yet powerful, and generations of investors have made money over the long haul by following in his footsteps. It takes time to build wealth, though, and anyone who tells you otherwise is likely trying to speed the process along for himself or herself by confiscating your hard-earned cash. Ever wonder why state lotteries and casinos like Penn National Gaming (NASDAQ:PENN) and MTR Gaming (NASDAQ:MNTG) can practically mint cash, despite the fact that most rational folks know the odds are not in their favor when gambling? It's not just due to the entertainment value. It's because they offer the hope of striking it rich fast. If you can shed that irrational urge, you can build substantial wealth over time as a value investor.

The master's lessons
As I said before, Graham's lessons are simple yet powerful. His key teachings can be summed up in just a few key points:

  • Determine what a company is really worth and buy only if its stock is trading safely below that value.
  • Look for solid, sustainable dividend payouts as a sign of financial strength.
  • Diversify appropriately, since not every investment will work out.
  • Above all, after buying, be patient and wait for the stock to rise once others recognize its worth.

By following these simple rules, it is quite possible to beat the market. My friend and colleague Philip Durell, a longtime follower of Graham, is proof of that. His Motley FoolInsideValue newsletter has soundly outperformed the market's return since its inception last year. His selections as a whole have performed so strongly, in fact, that I'm going to do something radical: I'm going to name two of the firms that have lagged the market since their selection. Those two are Anheuser-Busch (NYSE:BUD), the ubiquitous brewer of Budweiser beer, and Pfizer (NYSE:PFE), a drugmaker in very similar lines of business as Merck. Both are down more than 10% since Philip recommended them. Both prove the value of Graham's lessons.

Learning from losses
First and foremost, both companies have illustrated the value of knowing what a company is truly worth and having the patience to wait for the market to recognize that value. In Anheuser-Busch's case, consolidation has dropped it to the No. 3 spot globally, in an industry where size and scale matter significantly. In spite of its smaller relative size, it's still a dominant company and a cash-generating machine.

Pfizer, on the other hand, has been a bit trickier to value, given the uncertainty surrounding its pain pills Celebrex and Bextra and its recent announcement that it would be withdrawing its earnings guidance for 2006 and 2007. Investors have panicked as a result. The troubles surrounding both Pfizer and Merck show how important diversification is. It's no coincidence that both firms are large drugmakers that got tripped up by their pain management pills. Companies in similar lines of work tend to face similar issues and risks. When one stumbles, it's quite common for the others to trip as well. While both companies are expected to survive, the short-term gyrations can be painful. To minimize that particular pain, whether it is caused by Celebrex, Bextra, or Vioxx, the best medicine is to spread your investments out -- don't concentrate too much in one company or specific industry.

But if you follow Graham's wisdom, you'll know what these companies are worth and you'll be willing to buy even as others panic. The share prices of both Pfizer and Anheuser-Busch already reflect the companies' troubles. As an investor, you need to have the patience to wait through the volatility.

Powerful profits over time
As of this writing, and despite losses by Anheuser-Busch and Pfizer, Philip's Inside Value picks are trouncing the market, gaining slightly above 5% versus the S&P 500's less than 0.5% return. In an industry where more than 90% of mutual fund managers cannot sustainably beat passive index trackers like the iSharesS&P 500 Index (AMEX:IVV), that performance stands out as truly remarkable. As Benjamin Graham pointed out more than half a century ago and Philip Durell is demonstrating today, you as an investor cannot guarantee the profitability of any given investment. But by following the value investing rules, you can certainly stack the odds in your favor and better assure your success over time.

Like the idea of treating investing as though you're playing with the house's odds, rather than a gambler's? Click here for a 30-day free trial to Inside Value, and join other like-minded value investors as they seek out superior long-run investment returns.

This article was originally published on July 20, 2005. It has been updated.

At the time of publication, Fool contributor and Inside Value team memberChuck Salettaowned shares in Merck. Merck is a Motley Fool Income Investor recommendation. The Fool has adisclosure policy.