Optimizing Yesterday’s Lineups

Lineup optimization — ordering batters to create a lineup that produces the most runs — is a topic that receives a great deal of attention relative to its importance (and this article will only make the ratio worse). The fact is most sensible lineups (not batting the pitcher first or putting Alex Rodriguez 8th) will produce nearly the same amount of runs. Still, with the ever-expanding search to find any slim advantage it is something to think about. Sabermetric studies of lineup optimization have produced some interesting results; Sky Kalkman neatly reviews The Book‘s findings on the topic. Compared to the old-school lineup dogma, more weight is given to the second and fifth spots, while less to the third spot. In addition, the Book suggests that batting the pitcher 8th is a good idea.

Baseball Musings has a lineup optimizer tool, which gives the optimal lineup based on each players’s projected OBP and SLG (this ignores speed and handedness, which are also important). Out of curiosity I wanted to see how each of yesterday’s lineups compared with the best one predicted by this tool. I used the CHONE projections and the tool spit out the estimated runs per game for the given lineup and the optimal lineup. I gave all pitchers the average OBP, 0.176, and SLG, 0.179, that NL pitchers had in 2009:

Team      Actual      Best      Dif
TEX       5.017       5.033    -0.016
MIN       5.257       5.308    -0.051
OAK       4.519       4.571    -0.052
CLE       5.019       5.081    -0.062
KCA       4.379       4.446    -0.067
PIT       4.552       4.628    -0.076 *
DET       4.698       4.776    -0.078
TOR       4.676       4.763    -0.087
CHA       4.759       4.858    -0.099
SEA       4.478       4.578    -0.100
LAA       4.891       5.016    -0.125
HOU       3.967       4.142    -0.175
COL       5.064       5.258    -0.194
ATL       4.898       5.106    -0.208
LAN       4.773       4.982    -0.209
ARI       4.704       4.916    -0.212
FLO       4.813       5.035    -0.222
SFN       4.294       4.522    -0.228
PHI       4.873       5.102    -0.229
WAS       4.410       4.644    -0.234
CIN       4.608       4.846    -0.238
CHN       4.660       4.899    -0.239
MIL       4.629       4.876    -0.247
SDN       4.176       4.431    -0.255
NYN       4.381       4.645    -0.264
STL       4.843       5.116    -0.273

* pitcher batted 8th

First off, notice that the worst-optimized lineups were all NL teams that had the pitcher bat 9th. The one NL team that had the pitcher bat 8th, Pittsburgh, fell out in the middle of the AL teams. So it looks like, given a reasonably constructed lineup (as these are), having the pitcher bat 9th results in a pretty big drop. The average pitcher-bats-9th team was 0.23 runs below optimal, while Pittsburgh and the AL teams averaged 0.07 runs below optimal. This would suggest flipping the pitcher and 8th hitter on the other NL teams would result in an improvement of about 0.16 runs. Over 162 games that is 25 runs or 2.5 wins, a surprisingly high number to me.Edit: It looks like the method I took is not correct and this conclusion is false. See the comments and this post by Tango. I apologize.

St. Louis had the worst-optimized lineup. The big problem for them, in addition to having Chris Carpenter batting 9th, was Albert Pujols batting 3rd. As noted above, the studies of lineup optimization shows that the 2nd, 4th and 5th spots should all have better hitters than the third, so having the game’s best hitter bat third really hurts.

I think Texas is the closest to their optimized lineup because they have so many similar hitters. Josh Hamilton, Vladimir Guerrero, Nelson Cruz and Chris Davis all project to have about average OBP (0.320 to 0.340) and good SLG (0.467 to 0.508). Once you throw Julio Borbon in the leadoff spot and Andres Blanco-Elvis Andrus eight-nine there is little variation in runs scored based on the ordering of the middle guys.

Two other quick notes: with Boston, Tampa Bay and the Yankees all off for the night CHONE saw the Twins’ lineup as the best, and Houston’s lineup was expected to score under four runs against the average pitcher, but they had to face one of the best.

Print This Post

Dave Allen's other baseball work can be found at Baseball Analysts.

