The Pastime

baseball thoughts and analysis
The Pastime

Oakland (44-37)
Oakland (44-37)

Countdown to the All-Star Game:
-- - -- - -- - --

SABR

SABR

Get Firefox!

BlogBurst.com

Support Bloggers' Rights!
Support Bloggers' Rights!

Enter your email address:

Delivered by FeedBurner

eXTReMe Tracker

BlogBurst.com

Blogarama - The Blogs Directory

  • Oakland Athletics News

    Powered by sideRSS
  • Catfish Stew

    Powered by sideRSS
  • Beyond the Box Score

    Powered by sideRSS
  • NOTES FROM THE NAT: Vancouver Canadians news

    Powered by sideRSS
  • SFGate: Oakland Athletics : The Drumbeat

    Copyright 2008 Hearst Communications Inc. Powered by sideRSS
  • XML Feed

  • A Minor Consideration

    Powered by sideRSS
  • Catfish Stew

    Powered by sideRSS
  • Big Red Analysis

    Powered by sideRSS
  • Lineup Optimization

    I just finished reading a great article over at Beyond the Boxscore about the differences between how OBP and SLG should be valued based on position in the lineup. So, I tried to run the numbers for the A’s projected lineup.

    I used PECOTA projections from Baseball Prospectus. It was fairly easy to get the numbers to work for me, to a point. While I could create a lineup arbitrarily and see how it would project out, I could not efficiently run an optimization. It’s a fairly straightforward thing to ask of my computer, but there are limits to spreadsheets, as far as I know how to utilize them.

    Here’s the data I have in there:

    The numbers to the left of the names are the coefficents for how much to weight a single point of OBP or SLG. For instance, one point of OBP is three times as important as one point of SLG for the leadoff man.

    The grid to the right of the players is the coeffiecient multiplied by their OBP or SLG.

    All of this data can be used like this:

    Expected Runs per Game = obpC1(OBP1) + obpC2(OBP2) + … obpC9(OBP9) + slgC1(SLG1) + … slgC9(SLG9) + CONSTANT

    That means that you simply take the coefficient times OBP or SLG of a player in a certain lineup spot, and add them all up.

    —–

    Example:

    Mark Ellis batting leadoff, through Jason Kendall in the #9 spot (as I have it listed above)

    Expected Runs per Game = 2.997(.351) + 2.255(.355) + … 2.550(.333) + .931(.426) + … .539(.338) + -5.261

    —–

    At least I think that’s what’s happening there.

    What I need is to be able to run a program where the lineups would be randomly generated and the computer would return a lineup that would be optimized to have the highest Expected Runs per Game. It sounds easy, but I have no idea how to do that in a spreadsheet, and have serious doubts it’s even possible. I’d imagine I could do that with R, a stats program, but R is a bit complex and academic.

    A simulator may also work, like Diamond Mind, but that’s too expensive for me to get into.

    SABR has done some work on this kind of thing, perhaps I should take advantage of my SABR membership and contact the hive mind over there…

    Here are a couple links on lineup construction:

    Cyril Morong, the author of the Beyond the Boxscore article, has delved into this subject before.

    Keith Woolner at Baseball Prospectus looks at a balanced lineup’s possible advantages.

    [UPDATE] Ken Arneson at Catfish Stew has written about what I was trying to accomplish, and has taken the next step of writing a script to generate lineups. Thanks for the great work, Ken.

    [UPDATE] David Pinto at Baseball Musings has created a web form that can generate the best lineups (and the worst ones, too). It’s really pretty slick. Great work by the saint who brought us the day-by-day database.

    4 Responses to “Lineup Optimization”

    1. Ken Arneson Says:

      Ryan, I’m about to post a formula/computer program for this over on Catfish Stew.

    2. The Pastime » Blog Archive » A’s Lineup Analysis Says:

      […] It hardly seems like a year has passed since I first wondered about optimizing lineups after reading an interesting article by Cyril Morong at Beyond the Boxscore on the value of spots in the lineup. […]

    3. Pittsburgh Lumber Co. | MVN - Most Valuable Network » Blog Archive » Jose Bautista: Another Pleasant Pirate Surprise Says:

      […] Here are a few suggestions as to what the Pirates should be doing: […]

    4. coach matt Says:

      How can I use ths for little league where we have 12 batters in the lineup?
      Thanks Matt

    Leave a Reply

    You must be logged in to post a comment.

    All original material is copyright © 2005-2008 Ryan Armbrust 

    The Pastime is powered by WordPress and a modified Fluid Web Theme