Friday, August 5, 2016

Estrada, Wright and the ERA/FIP Gap

One of the stats most often used to describe a pitcher's skill level is Fielding Independent Pitching (FIP), since it is a good predictor of future ERA (a better predictor than current ERA).  FIP only takes into account events that are ostensibly controlled by the pitcher himself-- walks, strikeouts, and home runs.  The theory is that balls in play are largely a function of factors beyond the pitcher's control: defense, ballpark, weather, shifts, etc.  Therefore, FIP attempts to isolate a pitcher's true talent from other variables that have more to do with his teammates, luck, or other circumstances.  When a pitcher manages to have, for example, an ERA of 3.50 but a FIP of 4.50, analysts will often say that he is due for regression and that his ERA will probably rise.  Often this is true (since we know that FIP is a better predictor of ERA), but what if a pitcher can consistently outperform his FIP?  This would suggest that some of a pitcher's skill is not taken into account by FIP-- namely, the ability to mitigate the damage from balls put into play.

In most cases, the gap between ERA and FIP can be explained by a pitcher's BABIP (Batting Average on Balls In Play).  A pitcher with a low BABIP tends to have a lower ERA than FIP and vice versa.  However, BABIP does not tell us whether the pitcher is actually good at limiting the damage of balls in play or if he has a good defense or is just plain lucky.  Therefore, any skill that a pitcher might have in generating weak contact is at least partially obscured by other factors having nothing do do with his own abilities.  Recently, analysts have used stats like hard-hit rate to explain why a pitcher's BABIP is either low or high.  After all, a ball hit at 100 mph is more likely to be a hit than one hit at 80 mph.  This is definitely a move in the right direction, but we can do better.

Now that we have complete hit trajectories (thanks to StatCast), we can quantify exactly how well a pitcher performs based on his batted-ball profile.  As an example, consider a batted ball that is hit right up the middle at a launch angle of 14 degrees and a velocity of 95 miles per hour.  Thankfully, you have Lorenzo Cain in center field and it's an easy out.  However, consider that similar balls in play (batted ball direction between -3 and 3 degrees, launch angle between 12 and 14 degrees, and velocity between 90 and 100 mph) are a hit 61.6% of the time.  Instead of just crediting the pitcher for what actually happened based on his defense, we can assess him on what (on average) should have happened.  Instead of calling it 0 hits or 1 hit, we can call it 0.616 hits!

I wrote a program to analyze every batted ball in the StatCast database since beginning of 2015.  The program takes the batted ball direction (BBD), launch angle (LA), and velocity (V) and determines (based on similar batted balls) how often that ball would be a hit and (on average) how many bases the hit was worth.  In this way, it is possible to generate a pseudo batting average and slugging percentage for every pitcher (or hitter) based on StatCast hit trajectories.  The batting average metric will be called StatCast Batting Average (scBA) and the slugging percentage metric will be called StatCast Slugging (scSLG).  Since it is difficult to visually display the data in 4 dimensions (BBD, LA, V, and batting average), I have broken it up into 2 graphs.  The first plot shows a contour plot of batting average (scBA) for combinations of velocity and launch angle:


The second plot is a contour plot of batting average (scBA) for combinations of launch angle and batted ball direction (-45 degrees is the left field line and 45 degrees is the right field line):


These plots are somewhat different from other "ball in play" data such as BABIP for a few reasons.  BABIP considers all balls in play (in fair territory and foul territory) except home runs.  Conversely, I have decided to include home runs and only balls hit in fair territory (since foul balls can only become outs and not hits).  This means that the league-wide average for scBA is not ~0.300 like BABIP, but rather about 0.354 over the last 2 years.  The average for StatCast slugging percentage (scSLG) is 0.576

For pitchers with at least 200 IP (106 total pitchers) since the beginning of 2015, here are the StatCast Batting Average Leaders:


As one might expect, there are a lot of elite starting pitchers on this list:  Kershaw, Arrieta, Harvey, Syndergaard, Greinke, Scherzer, and Verlander.  However, there are also some names that may surprise some people, including Marco Estrada and Steven Wright, two pitchers that often get mentioned as regression candidates.  After all, they are both on the list of pitchers who have outperformed their FIP by at least 0.50 runs since the beginning of last year:


