Is success in the stock market due to nothing more than dumb luck?

Whether you say yes or no, you should know that answering means choosing a side in a hotly contested financial debate. While master investors like Warren Buffett and George Soros have enjoyed market-beating returns over a multi-decade period, believers in the efficient market hypothesis (EMH) argue this is generally due to nothing more than dumb luck, since it's impossible to identify a truly undervalued stock.

That's because, quoting an influential paper by Eugene Fama, "[A]t any point in time, actual prices of individual securities already reflect the effects of information based both on events that have already occurred and on events which ... the market expects to take place in the future."

In other words, because every single piece of available information is immediately incorporated into a stock's price, the market is unbeatable -- so just buy an index fund. (We should all be glad these guys decided to pursue finance instead of motivational speaking.)

The luckiest fund manager in the world
But here's what I have to say to EMH proponents: Bill Miller.

As manager of Legg Mason Value Trust, Miller beat the S&P 500 for 15 consecutive years. His streak of outperformance is widely considered one of the most impressive investing feats ever -- but not by those aforementioned EMH-ers. PIMCO head Bill Gross reportedly called Miller's streak the "equivalent to rolling 12 sevens in a row with a pair of dice." Former Treasury officials Gary Gensler and Greg Baer called it an "outcome in line with random chance."

Refuting these claims in his book More Than You Know, Legg Mason Chief Investment Strategist Michael Mauboussin showed just how good Miller had to be to maintain his streak -- particularly in 1995 and 1997, when just 12.6% and 9.7% of all funds, respectively, beat the market. Mauboussin pegged the odds of Miller's streak at one-in-223,000.

What's luck got to do with it?
Did Miller get lucky along the way? Probably. But was it all luck? I doubt it.

Rather, I think Miller discovered a superior approach to stock selection -- an approach that can be boiled down to five steps that all investors can follow:

1. Buy quality companies. Miller focused on companies that could consistently generate above-average returns on capital. Over the years, he amassed a collection of some of the business world's best names, including UnitedHealth (NYSE:UNH), Qwest Communications (NYSE:Q), Sprint Nextel (NYSE:S), and Time Warner (NYSE:TWX).

2. Pay a bargain price. Miller purchased companies only when they were trading at a significant discount to the intrinsic value that he calculated for them. But because accounting earnings can be easily manipulated, Miller preferred to base his analyses on cash-flow metrics.

3. Think outside the box. Considered an unorthodox value investor, Miller never allowed himself to be constrained by conventional wisdom. He owned both steady growers like Capital One (NYSE:COF) and flashier new economy fare like Expedia (NASDAQ:EXPE) and (NASDAQ:AMZN).

4. Maintain a long-term focus. Miller stuck to his guns in tough times -- in fact, a major reason why Miller's streak came to an end last year was his reluctance to chase hot stocks in the energy sector and the relative underperformance of Amazon. Convinced that Amazon's operating margins would expand, Miller continually added to his stake in the online bookseller throughout 2006. His conviction has paid off since: Amazon has more than tripled from its 2006 lows.

5. Hold on tight. Legg Mason Value Trust's annual turnover was typically far below its peers'. Hanging onto stocks for a longer time period gave Miller's winners a chance to run, and it reduced the drag of capital gains taxes on his portfolio.

Sound familiar?
Like Miller, Motley Fool co-founders Tom and David Gardner have a knack for buying great businesses at good prices and holding them for the long term. Since they started the Motley Fool Stock Advisor service back in 2002, the two brothers have assembled a diverse collection of stellar companies from across the market spectrum -- a collection that's returned 80% on average versus just 35% for the S&P 500.

Beating the market over any period of time isn't a matter of luck as long as you assemble a diversified portfolio of superior businesses trading at a discount to intrinsic value. In fact, as Miller himself told Money magazine in a recent interview, "a thoughtful individual investor doing a moderate amount of homework can easily -- and I emphasize easily -- do better than the S&P 500."

If you'd like to get started doing just that, click here to try Stock Advisor free for 30 days and see our top picks for new money now. There is no obligation to subscribe.

Rich Greifner does not own shares in any of the companies mentioned in this article. Amazon, Time Warner, and UnitedHealth are all Stock Advisor recommendations. UnitedHealth is also an Inside Value recommendation. The Fool's disclosure policy is one-in-a-million.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.