27 October 2007

Red Sox rolling

In my last post I claimed that 4-2 is the single most likely World Series result if one team has between a 50% and 60% probability of winning each game.  Well, now the Red Sox are up 2-0 in the Series.  What's the single most likely result now, assuming that the Red Sox are only slightly favored to win each individual game?

Surprisingly, it's a 4-0 sweep.

Let's conservatively assume that the Red Sox have only a 51% chance of winning each game.  We can then compute the probability of each possible result by looking at every possible win/loss sequence.  For example, consider 4-2.  If we take "CCBB" to mean Colorado wins games 3 and 4 and Boston wins games 5 and 6, then there are only three possibilities that lead to a 4-2 result: CCBB, CBCB and BCCB.  The probability of each is 49% × 49% × 51% × 51% ≈ 6.245%, and multiplying by 3 gives the probability of a 4-2 result: 18.735%.  Doing the same for the other possible results, we get

Red Sox 4-026.01%
Red Sox 4-125.49%
Red Sox 4-218.735%
Red Sox 4-312.24%
Rockies 3-411.76%
Rockies 2-45.765%

So, unless the Rockies are truly the better team, a sweep is now more likely than any other result, and the Red Sox have at least a 81.25% chance of winning it.  (For the Rockies to have a 50% chance of winning the Series, they'd need to have a 68.62% chance of winning each game.)

23 October 2007

My World Series pRediction

The Red Sox successfully came back from 3-1 down to beat the Indians and join the Rockies in the Series, which starts tomorrow night.  (By the way, anyone but me agree that Youk deserved to be the ALCS MVP over Josh Beckett?)  Sure, the Sox were a better team than the Rockies this year, and if we can make the reasonable assumption that they have between a 50% and 60% chance (exclusive) of beating them in each game, then the single most likely result is Red Sox 4 games, Rockies 2.  (If they have between a 60% and 75% chance of winning each game, which seems unlikely, then the single most likely result is 4 games to 1; it would take a winning probability greater than 75% to make a sweep the most likely result.)  But, despite the fact that my Nostradamian analysis already predicted Sox over Rox, I won't base my prediction on that technical kind of stuff.

Only twice before in history have two teams with nicknames beginning with R faced each other in the World Series.  The Red Sox beat the Robins 4-1 in 1916 but then they lost 4-3 to the Reds in 1975.  Based on the fact that the Sox are 7-5 in World Series against fellow R-teams, I predict Red Sox 4 games, Rockies 3.  (Though I might be more likely to go with 4-2 if Tim Wakefield were healthy and playing.)

The last time the team with baseball's best Nostradamian record won it all was Boston in 2004 (even though they only got into the playoffs as a wild card), on which more soon.

18 October 2007

Quantifying baseball excitement

Playoff baseball is a crapshoot.  So few games are played in a series that the better team loses fairly often, so it'sn't exactly the fairest way to determine a champion.  But its unpredictability and the fact that every game means so much make baseball in October fun to watch.

Fan Graphs is a fun site that offers visual representations of baseball games, estimating each team's probability of winning the game before and after each play and plotting the resulting curve through all 9+ innings, finally approaching 100% for the winning team.  Underneath each graph is the Leverage Index, a measure of the importance of each game situation.

For example, consider the games of October 12th.  In the first game of the ALCS, the Red Sox took a four-run lead in the bottom of the third and the Indians' chances of winning were slim for the rest of the game.  The Leverage Index was also low the rest of the game, meaning that each individual play had little potential effect on the outcome.  Not a very exciting game.

In the second game of the NLCS, the Diamondbacks fell behind by one run three times and scored to tie it again twice, failing only in the bottom of the eleventh.  It was a close game the whole way and the Leverage Index was especially high in the last three innings—very exciting, with much riding on each play.

The next night, the Indians and Red Sox traded the lead several times until the Indians scored 7 runs in the 11th inning and won 13-6.  Exciting until Trot Nixon's RBI single.

But regular-season baseball can be exciting too.  Take September 22nd, surely the most exciting single day of games this season.  In five games, a team had less than a 25% chance of winning its game but ended up coming back to take it.  The Orioles were behind the Rangers 6-2 and 8-5 but came back to win 11-9.  The Phillies and Nationals were tied 1-1 in the bottom of the 7th and the Nationals had a runner on third with none out but couldn't score; the Phillies finally won 4-1 in 10 innings.  The Brewers went into extra innings against the Braves, scoring one run in the top of the tenth, but the Braves scored one in the tenth and again in the eleventh to win it.  The Red Sox were ahead of the Devil Rays 5-2, then down 6-5, then scored three in the ninth to win it 8-6.  And the Blue Jays were behind the Yankees 6-3, then went up 8-6, then down 9-8, then up 11-9, then lost 12-11 in 10 innings.

(The Blue Jays won especially exciting games on May 26th and July 8th.)

11 October 2007

Nostradamian baseball, part 2

Last week I described a way to factor out the level of luck a team has due to clustering of plays among innings and runs among games.  I tried using four different approaches to estimating runs scored and allowed from atomic statistics like hits, walks, doubles, stolen bases, etc.:

  • Runs Created (basic version)
  • Runs Created (2002 version)
  • Base Runs (basic version)
  • Base Runs (detailed version)

and four approaches to estimating winning percentage from runs scored and allowed, all using the Pythagorean approach with different exponents:

  • constant 2
  • constant 1.83
  • Pythagenpat using team-average runs per game raised to the 0.287 power
  • Pythagenpat using league-average runs per game raised to the 0.287 power

All sixteen combinations gave very similar results, so I used the basic version of Base Runs and the constant 1.83 exponent.  I found that the Red Sox deserved to have far and away the best record in baseball and were quite unlucky to finish only 96-66, while the Diamondbacks were lucky to end up with a winning record, much less reach the playoffs.  (I mined the raw statistics from baseball-reference.com and wrote a program in C to handle the calculations.)

Note that, unlike in some other statistical contexts, it's not necessary to correct for hitters' and pitchers' parks because for each team those cancel out.  A team's stats and its opponents' stats are compiled in the same set of parks, so it's comparing apples to apples.  But the results tell us only approximately how objectively good each team is; more exactly, they tell us how each team deserved to finish (with average luck) in the same season, against the same opponents.  So if two teams have roughly the same Nostradamian record and one played in a tougher league or division, it's probably the better team.

This kind of approach works very well for teams but less well for individual players, as players with very high OBA and SLG are slightly overrated by both Base Runs and Runs Created.  The reason is that both measures estimate runs scored (or allowed) by effectively taking into account the probability of getting on base and the expected proportion of baserunners eventually scoring.  When both are especially high for one player, the effect is unduly magnified.  For example, the Rockies' Matt Holliday excels at both getting on base and hitting baserunners in, but in real games he isn't hitting himself in, and most of the players around him in the lineup aren't as good as he is.  Base Runs and Runs Created estimates how many runs a lineup with nine Matt Hollidays would score, but a better offensive measure of a single player might put him in a league-average lineup and measure how many runs he could be expected to add to that lineup.  (Base Runs and Runs Created don't take into account a player's RBIs or runs scored because those stats depend heavily on the quality of the hitters ahead and behind him in the lineup.)

Also, the defensive stats measure the effectiveness of a team's pitching and fielding as a unit, which is ideal for projecting team records.  There are better ways to evaluate individual pitchers' performances, as Voros McCracken's revolutionary DIPS work showed.  Essentially, he found that pitchers have much more control over their strikeouts, walks and home runs than they do over whether a ball put into play is an out or a hit, which depends more on the quality of the fielders behind him.

As for the ALCS and NLCS matchups, the Red Sox (96-66) and Indians (96-66) and the Diamondbacks (90-72) and Rockies (90-73) may seem evenly matched, but the Red Sox deserved to finish more than 12 games ahead of the Indians and the Rockies deserved to finish more than 13 games ahead of the Diamondbacks.  Still, don't forget Joaquin Andujar's favorite word in English: youneverknow.

03 October 2007

Nostradamian baseball, part 1

It's October, and that means baseball playoffs!  They start today and it's time for my predictions.  So which were the best teams this year?

It's tempting just to look at teams' regular-season win-loss records, but as I pointed out in Pythagorean baseball, a team's win-loss record reflects luck in how the runs they scored were distributed among their games.  If team A beats team B 11-3 then loses to them 2-3, team B could be seen as lucky that team A's runs weren't more evenly distributed.  The sabermetrician Bill James came up with a method to predict win-loss record using only a team's runs scored and runs allowed, thus ignoring how runs are bunched among games, which in the long run is mostly luck.

But that's not the only source of luck that contributes to wins and losses.  The distribution of hits, walks and other individual plays among innings is also important and largely luck.  For example, if a team bats once through its lineup and hits three doubles and six groundball outs, will it score one or two runs in those two innings?

What is needed to factor out this kind of luck is a way to predict runs scored and allowed from more atomic statistics like hits, walks, doubles, stolen bases, etc., just as the Pythagorean approach predicts wins and losses from runs scored and allowed.  Base Runs (which can be seen as an improved version of Bill James's Runs Created) does just that.  So we can use Base Runs to estimate runs scored and allowed, then the Pythagorean approach on the results to estimate wins and losses.  This way both run-bunchings among games and play-bunchings among innings are factored out, and just as past Pythagorean win percentage predicts future win percentage better than past win percentage does, past Base Runs predicts future runs better than past runs does, so past Base-Runs-Pythagorean ("Nostradamian"?) win percentage should predict future win percentage better than past Pythagorean win percentage does.  The Nostradamian, Pythagorean and actual win percentages for all teams in 2007:

nW%pW%W%
Red Sox.630370.624234.592593
Yankees.582027.599221.580247
Padres.558858.548666.546012
Indians.554616.564372.592593
Rockies.554377.557503.552147
Blue Jays.550323.533992.512346
Cubs.543983.539284.524691
Mets.541677.531765.543210
Braves.540740.545572.518519
Tigers.538533.548792.543210
Angels.529305.553472.580247
Dodgers.524781.505007.506173
Athletics.524291.489624.469136
Phillies.522948.537874.549383
Brewers.521173.514503.512346
Reds.472988.460906.444444
Cardinals.472115.438979.481481
Mariners.471979.489183.543210
Diamondbacks.471349.487329.555556
Orioles.467982.437131.425926
Twins.467428.495561.487654
Giants.460918.475883.438272
Marlins.458788.445179.438272
Rangers.458320.484570.462963
Astros.446700.446530.450617
Devil Rays.438791.414708.407407
White Sox.437440.413416.444444
Nationals.428233.431180.450617
Pirates.423836.429233.419753
Royals.402586.455688.425926

So, based on these results, it's reasonable to predict:

Red Sox over AngelsRed Sox over YankeesRed Sox over Rockies
Yankees over Indians
Cubs over DiamondbacksRockies over Cubs
Rockies over Phillies

In fact, Nostradamian winning percentage says that the Red Sox were by far the best team in baseball this year but were actually quite unlucky.  On the other hand, the Diamondbacks deserved to have a losing record but eked into the playoffs by being the luckiest team in baseball, winning almost 14 games more than they deserved.  The unluckiest team was the Athletics, who lost almost 9 games more than they deserved.  The two best teams not to make the postseason are the Padres, who lost a one-game wild-card playoff to the Rockies in extra innings Monday night, and my Blue Jays, who were unlucky not only in play distribution but by being in the same division as the Red Sox and Yankees.

But if luck can vary so much among teams over a 162-game season, just imagine how much it varies in a 5- or 7-game postseason series.  In fact, Athletics general manager Billy Beane famously said that his sabermetric strategies don't work in the playoffs.  So after all that analysis I'm still going to go with my heart and predict:

Red Sox over AngelsRed Sox over IndiansCubs over Red Sox
Indians over Yankees
Cubs over DiamondbacksCubs over Phillies
Phillies over Rockies

Go Cubbies!