Ithaca, N.Y.

WITH the baseball season under way and the memory of scandal in the sport so fresh, many fans yearn for an earlier era, a time when mythology mingled with baseball. The sport’s most mythic achievement is Joe DiMaggio’s 56-game hitting streak, a feat that has never come even close to being matched. Fans and scientists alike, including Edward M. Purcell, a Nobel laureate in physics, and Stephen Jay Gould, the evolutionary biologist, have described the streak as well-nigh impossible.

In a fit of scientific skepticism, we decided to calculate how unlikely Joltin’ Joe’s achievement really was. Using a comprehensive collection of baseball statistics from 1871 to 2005, we simulated the entire history of baseball 10,000 times in a computer. In essence, we programmed the computer to construct an enormous set of parallel baseball universes, all with the same players but subject to the vagaries of chance in each one.

Here’s how it works. Think of baseball players’ performances at bat as being like coin tosses. Hitting streaks are like runs of many heads in a row. Suppose a hypothetical player named Joe Coin had a 50-50 chance of getting at least one hit per game, and suppose that he played 154 games during the 1941 season. We could learn something about Coin’s chances of having a 56-game hitting streak in 1941 by flipping a real coin 154 times, recording the series of heads and tails, and observing what his longest streak of heads happened to be.

Our simulations did something very much like this, except instead of a coin, we used random numbers generated by a computer. Also, instead of assuming that a player has a 50 percent chance of hitting successfully in each game, we used baseball statistics to calculate each player’s odds, as determined by his actual batting performance in a given year.