You've probably heard of Nate Silver by now. He's the statistics blogger whose forecasting model has correctly predicted 99 of 100 state races in the last two presidential elections. His work is a triumph of math and statistics over punditry and guesswork.

Silver's recent book, The Signal and the Noise, includes a group of charts showing average annual S&P 500 (^GSPC -1.20%) returns plotted against the index's starting P/E ratio. I've recreated them here, because I think they are an excellent and simple way to explain successful investing (a different context from what Silver used).

First up, these are average annual S&P 500 returns since 1871:

Source: Robert Shiller; author's calculations.

Notice how random it is? Valuations, measured by P/E ratios, don't tell you all that much about what stocks will do over the coming year. Sometimes stocks are cheap, only to become cheaper over the course of a year as markets fall. Sometimes stocks are really expensive, and they get even more expensive over the course of a year as bull markets roar.

Over one-year periods, it's a crapshoot. You really have no idea what the market will do.

What happens if we look at average annual returns over five-year periods? Things get a little more orderly:

Buy stocks when valuations are low, and you'll probably do all right over the coming five years. Buy at high valuations, and you'll probably regret it over the next five years. There's a chance something else will happen, but investors tend to get what they deserve over five-year periods. Compared with one-year periods, it's less of a gamble.

Now look at what happens over 10-year periods:

It's even more orderly: Those who buy stocks at low valuations will very likely do well over 10-year periods, while those who buy expensive stocks very likely won't. Forget the crapshoot; we can now put the odds firmly in (or against) our favor.

The lesson here is simple, but it's probably the most important in all of investing. To reasonably assure success:

  • You have to buy stocks when they're cheap.
  • You have to hold them for a long time.

Otherwise, you are, at best, playing a game of dice.

If this is so simple, why do so many investors do poorly? Silver interviewed former tech analyst Henry Blodget, who had this to say:

If you talk to a lot of investment managers, the practical reality is they're thinking about the next week, possibly the next month or quarter. There isn't a time horizon; it's how are you doing now, relative to your competitors. You really only have ninety days to be right, and if you're wrong within ninety days, your clients begin to fire you. You get shamed in the media, and your performance goes to hell. Fundamentals do not help you with that.

In other words, their world resembles the first chart -- the crapshoot.

Meanwhile, investors added $660 billion to stock funds between 1997 and 2000, when stocks were at record-high valuations. If they were patient enough to stick with their investments for 10 years or more, they still occupy the far right of these charts, locking in low returns.

Warren Buffett once gushed to PBS about Ben Graham's classic book The Intelligent Investor. "I really learned all I needed to know about investing from that book, and particular chapters 8 and 20," he said.

What did chapters 8 and 20 discuss? How to buy cheap stocks and how to hold them for a long time.

Check back every Tuesday and Friday for Morgan Housel's columns on finance and economics.