While no one has discovered a soothsaying method to guarantee wealth in the stock market, the whims of millions of investors do produce robust patterns in the seemingly random price swings.

In this light, a market crash may seen as a natural disaster like an earthquake or a hurricane, rather than collective human folly.

Dr. John Allen Paulos, a mathematics professor at Temple, lost so much in WorldCom stock that he declines to say exactly how much.

"Substantial," he said. "Leave it at substantial."

Dr. Paulos, author of "Innumeracy" and "A Mathematician Reads the Newspaper," may recoup some of his money in his latest book, "A Mathematician Plays the Stock Market." In it, he recounts his investing travails and explains the mathematical underpinnings of markets that he should have known better.

As in his earlier books, Dr. Paulos writes about hard numbers and fuzzy emotions and how the hard numbers can deceive the emotions.

"The point of the book is to impart these little nuggets of insight," Dr. Paulos said, "so people can have a better feel for the logic, the conceptual way of the stock market. There's a value in understanding."

One simple example he offers is of two people, Henry and Tommy, betting on the flipping of a fair coin. Henry gets a point for each time the coin comes up heads; Tommy gets a point for tails.

Since the coin is fair, each is equally likely to win the contest. But that does not mean that each will lead in the cumulative score half of the time.

Rather, it is much more probable that one of them will hold the lead through 96 percent of this coin-flipping contest. Given a large number of flips — say 1,000 or so — one will likely, by chance, open up a significant lead and, because the coin is fair, maintain that lead. Even in this game of pure chance, Dr. Paulos writes, it is tempting to laud the winner for his prowess.

Stock pickers, too, sometimes succeed through luck, Dr. Paulos said.

Dr. Paulos also offers an example of how an investing strategy can produce phenomenal returns on average, but leave most of its practitioners almost broke. Going back to the late 1990's, he imagines buying the initial public offering of a new company every week, selling the stock at the end of the week, then using the proceeds to buy and sell another I.P.O. the next week. For simplicity, assume that half of the I.P.O's increase 80 percent in their week of trading and half of them drop 60 percent. Start with $10,000. After two weeks, there are four equally likely outcomes for this strategy: both stocks gain (and the $10,000 investment jumps to $32,400); the first stock gains, the second drops (ending with $7,200); the first drops, the second gains (again producing $7,200); and both stocks drop (leaving just $1,600). Note that three of the four outcomes result in the investor's losing money, yet the average result ($32,400 + $7,200 + $7,200 + $1,600 / 4) is $12,100, a healthy gain.

Continue this strategy over the course of a year, and that disparity between average gains and likely losses widens. The average final value of the $10,000 investment is $1.4 million, but the most likely result for investors is that the $10,000 has dwindles to $1.95.

What seems to be a paradox arises from the fact that most anyone can lose the $10,000, while the few very big winners bring the average up.

In an article in the journal Nature in May, researchers at Boston University and the Massachusetts Institute of Technology found that stock prices follow a distribution, known as a power law, that is almost identical to that of earthquakes.

"Financial earthquakes and earthquake earthquakes are perfect analogs for one another," said Dr. H. Eugene Stanley, a professor of physics at Boston University.

For mathematical simplicity, most calculations of investment risk assume that the fluctuations follow a distribution known as gaussian, even though it is not a perfect fit. For small fluctuations, the difference is insignificant, but a power law indicates that large swings are more common than are indicated by a gaussian distribution. "It lets you quantify the risk," Dr. Stanley said, but "it does not tell you at all when the earthquake occurs."

Dr. Xavier Gabaix, a professor of economics at M.I.T. and another author of the Nature paper, said the power law distribution of fluctuations arises because the mix of stock traders follow a similar distribution, from the multitudes of individual small investors to a few very large investment companies.

While some have suspected for years that stock market fluctuations follow a power law, the new research shows that stock indices in Hong Kong, Tokyo and Europe all follow the same law, Dr. Stanley said. The researchers have found indications it may not hold for one market that operates under markedly different rules, Dr. Stanley said.

But he said he wouldn't use the new knowledge for personal profit.

The first — and last — company he invested in was Xerox. "I bought it at its all-time high," Dr. Stanley said. "I've watched it go down, down, down. I'm too stubborn to sell it. I might as well have fun and buy a lottery ticket."

Dr. Paulos is still in the stock market, but he says he is now content to ride along instead of trying to beat it. Most of his money is now invested in stock index funds.

"On the whole, I think the market, despite all its imperfections, is an engine for prosperity and is a good thing," Dr. Paulos said. "I'm skeptical of beating it by much for a long time, or even beating it at all."