Out of the 10 pitchers who outperformed their FIP the most, 5 of them are in the top 15 in the league in scBA, including the top 2 (Estrada and Wright).  This suggests that these pitchers have some skill in limiting hard contact and may not regress at all and certainly not as much as their underlying numbers would have you believe.  Contrast that with a guy like Ian Kennedy, who ranks 102 out of 106 pitchers in scBA, yet has managed to outperform his FIP by 0.53.  He is almost certainly getting lucky since his scBA is 21 points higher than the league average and his scSLG is 107 points higher than the league average!

Armed with this new information from StatCast, it is now possible to evaluate pitchers based on their batted ball profiles.  Instead of seeing a low BABIP and immediately assuming that it's entirely luck or defense, we can finally see if there is some skill involved.  Perhaps the next wave of sabermetric stats will include StatCast data to determine a pitcher's value.  Maybe there is a more refined version of FIP (which FanGraphs uses for pitcher WAR) that includes a pitcher's batted-ball skill.  After all, do we think that Michael Pineda (5.5 WAR on FanGraphs since 2015) is actually more valuable than Marco Estrada (4.5 WAR)?

Wednesday, June 15, 2016

Odubel Herrera's Sudden Plate Discipline

Yesterday on the Fantasy Focus Baseball Podcast, Eric wondered whether any player has ever tripled his walk rate in consecutive (qualified) seasons.  This question was inspired by Odubel Herrera's astounding improvement in plate discipline this year.  He has increased his walk rate from 5.21% in 2015 to 14.55% in 2016 (a raw increase of 9.35%, or 2.79 times last year's rate).  I did some research using all qualified seasons since 1980 to find walk rate improvements.

In terms of raw increase in consecutive years, here are the leaders:

Rank Player Year 1 Year 2 Y1 BB% Y2 BB% Increase Multiplier
1 Barry Bonds 2003 2004 26.91% 37.60% 10.69% 1.40
2 Odubel Herrera 2015 2016 5.21% 14.55% 9.34% 2.79
3 Mark McGwire 1997 1998 15.37% 23.79% 8.42% 1.55
4 Paul O'Neill 1993 1994 8.04% 16.25% 8.21% 2.02
5 Danny Tartabull 1991 1992 11.67% 19.58% 7.91% 1.68
6 Brian Giles 2001 2002 13.35% 20.96% 7.61% 1.57
7 Barry Bonds 2000 2001 19.28% 26.66% 7.38% 1.38
8 Von Hayes 1986 1987 10.72% 17.77% 7.04% 1.66
9 Gary Matthews 1980 1981 6.79% 13.79% 7.00% 2.03
10 Eric Chavez 2003 2004 9.48% 16.46% 6.98% 1.74

In terms of percentage increase (multiplier from year 1 to year 2), here are the leaders:

Rank Player Year 1 Year 2 Y1 BB% Y2 BB% Increase Multiplier
1 Brian Hunter 1996 1997 3.07% 8.94% 5.87% 2.91
2 Alex Gonzalez 1999 2000 2.54% 7.28% 4.74% 2.87
3 Odubel Herrera 2015 2016 5.21% 14.55% 9.34% 2.79
4 Carlos Baerga 1994 1995 2.13% 5.83% 3.70% 2.74
5 Carlos Lee 1999 2000 2.51% 6.14% 3.63% 2.45
6 Ben Revere 2014 2015 2.08% 5.05% 2.97% 2.43
7 Adam Kennedy 2002 2003 3.73% 8.82% 5.09% 2.36
8 Ichiro Suzuki 2001 2002 4.07% 9.34% 5.28% 2.30
9 Alexei Ramirez 2008 2009 3.54% 8.09% 4.55% 2.29
10 Ozzie Guillen 1996 1997 1.89% 4.17% 2.28% 2.20
Hererra ranks 2nd in overall increase in walk rate (thanks to Barry Bonds, king of the intentional walk) and 3rd in percentage increase.  No player has tripled his walk rate in consecutive qualified seasons (since 1980), but the closest was Brian Hunter, who increased his rate from 3.07% in 1996 to 8.94% in 1997, a multiplier of 2.91.

Tuesday, May 17, 2016

NBA Draft Lottery Proposal, Part 1

