*Read **more** about Wall Street’s ongoing crisis. *

Here’s how to make money flipping a coin. Bet 100 bucks on heads. If you win, you walk away $100 richer. If you lose, no problem; on the next flip, bet $200 on heads, and if you win this time, take your $100 profit and quit. If you lose, you’re down $300 on the day; so you double down again and bet $400. The coin can’t come up tails forever! Eventually, you’ve got to win your $100 back.

This doubling game, sometimes called “the martingale,” offers something for nothing—certain profits, with no risk. You can see why it’s so appealing to gamblers. But five more minutes of thought reveals that the martingale can lead to disaster. The coin will come up heads *eventually*—but “eventually” might be too late. Most of the time, one of the first few flips will land heads and you’ll come out on top. But suppose you get 11 tails in a row. Just like that, you’re out $204,700. * The next step is to bet $204,800—if you’ve got it. If you’re out of cash, the game is over, and you’re going home 200 grand lighter.

But wait a minute, maybe somebody will *loan* you the $200,000 you need to stay in the game. After all, you’ve got a great track record; up until this moment, you’ve always ended up ahead! If people keep staking you money, you can just keep betting until, *eventually*, you win big time.

See where I’m going with this?

The carefully synthesized financial instruments now seeping toxically from the hulls of Lehman Bros. and Washington Mutual are vastly more complicated than the martingale. But they suffer the same fundamental flaw: They claim to create returns out of nothing, with no attendant risk. That’s not just suspicious. In many cases, it’s mathematically impossible.

To explain why, I need to introduce the mathematical notion that underlies every price computation in finance, from options to insurance to credit default swaps: *expected value.* Suppose somebody approaches you and says, “I propose a game of chance. I flip this coin, and if it comes up heads you get $100. If it comes up tails, you get nothing. How much will you pay me for the right to play this game?” In other words: What is the *value* of a 50 percent chance of winning $100?

If you played this game all day, you’d probably win about half of the time. Most people, then, would value the coin flip game at $50, which is just the probability of success (50 percent, or 0.5) times the value of a successful outcome ($100). In general, to compute the expected value of a game you need to add up the values of all possible outcomes multiplied by their respective probabilities. Consider, for instance, the riskier game where you win $100 if the coin lands heads but lose $100 otherwise. Each of those outcomes happens 50 percent of the time; so the value of this game is

(0.5) x ($100) + (0.5) x (-$100) = $0

The equation just records the obvious fact that this game favors neither you nor your opponent. It’s a wash.

What’s the expected value of the martingale? Like the game above, it’s no more than a bunch of coin flips, each one of which has a value of 0. So the whole game has a value of 0.

On the other hand, if you start with a big bankroll (or generous lenders), it’s pretty unlikely you’ll encounter a run of luck bad enough to knock you out of the game. It’s a little messy to compute exactly *how* unlikely, but we don’t need exact figures to make the main point. (If exact figures are your bag, though, I’ve worked them out in a short PDF.) To simplify matters, let’s say there’s a 99 percent chance you wind up $100 ahead. Then the expected value of the martingale is

(0.99) x ($100) + (0.01) x (catastrophic outcome) = 0

But we already know the expected value is 0! Simple algebra suffices to solve the resulting equation—for the bet to have a value of 0, “catastrophic outcome” must be -$9,900.

In other words, the martingale strategy doesn’t eliminate risk—it just takes your risk and squeezes it all into one improbable but hideous scenario. The expected value computation is unforgiving. No matter what ultrasophisticated betting strategy you adopt, you can’t expect to make money in the long run by flipping a fair coin. There’s always a risk of loss—and the smaller the chance of losing, the uglier the potential loss becomes. The result is a kind of “upside-down lottery.” If you play the Powerball, you’ll probably lose the cost of a ticket, but you might win big. In the martingale, you’ll probably win a little, but if all six numbered balls match your ticket, then the bank comes around and takes away everything you’ve got.

You probably wouldn’t sign up for that game. But the news of the last few weeks confirms that we’ve been playing it for years. And it looks like the balls just lined up. Oh, and there’s one more difference between the thickly interwoven financial markets and the lottery: If one person wins the Powerball, just one person gets rich. If one massively leveraged financial firm loses while playing the martingale, it can bring the whole system down with it.

The complex derivatives behind the current financial havoc aren’t literally martingales, but what’s wrong with the martingale is one of the things that’s wrong with the derivatives. There’s no question that you can reduce risk drastically by combining different investments in a single portfolio; that’s what plain-Jane instruments like index funds do. What sounds an alarm is the claim that you can get low risk and high returns in the same happy package. “Once the limits of diversification have been reached,” John Quiggin, an economist at the University of Queensland, told me, “rearranging the set of claims involved isn’t going to reduce risk any further, so if all parties appear to be making risk-free profits, the risk must have been shifted to some low-probability, high-consequence event.” In other words, if it sounds too good to be true, it’s probably heading toward some outcome too bad to be borne. Or, as financial skeptic Nassim Nicholas Taleb wrote last week, “It appears that financial institutions earn money on transactions (say fees on your mother-in-law’s checking account) and lose everything taking risks they don’t understand.”

The martingale’s bad reputation is just about as old as the martingale itself; the word, which dates back almost five centuries, is said to come from the hinterland town of Martigues in southern France, whose residents weren’t known for their gambling savvy. The quantitative superstars who inhabit the back offices of the financial industry, and the people who regulate them, are no star-struck hicks. So why did they fling themselves so boldly into martingale-style investments?

One way the banks got fooled was by convincing themselves that the coin wasn’t really fair. The only way to make money in the long term by betting on coin flips is to have some reliable way of predicting the outcome—for example, if you know that a flipped coin will land on the side it was flipped from about 51 percent of the time. Not long ago, the credit market was convinced that the upward trajectory of house prices had reached some kind of escape velocity and that the usual laws of finance were powerless to bring prices back down. It was supposed to be like betting on a coin that was heads on both sides.

A better way to account for the financial markets’ irrational behavior is to concede that it’s not as irrational as it looks. There’s one kind of game in which a martingale strategy makes sense: a game in which it matters whether you win or lose, but *not by how much. *If you’re a hockey team down by a goal with a minute left, you pull your goalie; that strategy has a negative expected value, but losing by two or three goals is no worse than losing by one. If you’re a presidential candidate behind in the polls with time running short, you choose an unknown small-state governor for your running mate, or you suspend and then reanimate your campaign in a 48-hour period. What’s the downside? If the magnitude of the loss doesn’t matter, trading a big probability of a narrow loss for a smaller probability of a truly spectacular flameout is just smart play.

And this is what makes some people queasy about the federal bailout of the banks. It just might be that the prospect of a bailout—which could make a total collapse no worse for the banks than a garden-variety bear market—could have helped cause the martingale boom. There seems to be little question that the country needs the bailout now. But unless some real pain for the martingalers is built in, we’d better be ready for a return to maverick finance down the road.

** Correction, Oct. 3, 2008: **This piece originally misstated how many coin flips you would have to get wrong to lose $204,700 using the martingale betting strategy. It is 11, not 10. (Return to the corrected sentence.)