40 Responses to “Optimizing Yesterday’s Lineups”

You can follow any responses to this entry through the RSS 2.0 feed.
  1. J.P. says:

    You mean batting Mike Jacobs clean-up is sub-optimal?

    You learn something new every day.

    Vote -1 Vote +1

  2. AlexPoterack says:

    Y’know, I remember on thing on one of the Brewers’ broadcasts last year where they had Doug Melvin in the booth, and they were talking about batting the pitcher 8th; I believe Macha had put Escobar in the #9 spot that day. Melvin said that studies have shown that batting the pitcher 8th improves the offense by 30 runs over the course of a season, or 3 wins. I thought, “That’s ridiculous, he must be misunderstanding; most studies have shown lineup optimization only makes a difference of about a win at the most over the course of the season.” Clearly, however, your quick and dirty methodology here suggests Melvin was just about right. Maybe there’s more to this than we’ve been giving credit.

    Vote -1 Vote +1

    • logan says:

      I think Melvin overestimated at least a little. I am not sure any of this takes into account that pitchers will only bat about 2/3 of the time at most. They are usually replaced by a pinch hitter with the platoon advantage. Yes there is a little hit for pinch hitting but they are still far superior to a pitcher hitting.

      Vote -1 Vote +1

      • AlexPoterack says:

        That is true. Still, though, he’s much closer than I would’ve thought. I’m going to have to re-read this chapter of the Book when I get home and see what their methodology was again.

        Vote -1 Vote +1

  3. Brendan says:

    Two small things:
    1) I’m guessing that either the Dodgers actual value is a run too low or the best is a run too high, because the numbers, as displayed, give a difference of -1.209.

    2) The Phillies difference comes out to -0.319, which would be the worst of the day. I’m not sure if the issue is with the actual value, the best value, or batting Rollins in the leadoff spot & Utley in the third spot.

    Vote -1 Vote +1

  4. poodski says:

    Its impressive how poor some of the AL offenses are, even optimized.

    Imagine if they had to have a pitcher hit for them.

    Vote -1 Vote +1

  5. Scott says:

    What happens to the Cubs lineup when you re-run it with Zambrano’s hitting stats instead of an average pitcher’s?

    Vote -1 Vote +1

  6. Thank You Michael Lewis says:

    Isn’t the lineup optimizer tool flawed because it relies on slugging, which uses inaccurate linear weights for singles, doubles, triples and home runs?

    Vote -1 Vote +1

  7. Rick says:

    While I find this quite interesting, I can’t help but think that’s the absence of baserunning significantly undermines the insight, given its significant role in managers’ decision to orient lineups as they do. Do we have a sense on the scope of the affect that baserunning ability would have?

    That said, I’d love to see debate between an old school manager (say, Dusty Baker) and a sabermetricians on the virtues of lineup construction approaches.

    Vote -1 Vote +1

  8. Sky Kalkman says:

    That Baseball Musings tool is decent, but doesn’t take into account interaction effects. Based on the opinions of others I trust, I’d recommend the the THT Markov tool that came with their annual a couple years ago, or http://lineupsimulator.com/

    Vote -1 Vote +1

    • aldimond says:

      Every time I see that tool used I comment on this. That’s why it needs a “different model” for 1998-2002 to stay close. The Baseball Musings tool works as though it’s the lineup slot itself that’s important and not the specific other hitters in the lineup.

      Vote -1 Vote +1

    • Dave Allen says:


      Thanks for this. I was not aware of the limitations for BM’s tool.

      Vote -1 Vote +1

  9. Patrick says:

    If St. Louis’ line up is one of the worst optimized partially because they have their best hitter (Pujols) hitting third they how is the Twins lineup one of the most optimized with Joe Mauer (their best hitter) hitting 3rd?

    As a Twins fan I have always thought they should just have Joe bat second and move everyone behind him up a spot. However, now with Hudson in the 2nd spot it isn’t nearly as big of a deal as it was with Gomez/Punto/Casilla/etc…

    Vote -1 Vote +1

    • CHris says:

      Because the pitcher batting 9th has much more of a negative effect on a #3 hitter than having a position player or DH batting 9th would.

      Vote -1 Vote +1

  10. ogueth says:

    The Astros might be the worst team in the NL if Berkman were to miss the entire year. Maybe the Pirates will get lucky and Berkman won’t ever recover from his current knee injury.

    Vote -1 Vote +1

  11. Adam D says:

    Texas had the best optimized lineup? Must have been a day-off for Wash on the drugs.

    Vote -1 Vote +1

  12. chuckb says:

    It didn’t help the Cards’ lineup that La Russa also had Brendan Ryan, probably the team’s worst hitting position player, batting in the 2 hole as well. Even putting Ludwick or Holliday in the 2 spot would help Pujols batting behind him since there’s no way that Tony takes Albert out of the 3 hole.

    Vote -1 Vote +1

  13. Sandy Kazmir says:

    Ron Washington must have been up for days to get it that close.

    Vote -1 Vote +1

  14. Guy says:

    Dave: Unfortunately, the Baseball Musing lineup tool doesn’t work. Not even a little. What it does is create a “multiplier” for each lineup slot, based on historical data. But it keeps these multipliers constant, even as it allows you to experiment with non-traditional lineups. So OBP for the 8th place hitter has relatively little value, for example, because it’s often followed by the pitcher. Putting the pitcher there thus appears to be a great move, because the cost is low — but that’s because the model is essentially assuming the #9 hitter is still a pitcher! Which of course is no longer true.

    The model appears to be dynamic, but it’s really static. The #4 hitter’s SLG would still get a lot of weight, even if you put your three lowest OBP guys at the top of the lineup. Really, you just can’t rely on it for any analysis.

    Vote -1 Vote +1

    • Dave Allen says:

      Thanks for bringing this to my attention. I was not aware of the problem.

      Vote -1 Vote +1

    • Bronnt says:

      Good to know how that works-it was confusing that every simulated line-up thought that the pitcher hitting 8th was the best. It makes little sense to put another quality hitter all the way down in the 9th spot because it suppresses their value.

      Vote -1 Vote +1

  15. Tim says:

    Why not include the Sunday night game?

    Vote -1 Vote +1

  16. xeifrank says:

    Without adjusting for speed, park, handedness and a few other things, these numbers are nothing more than entertainment and are nothing to draw a serious conclusion from. It would also be nice to know what the variance is (margin of error) on the lineup tool.
    vr, Xei

    Vote -1 Vote +1

    • MikeS says:

      In addition to that, it’s odd that every single manager is wrong. None of them picked the right lineup, even by luck. It can’t be the model that’s wrong, can it?

      Vote -1 Vote +1

  17. TheUntouchable says:

    “Over 162 games that is 25 runs or 2.5 wins, a surprisingly high number to me.”

    Why even mention something this misleading when you linked the Sky Kalkman article that says it’s worth 2 runs per year?

    Vote -1 Vote +1

  18. Hank says:

    Dave – When you used the tool, did you use platoon splits or overall #’s? (specifically against the handedness of the starter)

    Couple of issues (outside of the ones you’ve already mentioned):
    – perhaps not on opening day, but some managers will consider past history of a batter vs pitcher
    – The type of pitcher (power pitch, good curve, offspeed) vs known good fatsball hitte, curevball hitter etc may also lead to tweaks (this is probably a 2nd or 3rd order effect and probably not something you would see on opening day)

    I don’t understand your conclusion of hitting the pitcher 8th or 9th based on the difference between the Pirates and the rest of the NL. It may just be coincidence that it matches other modeled #’s… perhaps the rest of the Pirates lineup was just set more optimally or they have more similar type (grouped) hitters so you just don’t see much difference from the ‘optimum’.

    Vote -1 Vote +1

    • Hank says:

      Oops – sorry, I see you mentioned you ignored handedness (I saw the speed part, but must have just read right past the handedness) – however this would seem like a pretty big deal especially if you are going to go through this effort to throw support for the tool..

      Also noticed you updated the 8th vs 9th commentary.

      Vote -1 Vote +1

  19. joewein says:

    MLB starting lineups. seems to be a valuable tool.

    Vote -1 Vote +1

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>