A few weeks ago, late in July, Bryce Harper beat up on the Pirates. In a game his Nationals won 9-7, Harper finished 3-for-5 with a double and a dinger. For good measure, he reached on a hit by pitch, and his homer was a walk-off bomb. Every hit in the major leagues is difficult, but maybe in his head, Harper felt like he had more of an opportunity; Harper hasn’t been alive to see the Pirates finish with a .500 record. Two days after the Pirates were eliminated from the 1992 playoffs, Harper was born in Las Vegas, Nevada. His entire life, the Pirates have been a joke.

On Tuesday, the Pirates traded for Marlon Byrd to make themselves better, which is a sentence that makes sense in 2013. And it wasn’t an attempt to improve a lackluster on-field product — the Pirates have their eyes on the playoffs, and they’re currently in an excellent position. They’re right behind the Cardinals in the National League Central, and they’re eight up on the Diamondbacks in the wild-card standings. If and when the Pirates qualify for the postseason, it’ll be an historic moment. But there’s another historic moment they’ll probably have to pass through first: the occasion of their 81st win.

The Pirates, right now, are 76-55, which gives them one of the best records in baseball. A guaranteed .500+ record could be just days away, and of course the Pirates themselves aren’t aiming that low. The Pirates wouldn’t be satisfied just finishing .500, nor should they be. They’re thinking much bigger. But then, last year’s Pirates were once 63-47. They finished 16-36. That 81st win ought to be an event, presuming the Pirates manage to get there.

All they need are five more wins, out of 31 remaining games. Finishing 5-26 would be good for a .161 winning percentage, which would be good enough, toward this end. Not long ago in a chat I was asked about the proper Pittsburgh crowd response upon clinching No. 81. It doesn’t seem like it’s going to happen at home; the Pirates have five home games before going on a nine-game road trip. But it does seem like it’s going to happen somewhere, soon, and the rest of this post is all about probability. Our assumption is that the Pirates will win at least 81 games. But what are the chances they don’t?

Here are the most important numbers:

31

the number of games the Pirates have left

4

the maximum number of games the Pirates can win and still finish under .500

.519

the Pirates’ projected rest-of-season win percentage, from our new Playoff Odds report, accounting for remaining schedule

All this is now is a matter of binomial probability. A better way might be running game-by-game simulations, but I can’t do that, and going binomial should get us close enough anyway in way way less time. Here’s a histogram, showing the probability distribution of win totals down the stretch:

The single most likely outcome is that the Pirates finish 16-15, that coming with 14.2% odds. There’s nearly an eight-in-ten chance the Pirates win between 13 and 19 games. At either end, the lines basically reach 0%; math never expects the extremes.

Here’s another plot, showing two curves that are basically the opposite of one another.

The Pirates have a 99.2% chance of winning at least ten games the rest of the way. They have a 2.2% chance of winning at most ten games the rest of the way. Everything here ought to be pretty intuitive, and of course we don’t care about ten wins. We care about four wins.

We’re curious about the Pirates finishing no better than 4-27. The approximate odds of the Pirates winning four or fewer games: 0.000685%. Another way of putting that is once per 146,029 opportunities. If you replayed the same scenario once a year for a million years, in six or seven years you’d expect the Pirates to finish 4-27 or worse. The odds are not literally zero. The odds are pretty much never literally zero. They’re effectively zero, with just enough likelihood to make the most negative Pirates fans nervous.

What kind of precedent is there for a team doing that poorly? As it happens, one doesn’t have to go very far back. Over a stretch just last season, the Astros went 4-34, entering that stretch at a vaguely respectable 32-43. You’ll notice that 4-34 is even worse than 4-27. But what the Pirates have going in their favor is that they’re the Pirates, and the Pirates are a legitimate major-league baseball team, unlike the last few versions of baseball in Houston. People notice when a team up and just stops winning. The teams that do that generally aren’t good teams. Or even decent teams, and this year’s Pirates are decent, at the very least.

Incidentally, the Pirates have lost three games in a row. Their odds of winning fewer than five games the rest of the way are basically negligible, but they’re more than six times higher than their odds of winning fewer than five games the rest of the way before this little three-game skid. Pirates players are right to be focusing on making the playoffs. Pirates fans are justified to be just a tiny bit anxious. Everyone will feel a whole hell of a lot better once 81 is in the rear-view mirror.

As a fan of underdogs, like everyone else, I have a soft spot for the Pirates, and I’m glad to see them going in the right direction. It’s not just that the Pirates have reinvigorated a baseball community; it’s that, if the Pirates can do it, anyone can do it, and there’s no such thing as a truly hopeless franchise. The Pirates feel fresh, and a big part of me would like to see them in the postseason. There’s just that little tiny bit, though, that thinks it’d be hysterical if the Pirates somehow collapsed again. They could collapse and miss the playoffs, or even more improbably, they could collapse and finish under .500. It would all but require a miracle, but it’d definitely get people talking. That might be enough to convince people to distance themselves from the Pirates, permanently. That’s what a curse would look like.

The most devastating of all potential outcomes? Somehow, the Pirates finish 81-81. Somehow, another team also finishes 81-81, tying the Pirates for the second wild card. The Pirates then lose the one-game playoff, with that one-game playoff counting toward their regular-season record. It’s the stuff of recurring nightmares, and I wouldn’t wish it on anyone. But, holy smokes. It’s not truly impossible.