I started this post immediately after Mark Buehrle's perfect game, then had to put it aside while life took precedence. In the meantime, I saw an article (which I now predictably cannot find) that went significantly more in-depth than I had planned, but I still think this rough analysis gives even the most out-of-touch-with-baseball folk an idea of the sheer improbability of a perfect game. I'm currently waiting for a database at work to come back online (sigh), so I figure I'll finish this out.
First, we'll break the game down into at-bats for the other team, and assume that each at-bat is an independent event (the outcome of one has no effect on the outcomes of others). We'll also assume, very optimistically, that each batter has a batting average (BA) of .300, and an on-base percentage (OBP) of .400*. Setting aside fielding percentage entirely, the probability of holding 27 consecutive batters hitless is:
(.700)27 = 6.57123624 × 10-5 ≈ .0066%
And the probability of simply keeping those men off the basepaths, whether by hit, by walk, or by fielding error is:
(.600)27 = 1.02349037 × 10-6 ≈ .0001%
Again, this is a shamefully rough calculation. Batting averages and on-base percentages vary from player-to-player, pitchers tire over the course of the game, lowering the probability of getting subsequent batters out, and fielders make mistakes. A more accurate analysis would dampen the probability of getting each consecutive batter out based on the number of pitches thrown that inning, as well as pitches thrown that game, the number of outs made by fielders (batters are hitting the ball, just not to the right places), the probability of a walk, and some tiring coefficient, due to normal fatigue experienced when hurling a baseball at around 90 miles-per-hour. We would also want to, for each batter, factor in the probability of a fielding error conditioned on a ball hit to the field. And there are a zillion other things that could influence a given at-bat, so even that analysis would miss something.
I've been reading about Orel Hershiser, who used to say that he'd set out to throw a perfect game. If he gave up a walk, he was throwing a no-hitter. A hit? One-hit shutout. A run? That will be the only run. And so on, and so forth. It's the mentality any professional pitcher should have, and the fact that only eighteen in the history of major league baseball have seen the mentality of the first pitch to the final out is enough justification (though there is no shortage thereof) as to why baseball is the game of failure. Achieving true success—perfection—in baseball is no trivial task, and is a rare, beautiful, and precious thing.