Baseball is, fundamentally, a game of probabilities — measurable probabilities. We can estimate the likelihood that a player will get a hit based on all kinds of factors — whether he bats right- or left-handed, whether the pitcher is right- or left-handed, the size of the ballpark, the quality of the defense on the field, and many other variables. Hell, we can do even better than that. Using the prevailing run-scoring environment of any era, we can determine the average number of runs likely to score using any permutation of runners on base, and outs.

All of this information has made playing armchair manager even more enticing for fans. But those seeking instant justice with their run expectancy matrices have been disappointed this postseason. The 2014 playoffs have been wild, defying logic at every turn, with game after game delivering spectacularly implausible (and spectacularly exciting!) happenings. Mike Matheny leaves Matt Adams in the fifth spot against Clayton Kershaw even though Adams is as threatening as a sedated tortoise against southpaws … and Big City blasts one of the biggest homers of the postseason. Ned Yost chooses the worst of about seven options with the game on the line in the sixth inning of the wild-card game … and lives to tell about it, thanks largely to a power surge that’s propelled a Kansas City Royals team that wasn’t known for its home runs to an improbable 6-0 mark in the playoffs.

The St. Louis Cardinals’ win over the San Francisco Giants in Game 2 of the NLCS came in one of the wildest games yet, a nerve-jangling joyride that featured gripping action and also lots of head-scratching decisions by both managers. A few of those decisions blew up in the faces of Bruce Bochy and Matheny. But many more worked out perfectly, reminding us of one immutable fact about playoff baseball, or really any baseball: Anything can happen in a short amount of time, even events that turn numbers inside out.

Let’s run through Sunday night’s madness, looking at nine of the game’s biggest junctures, what each manager should have done based on the math, and what actually happened:

SITUATION: Bottom of the fourth, runners on first and second, nobody out, Yadier Molina at bat, Cardinals lead 1-0. Should the Cards bunt?

DECISION: Molina lays down a bunt, sacrificing the runners to second and third.

THE MATH SAYS: All things equal, he shouldn’t have bunted. Tom Tango’s run expectancy matrix shows that a team would be expected to score an average of 1.48 runs with runners on first and second and nobody out, vs. 1.38 runs with runners on second and third and one out. (The relevant box to look at is the one labeled 1969-1992, because 2014 offensive levels are roughly in line with that period. ) And this assumes that Molina was guaranteed to lay down a successful sacrifice, when, of course, there was no guarantee that he would. Then again, we can turn this around and note that Molina might’ve been playing hurt (he would leave the game after injuring his oblique in his next at-bat), so maybe he bunted on his own accord. All things considered, this was a fairly minor tactical error, if that.

RESULT: After the sacrifice was successful, Bochy ordered an intentional walk of Kolten Wong. Randal Grichuk then came through with an RBI single. But with pitcher Lance Lynn up next (more on that in a second), the inning bogged down and St. Louis managed just one run.

SITUATION: Bottom of the fourth, bases loaded, one out, Lynn due up to hit. Should the Cardinals pinch-hit and lose Lynn, or keep the starter in the game?

DECISION: Now up 2-0, Matheny declines to pinch-hit for his starting pitcher.

THE MATH SAYS: This was more of a judgment call. Lynn was pitching well, and this year he got better as games went on. Per Baseball-Reference.com, opposing hitters batted .262/.303/.404 in their first crack at Lynn during 2014 games, .226/.319/.339 their second time up, and .231/.310/.332 their third time. Still, the Cardinals had a chance to break the game open in this spot and shouldn’t have worried about a substitution. St. Louis has a deep bullpen with a day off Monday.

RESULT: Lynn flied out (not deep enough to drive in a run), leaving the inning up to Matt Carpenter.

SITUATION: Bottom of the fourth, bases loaded, two outs, Carpenter up, Giants starter Jake Peavy still pitching. Should he stay in the game?