One of the biggest problems in the NBA is tanking.  While most analysts agree that teams do not necessarily try to lose specific games by missing shots or intentionally turning the ball over, it is evident that not all rosters are constructed to maximize winning percentage in the current season.  The incentive, of course, is to land a high lottery pick in the NBA draft and possibly turn around the fortunes of a team.  While not all lottery picks turn out to be huge assets (see Milicic, Darko), the majority of NBA All-Stars were once taken in the lottery.  In fact, many of the league's transcendent superstars (LeBron, Duncan, Durant, Howard, Rose, Davis) were taken either 1st or 2nd overall.  The draft is typically so top-heavy in the NBA that lottery picks are seen as huge assets while 2nd round picks are just trade throw-ins.  Since a team's odds of winning the lottery increases exponentially with each move downward in the standings, it is logical that some teams (presumably those with little or no shot to make the playoffs) would instead focus on securing the top draft pick.

Currently, the NBA uses a lottery system in which 1000 different number combinations are distributed among the 14 teams that did not make the playoffs.  The team with the worst record owns 250 of the 1000 combinations, and therefore has a 25.0% chance of getting the first pick.  The second worst team gets 199 combinations (19.9%), the third worst team gets 156 combinations (15.6%), and so on, down to the 14th team (which owns only 5 combinations).  At the lottery, a set of 4 ping pong balls is drawn to represent one of the 1000 combinations.  This system, however, is only used to select the top 3 teams in the draft.  After the third pick, the remaining teams chose in the order of worst record to best record, meaning that a team can only move down in the draft by at most 3 spots based on record.

Why doesn't this system work?  Obviously, the franchise-altering stars are rare commodities that every team would covet.  However, being a mediocre team almost guarantees that you will never be able to draft one.  Since 1984 (when the playoffs expanded to 16 teams), only 2 teams lower than a 4th seed have even made it to the NBA Finals (1999 Knicks and 1995 Rockets).  So if lower seeds have a minimal chance of winning a title, what incentive do they have?  Well, simply making the playoffs is good for revenue in the short term, but it doesn't necessarily allow your team to get better.  This is especially true for smaller market teams that have trouble luring free agents to sign with them.  In order to acquire an NBA star through the draft you almost certainly need to be in the lottery.  However, being one of the best teams in the lottery (record-wise) is also no guarantee.  The probabilities are weighted heavily toward the very worst teams such that teams 10 through 14 in the lottery only have a combined 3.7% chance of winning.  In fact, one of the three worst teams should win the lottery 60.5% of the time.  So if you need superstars in the NBA and the easiest way to find one is through the draft (and picking very high in the draft), then it makes sense that teams would employ a strategy of tanking.

What if I told you that there a a relatively easy way to curb the tanking problem with only minor modifications to the current system?  All we have to do is juggle some ping-pong balls and re-assign the probability that each team wins the lottery.  Check out the chart below that shows the current system (red bars) and the proposed one (blue bars): 

Probability of winning lottery based on place in standings for NBA (red) and proposed plan (blue)

As you might notice, there are 3 major changes.
  1. Every team has a chance of winning (including playoff teams).  Playoff teams each have a 1% chance of winning the lottery.
  2. Losing helps you... unless you finish in last.  The team with the worst record has a 3.6% chance of winning the lottery, which ranks as the 9th best probability.  Finishing with the 2nd worst record gives you a 14.4% chance of winning.
  3. Only the teams with the 4 worst records have reduced odds compared to the current NBA system.  Since the distribution is flatter, a lot of the probability that the 4 worst teams would normally receive gets re-distributed to better teams.
Why will this plan work?  First of all, it would definitely reduce the level of tanking in the NBA.  The problem with tanking is that teams construct a roster that is designed to lose games.  Do you want to play with fire?  If your team is worse than every other team, you will severely diminish your lottery odds.  Therefore, if you know you are the worst team, you have the incentive to get better, not worse.  This leads to a cascade effect.  If the worst team starts winning more, it puts pressure on all of the other "bad" teams to avoid the same penalty.  In fact, due to the uncertainty of your own team's true talent level and especially other teams' talent levels, you cannot simply employ a tanking strategy and guarantee that it will actually improve your odds.  Why did I chose the 14.4% and 3.6% for the last 2 teams?  I did several simulations of NBA seasons using these values and found that this ratio (14.4 to 3.6, which is equivalent to 4 to 1) was necessary to prevent any of the bad teams from employing a "losing" strategy.  The second reason this proposal would work is that it still contains many of the same features as the current system.  It still rewards teams that do poorly to establish parity in the league.  It still gives teams a chance to win that do not finish last.  In fact, since 26 of the 30 teams actually see improved chances under the new system, it should be easy to convince owners that it is beneficial.

In Part 2, I will discuss my simulations and possible extensions of this proposal.