Showing posts with label giants. Show all posts
Showing posts with label giants. Show all posts

Monday, August 13, 2012

Checking in on the Giants' lineup

Earlier a wrote a few posts on what the SF Giants' optimal starting lineup should be using Basim, a baseball simulator I wrote.  A lot has changed since then, though--Posey has become much better, Blanco and Pagan have cooled off, and Hunter Pence and Marco Scutaro have joined the club.  So, what should the Giants' lineup look like now?  What lineup do I hope they start tonight?

First off, here was my guess at their best lineup (once again assumin Zito is the pitcher):

1.  Buster Posey
2.  Brandon Belt
3. Melky Cabrera
4. Pablo Sandoval
5. Hunter Pence
6. Marco Scutaro
7. Angel Pagan
8. Brandon Crawford
9. Barry Zito

Running this lineup through the simulator*, it scored an average of 4.03 runs per game.

I then found that a random lineup (i.e. random ordering of the nine players) scored about 3.89 runs per game.  The lineups that the simulator liked the best generally had Posey, Belt, Cabrera, or Pence batting leadoff, which is unsurprising--each has either a high OBP or a high ground into double play rate that would be very painful in the heart of the order.  The single lineup that the simulator liked best** was the following:

1. Buster Posey
2. Angel Pagan
3. Hunter Pence
4. Brandon Belt
5. Melky Cabrera
6. Marco Scutaro
7. Pablo Sandoval
8. Brandon Crawford
9. Barry Zito

It scored an average of about 4.035 runs per game***.


I then looked at two lineups that were close to what I predict the Giants will run; they differ only in whether the Giants play Theriot or Crawford; the lineup Pagan, Scutaro, Cabrera, Posey Sandoval, Pence, Belt Theriot, Zito scored an average of 3.96 runs per game, while the same lineup but with Crawford batting for Theriot scored 4.00 runs per game on average.  So, it seems like about half the difference between my lineup and the one with Theriot just comes fromt the fact that Craword is better than Theriot.

Anyway, here's to hoping the Giants will do something smart.

_________________________________________________________________________________
*: For Pence and Scutaro I used their pre-Giants numbers.

**: This should be taken with a grain of salt--to actually find the best would take days of simulation; treat this as a lineup that is pretty close to the best.

***: FWIW, the ten best starting lineups, according to the simulatr (with the same caveat as **), in the form (lineup, average runs scored by lineup per game): [(['Buster Posey', 'Melky Cabrera', 'Brandon Belt', 'Marco Scutaro', 'Hunter Pence', 'Pablo Sandoval', 'Angel Pagan', 'Brandon Crawford', 'Barry Zito'], 4.0152400000000004), (['Brandon Belt', 'Buster Posey', 'Pablo Sandoval', 'Melky Cabrera', 'Hunter Pence', 'Angel Pagan', 'Brandon Crawford', 'Barry Zito', 'Marco Scutaro'], 4.0168675), (['Melky Cabrera', 'Buster Posey', 'Brandon Belt', 'Marco Scutaro', 'Pablo Sandoval', 'Brandon Crawford', 'Angel Pagan', 'Hunter Pence', 'Barry Zito'], 4.0179150000000003), (['Brandon Belt', 'Buster Posey', 'Pablo Sandoval', 'Melky Cabrera', 'Hunter Pence', 'Brandon Crawford', 'Angel Pagan', 'Marco Scutaro', 'Barry Zito'], 4.0218325000000004), (['Melky Cabrera', 'Brandon Belt', 'Marco Scutaro', 'Pablo Sandoval', 'Angel Pagan', 'Hunter Pence', 'Buster Posey', 'Brandon Crawford', 'Barry Zito'], 4.0219899999999997), (['Hunter Pence', 'Marco Scutaro', 'Buster Posey', 'Pablo Sandoval', 'Brandon Belt', 'Melky Cabrera', 'Angel Pagan', 'Brandon Crawford', 'Barry Zito'], 4.0253224999999997), (['Brandon Belt', 'Hunter Pence', 'Pablo Sandoval', 'Angel Pagan', 'Melky Cabrera', 'Brandon Crawford', 'Marco Scutaro', 'Buster Posey', 'Barry Zito'], 4.0315525000000001), (['Hunter Pence', 'Angel Pagan', 'Brandon Belt', 'Melky Cabrera', 'Buster Posey', 'Pablo Sandoval', 'Marco Scutaro', 'Brandon Crawford', 'Barry Zito'], 4.0322525000000002), (['Marco Scutaro', 'Pablo Sandoval', 'Brandon Belt', 'Melky Cabrera', 'Buster Posey', 'Hunter Pence', 'Brandon Crawford', 'Angel Pagan', 'Barry Zito'], 4.0353874999999997), (['Buster Posey', 'Angel Pagan', 'Hunter Pence', 'Brandon Belt', 'Melky Cabrera', 'Marco Scutaro', 'Pablo Sandoval', 'Brandon Crawford', 'Barry Zito'], 4.0365225000000002)]

Monday, July 16, 2012

Some calculations about Tim Lincecum

Tim Lincecum is a starting pitcher for the San Francisco Giants.  For the first five years  of his career he was one of the best pitchers in the majors, with a cumulative ERA of 2.98.  This year, however, he has been atrocious, with an ERA currently at 5.93.  I decided to take a look at pitch-by-pitch data to see if I could make anything of it.