DECISION: Despite having one of the most effective lefty specialists in baseball (Javier Lopez) at his disposal, Bochy leaves Peavy in to pitch to Carpenter, with the game more or less on the line.

THE MATH SAYS: Lopez was warmed up and the better pitcher for the moment. Left-handed hitters batted just .194/.248/.290 against the left-handed Lopez this season, and just .210/.290/.300 for the duration of Lopez’s 12-year career. Peavy, a right-hander, has splits that are significantly worse against left-handed batters. Moreover, Peavy would be facing the seventh hitter of a high-stress inning, increasing his likelihood of fatigue and lowering his likelihood of success. He was also due up fourth in the top of the fifth.

RESULT: Carpenter flied out weakly to center. No damage done.

SITUATION: Top of the sixth, runner on second, two outs, Hunter Pence up, Cardinals lead 2-1. Who should pitch?

DECISION: Matheny leaves Lynn in to pitch to Pence.

THE MATH SAYS: This was also a judgment call. You’ve got those numbers in Lynn’s favor as a pitcher who often fares better as he gets deeper into games. The only reason the Giants had a runner on second is because, after Lynn fanned the first two batters of the inning, Pablo Sandoval hit a dying quail that landed just fair and bounced into the seats down the left-field line for a ground-rule double. Meanwhile, the Giants had a righty-on-righty matchup with Pence at the plate, and no pitch-count issues or obvious signs of fatigue for Lynn. You can argue that Matheny erred by not trying to step on the Giants’ necks in the fourth by pinch-hitting for his pitcher. But by this point, leaving Lynn in was a defensible move.

RESULT: Pence lines a single to center, scoring the tying run.

SITUATION: Bottom of the seventh, nobody on, one out, Cardinals’ pitcher’s spot due up. Which Giant should pitch to the Cardinals’ pinch-hitter?

DECISION: Bochy sticks with right-handed reliever Jean Machi to pitch to lefty-swinging Cardinals rookie Oscar Taveras.

THE MATH SAYS: This was a scream at your TV moment even before the result. Lopez the lefty-killer was warmed up here, too, and would’ve been a nightmarish matchup for Taveras, a gifted prospect who’s a free swinger and has a minor-league track record of hitting righties much better than lefties. Also, the next two batters due for the Cardinals were Carpenter (whom Matheny was certainly going to leave in the game) and Jon Jay (not quite a lock to stay in the game but likely to do so). Even if Bochy brought Lopez in and Matheny countered by subbing for Taveras, Bochy would’ve knocked the Cardinals’ most dangerous pinch-hitter out of the game without Taveras ever getting to bat. Lopez then would’ve faced a weak right-handed hitter like Peter Bourjos or Pete Kozma before the next two left-handed batters came up. Machi’s not a bad pitcher, but there was no good reason to leave him in to face Taveras, even after acknowledging the rookie’s struggles this season.

RESULT:

Your browser does not support iframes.

… and then Bochy brought in Lopez to face Carpenter and Jay anyway.

SITUATION: Bottom of the eighth, nobody on, one out, the Cardinals’ Adams due up. Who should pitch to him?

DECISION: Bochy sticks with rookie right-hander Hunter Strickland to face Adams.

THE MATH SAYS: Strickland wasn’t ideal. This was partly a math issue, but even more so a scouting issue. Although Strickland throws a fastball that can touch triple digits, he’d also been a gopher ball machine this postseason, serving up three home runs to three left-handed hitters in three innings last series against the Nats. Granted, the next two batters due up for St. Louis were right-handed hitters. And Bochy had already used Jeremy Affeldt and Lopez, his two big lefty arms out of the pen. But Strickland had shown last round that lefties can smash his straight heat, and Adams certainly had the ability to do the same. Lights-out swingman Yusmeiro Petit, closer Santiago Casilla … the Giants had multiple pitchers whom you’d have trusted more than Strickland in this spot.

RESULT:

Your browser does not support iframes.

SITUATION: Cardinals lead 4-3 going into the top of the ninth. Should Matheny make defensive substitutions?

