People often joke about the inability of experts to predict the price of oil and, indeed, most of those experts join in the laughter. But the reality is much more complex than that. Most important, the short-term price of oil is extremely volatile and uncertain, especially because of the many political disruptions of supply but also as more oil demand takes place in countries like China and India, where the quality of the data is poor.

The many mistakes made by prognosticators obscures two basic facts: most of them are not actually experts on the microeconomics of the oil market, and the long-term price of oil is much more susceptible to analysis, subject to the fundamentals of supply and demand.

The fact that so many long-term forecasts have proven wildly erroneous magnifies the impression that oil prices cannot be predicted, but is due far more to bad theories and superficial thinking.

The peak oil scare of the last decade is emblematic of this. Hidden within numerous confident assertions of the scientific nature of the theory that global production would soon peak were a combination of bad theories and mistaken assumptions. Not surprisingly, technical questions about discovery levels and field reserve growth were too arcane for many observers, who blindly accepted peak oil advocates’ assertions.

But the way many believed things that were easily disproven stands out in the debate. The insistence that oil supply was not affected by economics, that national or regional production had to follow a bell curve, and that technology was not increasing the amount of oil that could be recovered were easily, and often, shown to be untrue.

My just-published book, “The Peak Oil Scare and the Coming Oil Flood,” shows quite clearly the errors made — and the way so many ignored them.

Of course, the debate morphed into one that was closer to economics, such as the argument that “the easy oil is gone” and that costs had risen to $100 a barrel, setting a floor on prices. The first is nothing more than a platitude about the good old days (an attitude that can be dated to both Homer and the Old Testament), but the latter is quite simply a misunderstanding of economics. Costs had risen, but primarily due to cyclical pressures, which are now being at least partly reversed. And when prices fall, high-cost projects don’t create a floor, but are abandoned (or operated at a lost), bringing the cost of the marginal barrel down.

The biggest effect on oil prices in the last several decades has been what we now call resource nationalism, which depressed supply in the 1970s and again in the 2000s. (Short-term price spikes reflected temporary supply disruptions like the Iranian Revolution and the Arab Spring.)

Partly influenced by economists predicting ever-rising prices, many governments restricted investment and production, especially in low-cost countries like Libya and Venezuela. Now, the pendulum is swinging the other way, with the opening of the Mexican upstream to private operators, efforts by Iran and Iraq to spur production, and probably a new aperture in Venezuela soon. This will add large amounts of “easy oil” to global supply and moderate prices.

And the shale revolution will play a major role in future developments, beyond what has already been seen. Although little natural gas has been exported from the United States as of yet, soaring shale gas production has meant that the anticipated 2 trillion cubit feet of imports (from the 2008 forecast), contributing to the current liquefied natural gas glut and lower prices.

Booming shale oil production, rising 3.5 mb/d in three years, appears to have been a factor behind the decision of some OPEC producers (such as Saudi Arabia) to allow prices to decline, recognizing the long-term threat from continually expanding production.

Shale production is existentially different from many other investments for two reasons. First, it can proceed on a small-scale basis. Individual wells cost a few million dollars and take days to bring on line, versus a deepwater field development, reducing the risk not unlike gas turbines versus nuclear power plants.

And the resource base is huge, meaning that depletion will only slowly raise costs. Instead, the industry is still optimizing production techniques and bringing costs down. Given the huge global shale resource, the slow spread of production and technical improvements will bring costs down, and set a ceiling on long-term prices.