I noticed that he had an unusually large difference between home and away ERA--3.43 at home, but 9.00 on the  road.  Coupled with the source of home field advantage, I decided to investigate something: could his difference in play this year come from umpires restricting his strike zone?

As it turns out, no.  In both 2011 and 2012 about 10% of his pitches that batters didn't swing at were balls miss-classified as strikes by the umpires, and about 2.5% were strikes that were called balls; umpires were no harsher this year than last.

I then took a look at placement.  In particular, all else equal better pitches are generally around the edge of the strikezone, and worse pitches are generally either right down the middle or way outside the strikezone.  So, I decided to look at the average distance from his pitches to the vertical and horizontal edges of the strikezone; this time there was a difference.  In 2011 the sum of the vertical and horizontal misses from the edges of the strikezone averaged .923 feet; in 2012 it averaged .961 feet.  It doesn't seem like a huge difference, but it is statistically significant, with just a 2% chance of occurring randomly (having a t-test value of -3.23).  So, it does seem like his control is down from last year.

I also looked at the velocity of his pitches.  There's been a lot of talk about his velocity decline; the decline, as it turns out, is real but not that precipitous: his fastballs and sliders have slowed down by about a mile per hour on average, though his changeup and curveball are still at roughly the same speeds there were in 2011.

So Lincecum's pitches are slower and less controlled than last year; in the end it just looks like Lincecum is pitching worse this season.

Is there anything else I should look at?

Wednesday, July 4, 2012

More Giants Lineup comments

For the previous post in this series, click here.

First of all, I found a bug in the stealing bases section of my lineup code.  I've re-run the simulations; new findings:

1) A random lineup of the giants players scores, on average, 4.06 runs/game.
2) The current Giants lineup scores, on average, 4.13 runs/game
3) The top lineup this time was: Buster Posey, Brandon Belt, Melkey Cabrera, Pablo Sandoval, Gregor Blanco, Angel Pagan, Brandon Crawford, Ryan Theriot, Barry Zito, scoring 4.29 runs/game on average.
4) The old best lineup (with the buggy code) scored 4.22 runs/game on average.

So, it still looks like the Giants could get another ~.16 runs/game out of their lineup, translating to ~2.56 more wins in a season.

Also, I decided to see what effect stealing bases had on the runs scored by a lineup; the answer, essentially, was none: without allowing stolen bases a random lineup scored ~4.05 runs/game, just .01 less than with stolen bases.  So it looks like stealing bases is close to a wash (note that the Giants have pretty good base stealers this year in Blanco, Pagan, and Cabrera).

It occurs to me, though, that by using a half season of one team I have some sample size issues.  There are also some oddities surroundings pitchers (i.e. the high frequency of bunts, which my program only half accounts for).  So, I'll next look at many different AL teams.

FWIW, here were the ten best lineups, along with their average runs scored: [([Brandon Belt, Angel Pagan, Gregor Blanco, Pablo Sandoval, Buster Posey, Melkey Cabrera, Brandon Crawford, Barry Zito, Ryan Theriot], 4.2150850000000002), ([Gregor Blanco, Melkey Cabrera, Pablo Sandoval, Brandon Belt, Angel Pagan, Brandon Crawford, Buster Posey, Ryan Theriot, Barry Zito], 4.2343450000000002), ([Gregor Blanco, Brandon Belt, Angel Pagan, Pablo Sandoval, Melkey Cabrera, Buster Posey, Ryan Theriot, Barry Zito, Brandon Crawford], 4.2404599999999997), ([Angel Pagan, Gregor Blanco, Brandon Belt, Pablo Sandoval, Melkey Cabrera, Brandon Crawford, Ryan Theriot, Buster Posey, Barry Zito], 4.2502000000000004), ([Gregor Blanco, Brandon Belt, Angel Pagan, Melkey Cabrera, Pablo Sandoval, Brandon Crawford, Ryan Theriot, Barry Zito, Buster Posey], 4.2520499999999997), ([Brandon Belt, Gregor Blanco, Angel Pagan, Melkey Cabrera, Pablo Sandoval, Ryan Theriot, Barry Zito, Brandon Crawford, Buster Posey], 4.2529050000000002), ([Gregor Blanco, Pablo Sandoval, Brandon Belt, Melkey Cabrera, Angel Pagan, Buster Posey, Brandon Crawford, Ryan Theriot, Barry Zito], 4.2606700000000002), ([Buster Posey, Gregor Blanco, Brandon Belt, Pablo Sandoval, Melkey Cabrera, Angel Pagan, Ryan Theriot, Brandon Crawford, Barry Zito], 4.2787699999999997), ([Buster Posey, Brandon Belt, Gregor Blanco, Pablo Sandoval, Melkey Cabrera, Angel Pagan, Ryan Theriot, Brandon Crawford, Barry Zito], 4.2844249999999997), ([Buster Posey, Brandon Belt, Melkey Cabrera, Pablo Sandoval, Gregor Blanco, Angel Pagan, Brandon Crawford, Ryan Theriot, Barry Zito], 4.2864449999999996)].  Why are these lineups the best?  I'm not completely sure.  Thoughts?

Contributors