DECISION: Matheny decides not to replace Jay in center field with Bourjos.

THE MATH SAYS: Bourjos is an all-world defender and a big defensive upgrade over Jay. From Bill Buckner to Nelson Cruz, we’ve seen all too painfully what can happen when managers get lazy and don’t pull bad glove men out of the game in big spots. Matheny has to bring Bourjos into the game in this spot. Otherwise, why bother carrying the guy on your playoff roster? Given the simplicity of the move involved, this was one of the worst decisions by either manager in a game full of puzzlers.

RESULT: The Giants’ Andrew Susac lines a one-out single to center, starting a rally that leads to the Giants scoring the tying run. Bourjos would’ve had a tough play to catch Susac’s liner. But he almost certainly would’ve taken a better stab at it than Jay did, as the starting center fielder took a couple of tentative steps in, then just let the ball bounce in front of him for a hit.

SITUATION: 4-4 tie, top of the ninth, bases loaded, two outs, Sandoval up. Who should pitch to him?

DECISION: Matheny pulls his struggling closer Trevor Rosenthal after two singles, two walks and one costly wild pitch allow the Giants to tie the game and load the bases in pursuit of the go-ahead run. In place of Rosenthal, Matheny summons right-hander Seth Maness.

THE MATH SAYS: Maness does have more experience, both as a reliever and in general, than the man who was warming up alongside him in the ninth, rookie starter/swingman Marco Gonzales. Still, Gonzales had recent experience pitching in big relief spots, having posted 4.1 shutout innings of relief between the NLDS against the Los Angeles Dodgers and Game 1 of the NLCS against the Giants. More importantly, Sandoval is a much better hitter against righties (.317/.363/.461 this year, .304/.357/.493 for his career) than he is against lefties (.199/.244/.319 this year, .270/.317/.391 for his career). By the numbers, Gonzales was the right call, and the decision had a chance to decide the Cardinals’ entire season, given the circumstances.

RESULT: Sandoval grounded right back to Maness, ending the inning and dousing the threat. Matheny made the wrong call, and Maness saved the season anyway.

SITUATION: 4-4 tie, bottom of the ninth, Cardinals’ hitters No. 7, 8 and 9 due up. Who should come out of the Giants’ bullpen?

DECISION: Bochy brings former closer/erratic setup man Sergio Romo into the game.

THE MATH SAYS: Casilla and Petit, by the numbers, were both better options to enter the game than was Romo. Then again, whoever was coming in for the bottom of the ninth did have the bottom of the order coming up, and you can make a case for preserving Casilla for tougher competition and having Petit available to serve as a multi-inning-shutdown guy later, the way Bochy did when he rode Petit for six shutout innings in the Giants’ 18-inning win over Washington in Game 2 of the NLDS. Even with those other factors on the table, the best practice for bullpen use that late in the game should be to make sure a team uses its best guys, instead of trying to get cute with lesser pitchers. Hold Romo back as something closer to a last resort and hope the game never even gets to him while riding more reliable options like Casilla and Petit in the here and now.

RESULT: Walkoff city.

Your browser does not support iframes.

Nine different decisions, all of which could have (and in most cases should have) been handled differently based on the probabilities at hand. Yet in the end, both managers got away with multiple suboptimal decisions. The game wasn’t decided by tactics, but it was still a thriller that came down to four homegrown left-handed hitters going yard for the Cardinals in the same game. Those four blasts mean that the Cards have launched one homer for every 16.8 at-bats this postseason, the third-best home-run rate of any playoff team in history. This for a club that ranked last in the National League in long balls during the regular season.

As Yankees broadcaster John Sterling has long reminded us, you can’t predict baseball. That’s what makes the game so maddening. And so delightful.

CORRECTION (Oct. 13, 2:26 p.m.): An earlier version of this article misstated that Matt Adams hit cleanup when he faced Clayton Kershaw during the fourth game of the National League Division Series. He hit fifth in the lineup.