“Sports are not played on a spreadsheet” is one of the commonly used phrases among both current and former players to describe the “recent” analytics renaissance throughout the sports world. I say “recent” using quotes because in the game of baseball, the trend has been front-and-center for a while. Made famous by Moneyball, analytics have been a part of baseball for much longer than the common fan realizes. 

There are several reasons why but the most salient among them is that baseball is a statisticians dream. Every individual pitch is a data point from which hundreds of little observations can be derived. Historically, this meant simple points like velocity, pitch type, strike, ball, swing, whiff, hit, foul, etc. Now, with the creation of pitch tracking tools like PITCHf/x and the more recent Statcast, we have even more incredible information to work with: refined pitch location, unified velocity readings. spin rate, extension, movement, and more, before we even look at outcomes if a hitter swings. 

This creates a wealth of data for statisticians to work with and mold, helping to create a much better understanding of a game that we truly love. Over the years these data have been developed into several different metrics that we now view as commonplace. While casual followers may understand them all, different metrics like wOBA and ERA estimators like FIP have become commonly cited among fans. The fantasy world especially has become infatuated with many of these statistical advances and use them to identify breakout performers. 

I have long been fascinated at the concept of plate discipline, which is broadly defined but overall it is generally used to discuss swinging at pitches within the zone and taking pitches outside of it. Among my many goals this off-season, I wanted to dive deeper into this concept and see if I could develop new metrics around this idea. One of my favorite parts of statistics is that sometimes you end up stumbling upon a completely different concept. While I was eventually able to develop a hitter-specific plate discipline metric, as the analysis progressed, I realized that what I had created was a powerful new ERA estimator.

 

Mathematical Aside 

 

One of the common themes of this article and others similar is that they rely heavily on some statistics and mathematics concepts. These concepts, while fascinating to me, are not the most interesting for the reader. As a result, I will not go too in-depth into them outside of this section. So feel free to skip over it if you are not interested.

The first major modeling function that I use to build the analysis for this piece is a GAM or a generalized additive model. This is a form of modeling that uses a series of unknown smoothing functions to help to predict a result. This type of model is extremely helpful for developing predictions for non-linear data. For this analysis, I used it to develop heat maps of expected results. I will go into this idea a bit deeper in the different sub-sections but overall, for each pitch, I used pitch location to develop an expected result for a variety of different metrics. So what is the probability a hitter swings if a given pitch is right down the middle? If you are interested in the concept of GAMs feel free to reach out and I’ll try to help as best I can. 

The second concept is a random-effects model. One of the beauties of baseball is that at all times it randomizes a sample for you. Each hitter and pitcher do not only face each other and do not always face one another in the same park. This makes a random-effects model extremely powerful. The simplest way of describing this is that random effects models can help to “account” for things like batter or hitter. For example, it does not treat all whiffs as equal. A whiff of a hitter like Joey Gallo will not be “worth” as much as one to David Fletcher; likewise, whiffing against Gerrit Cole is not the same as whiffing against Jordan Zimmerman.

 

Expected Swings

 

As stated in the introduction, the idea that spawned this analysis was originally intended to become a plate discipline metric. The interest in the concept arose from my off-season research into Cavan Biggio. He is one of the more passive hitters in all of baseball and has incredibly high walk rates to go with it. His passivity also resulted in a high K-rate. I was more curious to see how his swing take decisions compared to average hitters. Surprisingly, in doing this I realized I was learning more about pitchers and what makes them successful than I learned about hitters.

I decided that the best way to do this was to develop an expected swing rate for every pitch thrown. The first step was determining the factors that go into a swing decision, completely absent of the hitter and pitcher involved. I initially had a number of different concepts but after several variations, I was able to whittle the list down to three simple concepts:

  • Pitch Location
  • Pitch Grouping
  • Count

Overall, the location aspect is fairly straightforward, a pitch down the middle is more likely to generate a swing than a pitch in the dirt. This was obviously the most impactful aspect of the decision. The Pitch Groupings were Fastball, Breaking, and Offspeed. The key here is that while the location is the biggest driver, a fastball and a curve in the same location can have completely different expectations. The count is also a large driver of the decision to swing. A pitch on the corner in an 0-0 count versus the same pitch in an 0-2 will have a much different expected swing rates. Check out the charts below for fastballs in 0-0 and 0-2 counts. These charts were generated by plotting the results of the GAMs I fitted. You can read more about GAMs in the Mathematical Aside section if you skipped it.

 

 

As you can see, the red and yellow portions (high expected swing rates) are much larger for the 0-2 count than they are for the first pitch of an at-bat.

However, not all swings are created equal. One of the main tenets of plate discipline analysis is that swings within the zone are good for hitters and swings outside the zone are bad. Due to this concept, I decided to divide the pitches into two groups, In-Zone and Out-Of-Zone, based on the different locations that Baseball Savant provides. Below are the starters (minimum 1500 pitches) in 2019 with the lowest expected In-Zone Swing Rate.

 

Top Starters Expected In Zone Swings
2019 Season Min 1500 Pitches
Pitcher In Zone Expected Swing Rate In Zone Swing Rate
Jordan Zimmermann 62.0% 65.8%
Patrick Corbin 62.3% 64.8%
Jon Gray 63.2% 65.5%
Dallas Keuchel 63.5% 64.5%
Kyle Freeland 63.5% 68.2%
Clayton Kershaw 63.5% 68.2%
Yusei Kikuchi 63.5% 66.7%
Zach Eflin 63.6% 66.3%
Zack Godley 63.7% 65.3%
Adam Wainwright 63.7% 60.0%

 

Unsurprisingly, the pitchers on this list are guys you would consider to be “command” types. These pitchers, with some exceptions, do not possess incredible stuff and need to nibble more than the average pitcher. Living near the middle of the zone will hurt them. As you can see, for the majority of these pitchers, their actual in-zone swing rates are much higher than the expectation.

This led me to the second step of my analysis determining influence. I simply could have determined “influence” by subtracting the actual from the expected but thanks to random-effects models, there is a much better way. Overall, the model can strip out the impact of the individual hitter or pitcher on the swing decision, as detailed in the Mathematical Aside section. Simply put, getting a swing on a pitch out of the zone with Javy Baez at the plate is much different than getting a swing at the same pitch with Joey Votto at the plate. Here are the leaders in this influence metric for In Zone Swings. Again here a lower number is better.

 

Top Starters In Zone Swings Influence
2019 Season Min 1500 Pitches
Pitcher In Zone Swing Influence
Aaron Nola −7.8%
Chris Sale −7.0%
Adam Wainwright −5.0%
Sonny Gray −4.9%
Stephen Strasburg −4.5%
Jake Arrieta −4.4%
Trevor Bauer −4.0%
Chris Bassitt −3.9%
Kyle Hendricks −3.6%
Charlie Morton −3.6%

 

The best way to interpret this is to say that after accounting for hitters, Aaron Nola generated swings on pitches within the zone at a rate of 8% lower than expected. For me, this is a really interesting grouping of pitchers. Guys like Strasburg and Sale who are considered to have “elite stuff” are near the leaders but so is a deception-based guy like Hendricks. In my opinion, these two charts highlight the two aspects of pitching – Command, and Stuff. Pitching to locations that are “better” for you is a measurement of Command and the ability to generate those same advantageous results is a measurement of a given pitcher’s Stuff or deception.

Then we can take the same concepts and run the analysis on pitches outside of the zone. Unlike the In Zone numbers, higher is better here. That means a pitcher is getting players to chase at a rate better than expected. Below are the top ten starters (minimum 1500 pitches) by expected swings.

 

Top Starters Expected Out Of Zone Swings
2019 Season Min 1500 Pitches
Pitcher Out Of Zone Expected Swing Rate Out Of Zone Swing Rate
Chris Paddack 40.4% 38.5%
Michael Pineda 38.0% 33.5%
Kyle Hendricks 37.6% 37.4%
Kevin Gausman 37.1% 42.7%
Homer Bailey 36.9% 33.6%
Masahiro Tanaka 36.3% 32.5%
Mike Leake 36.2% 29.2%
Tyler Mahle 36.0% 29.1%
Trevor Richards 36.0% 35.5%
Luis Castillo 35.8% 33.0%

 

There are a few really interesting names on this list. Kyle Hendricks appears again and it demonstrates part of what makes him elite. He is able to remain so close to the zone that he can not only generate a high number of called strikes, he can also coax hitters to chase the pitches just out of the zone. Young budding ace Chris Paddack may have mastered the still on locating just outside the zone and it is one of many reasons he is an ace in the making. Outside of Kevin Gausman, who has never been able to deliver on his immense potential, all of these arms generate swings at a lower clip than expected. Here are the ten leaders in Influence Out Of Zone from 2019.

 

Top Starters Out Of Zone Swings Influence
2019 Season Min 1500 Pitches
Pitcher Out Of Zone Swing Influence
Kevin Gausman 6.3%
Jake Arrieta 5.8%
Mike Soroka 5.0%
Clayton Kershaw 5.0%
Zack Wheeler 4.7%
Jose Berrios 4.7%
Sandy Alcantara 4.4%
Ivan Nova 4.3%
Rick Porcello 4.2%
Stephen Strasburg 4.1%

 

Unsurprisingly, Gausman finds himself topping this list as he is able to generate out of zone swings at a rate of almost 6% more than expected. This could be due to the fact that he spent time in the bullpen and threw a heavy amount of splitters, which is without a doubt his best pitch. He was a fairly dominant bullpen arm but it remains to be seen if his return to the starting rotation will be better this time around.

Looking at the two lists, the pitchers who are able to influence the actions of hitters within the zone seem to be more successful pitchers. As expected, the influence on swings within the zone (IZ) has a slightly stronger correlation with ERA than out of zone influence (OOZ). The difference is not massive but being able to generate takes within the zone seems to be a really valuable skill; nonetheless, as we will see, while both of these skills are important, there are two other skills that can really help identify elite pitchers.

 

Expected Whiffs and wOBA

 

Knowing whether a given hitter will swing at a pitch is incredibly valuable; however, the most important thing in baseball is what happens when the swing occurs. All swings have one of three results: Whiff, Foul Ball, or Ball in Play. For our purposes, we will not focus on foul balls as these have been proven not to provide much value at all. Using the same basic functionality and process I discussed in the previous section, we can model whiff expectations. Again, using pitch type, count, and location I was able to generate plots for expected Whiff Rate for every pitch in baseball since 2015. Here are the two charts for Fastballs and Breaking Balls in 0-2 counts.

 

 

As you can see, Fastballs must be located up in the zone to generate whiffs in 0-2 counts but Breaking Balls generate the majority of their Whiffs when located below the zone. Like we did for the two concepts above, we can determine the pitchers who dotted high-whiff locations most often.

 

Top Starters xWhiff
2019 Season Min 1500 Pitches
Pitcher xWhiff Whiff
Brad Keller 11.2% 8.1%
Mike Soroka 10.1% 10.5%
Dakota Hudson 10.3% 9.9%
Jack Flaherty 11.9% 13.6%
Brett Anderson 9.7% 7.7%
Sonny Gray 11.7% 11.2%
Mike Fiers 11.1% 7.8%
Jeff Samardzija 9.3% 8.9%
Zack Greinke 12.5% 10.5%
Sandy Alcantara 10.4% 10.4%

 

In my opinion, the 2019 leaderboard contains some really interesting names. Included in the list are pitch-to-contact types Tommy Milone and Jordan Zimmermann, but the list also includes aces Blake Snell and Justin Verlander. The top spot belonging to Tanaka is not surprising as he throws more non-fastballs than almost any other pitcher. Gibson and Pineda are tantalizing but frustrating arms who have yet to reach their potential and as we have seen thus far in 2020, Shane Bieber is an ace in the making. Now, when we look at the leaders in influencing whiffs, we see that this analysis truly has value.

 

Top Starters Whiff Influence
2019 Season Min 1500 Pitches
Pitcher Whiff Influence
Max Scherzer 4.1%
Gerrit Cole 4.1%
Yu Darvish 3.7%
Lance Lynn 3.6%
James Paxton 3.4%
Blake Snell 3.2%
Luis Castillo 3.0%
Kevin Gausman 3.0%
Jacob deGrom 2.9%
Lucas Giolito 2.8%

 

This list contains nine of the best pitchers in all of baseball and Kevin Gausman. There are multiple former Cy Young Award winners including both 2019 winners. Gausman’s inclusion on this list helps to explain my infatuation with him as he was one of my most heavily drafted players in 2020. What I found interesting here is that for starting pitchers, their influence on whiff rate only seems to be contained to at or below 4%. As one would expect after seeing this list of names, this metric correlates with ERA at a much higher rate than either of the swing based metrics.

The other result of a swing that we care about is a ball in play. There are a number of ways to quantify the value of a given ball in play but what I decided is to look at wOBA. wOBA is the best measure we currently apply for the value of a given hit. A single is not worth as much as a home run and wOBA helps us to determine a given hitter’s overall value offensively. If you are not familiar with the idea of wOBA, check out this primer on Fangraphs.

Modeling wOBA in the same way as the other two events requires a bit of reworking. Swings and Whiffs are binary results, meaning that their only values are 1 (swing) or 0 (no swing). wOBA can take on a number of different values and is better described as a continuous event. For the purposes of understanding, there is nothing majorly different about the outputs but it is important to understand that there are some minor differences in the way I calculate the expectation here. Additionally, the sample is slightly different as it only considers balls-in-play as opposed to all pitches like the other models do. Finally, some of the count/pitch type combinations did not have enough data to generate meaningful expectations, for example, 3-0 breaking balls.

 

 

Like we did with the other metrics, let’s take a look at the ten pitchers with the lowest expected wOBA in 2019. One of the things that I found most interesting about this group is that unlike the others, there is no real consistent trend in pitcher type. Snell, Bieber, and Castillo are considered among the game’s second tier of aces but the remaining eight names are a mix of soft-tossers and pitchers who we are looking to truly take that step forward. 

 

Top Starters Expected wOBA
2019 Season Min 1500 Pitches
Pitcher Expected Woba
Kyle Gibson 0.3183
Luis Castillo 0.3214
Zack Godley 0.3221
Kenta Maeda 0.3248
Jason Vargas 0.3251
Blake Snell 0.3254
Zach Davies 0.3255
Griffin Canning 0.3262
Kevin Gausman 0.3264
Shane Bieber 0.3267

 

Like the other metrics I have discussed, we can determine the influence of the pitcher using a random-effects model. Here are the ten best pitchers from 2019 in terms of wOBA influence.

 

Top Starters wOBA Influence
2019 Season Min 1500 Pitches
Pitcher wOBA Influence
Brad Keller -0.026
Mike Soroka -0.026
Dakota Hudson -0.025
Jack Flaherty -0.024
Brett Anderson -0.024
Sonny Gray -0.023
Mike Fiers -0.023
Jeff Samardzija -0.023
Zack Greinke -0.019
Sandy Alcantara -0.018

 

With a few exceptions, this is a list of pitchers who are considered to be elite contact managers. Many of these names are soft-tossers who get by with deception and by limiting hard contact. Of all of the influence metrics I have discussed, influence on wOBA is the one with the greatest correlation with ERA in season. Unfortunately, like almost everything else we know about contact management as a “skill” it has the weakest year over year correlation. As we will discuss more in the next section these four different concepts/models are the keys to my ERA Estimator, Stuff-ERA.

 

Stuff-ERA: An ERA Estimator

 

I can spend a ton of time going into the specifics surrounding ERA estimators and the hundreds of different versions of them that exist. Thankfully for me, Alex Chamberlain of Fangraphs has done just that. In this three-part series (part three here), he discusses the past, present and future of different ERA estimators. He also discusses the different goals of ERA estimation models. The main idea is that there are two goals of an ERA estimator. The first is to describe what happened. This essentially means trying to derive an ERA a given pitcher deserved based on what happened. The second is to be predictive and is meant to be more of a determination of pitcher skill. Since Alex covered it so incredibly I will not dive too deeply into this idea. 

However, I wanted to see if there was a way to combine all of the different sub-models I described here and turn it into an ERA estimator. As I previously described, I view the expected results as forms of command grading. To this point, I generated a Z-Score based Command metric. The idea of Z-Score is to centralize all results based on mean and standard deviation. For each of the four metrics, I found the Z-Score of the given pitcher’s expected results with a Z-Score that is positive, meaning that the pitcher had a better-expected result, so higher whiffs, lower wOBA. A negative Z-Score means worse than average expected results. Here are the Command leaders from 2019.

 

Top Starters Command
2019 Season Min 1500 Pitches
Pitcher Command
Kyle Gibson 7.011154
Masahiro Tanaka 6.945735
Shane Bieber 5.338693
Tommy Milone 5.273593
Luis Castillo 5.213926
Kenta Maeda 5.036515
Griffin Canning 4.731782
Zack Greinke 4.691243
Stephen Strasburg 4.395900
Blake Snell 4.197259

 

One of the cool things about this metric is it seems to jibe with our ideas of pitchers with great command. While not all of these pitchers own minuscule walk rates, pitchers like Bieber and Greinke are typically among the league leaders. As I expected, Command does not correlate as strongly with ERA as the various other influence-based metrics. Great command does not always lead to great results, which is obvious when looking over this list.

 

ERA Estimator Fantasy Baseball

 

Command was determined to be one of the inputs for my ERA estimator and the other four Influence metrics are the other items I added into the model. I also used a variable to account for the season as there are different run environments in each season. 2019 and 2015 were completely different environments for run-scoring. I used a sample of pitchers with at least 120 innings a season to develop the model itself and the results were impressive. The model outperformed FIP, the gold standard for estimators among the pitchers in my sample. Additionally, using different 20 inning breaks the model outperforms FIP once we hit a sample of 60 innings.

Let’s take a look at the ten best pitchers in baseball in 2019 using my Stuff-ERA. 

 

Top Starters Stuff-ERA
2019 Season Min 1500 Pitches
Pitcher Stuff-ERA
Luis Castillo 2.239
Jack Flaherty 2.560
Sonny Gray 2.743
Stephen Strasburg 2.832
Mike Soroka 2.858
Jacob deGrom 2.861
Charlie Morton 2.946
Kenta Maeda 2.949
Mike Clevinger 2.973
Dakota Hudson 2.983

 

The numbers once again seem to pass the smell test. Outside of Dakota Hudson, these ten names would be on a shortlist of the best pitchers in all of baseball. However, while my metric performs excellently in terms of descriptiveness, it struggles in predictiveness. This is mainly because In_wOBA does not have strong year over year correlations; notwithstanding, I have actually been able to make some small modifications to the model to improve the predictiveness. The biggest fix needed was to re-work In_wOBA. After a series of different trials, I decided to use each pitcher’s different seasonal In_wOBA values and regress them to zero (mean).

Each historic season was weighted based on the number of pitches thrown and then I added in 5,000 pitches worth of a zero influence. 5,000 is a little over two full seasons worth of data. The future-facing model considers this regressed wOBA average along with In_Whiffs, in zone influence, and command. The Out of Zone influence is not significant year over year. Using the same idea as before, we can evaluate this new model against FIP. FIP is not intended to be predictive so my new model will be expected to perform much better.

 

 

Here is the leaderboard for this predictive ERA model using 2019 data.

 

Top Starters Stuff-ERA Predictive
2019 Season Min 1500 Pitches
Pitcher ERA_Next
Luis Castillo 2.842
Jacob deGrom 2.891
Gerrit Cole 2.940
Max Scherzer 2.940
Jack Flaherty 3.013
Justin Verlander 3.032
Mike Clevinger 3.083
Clayton Kershaw 3.093
Sonny Gray 3.120
Lance Lynn 3.255

 

So far this list appears to be doing pretty well. Sonny Gray may be the current NL Cy Young frontrunner after a dominant start to his season and many of the other names on this list once again look like aces.

 

Plate Discipline

 

The initial idea for this article came as a way to evaluate plate discipline for hitters. This article is already long enough so I won’t spend too much time going into this topic but the overall idea of plate discipline is swinging at good pitches and avoiding bad ones. One of the best measures of PD we currently have is In-Zone Swing rate minus Out-Of-Zone. That said, as I have shown throughout this piece, just because a pitch is a strike does not mean a hitter should swing at it. Using the xwOBA framework I have developed I can see how much a given hitter improves their xwOBA on the pitches he decides to swing at. 

Each player sees a different set of pitches and therefore has a different xwOBA on all of the pitches that they saw. Then I know whether or not they swung at a pitch and as a result, I can see what the average xwOBA of those swings was. This allows me to see how much better a given hitter’s swings were when compared to all pitches he saw. This is done as a form of percentage increase. It is Swing xwOBA minus All xwOBA divided by All xwOBA. Below is a chart of the 2019 leaders in this metric that I previously shared on twitter.

 

Top Hitters Plate Discipline
2019 Season Min 300 Swings
Player PD
Luke Voit 114.74
Alex Bregman 114.34
Juan Soto 114.14
Cavan Biggio 113.95
Carlos Santana 113.83
George Springer 113.76
Logan Forsythe 113.65
Tommy Pham 113.45
Alex Avila 113.43
Matt Thaiss 113.38

 

Overall, like I’ve stated before this list passes the smell test and the even better news is that the metric has a correlation of 0.4 with actual wOBA which is just as good as the In-Zone minus Out of Zone swing rate metric. This is extremely positive for the first run of a plate discipline metric and is something that I will be refining shortly. 

 

Conclusion

 

Using solely location, pitch type, and count, we can devise a series of metrics that determine a pitcher’s influence over swing decisions, whiffs, and wOBACon. Then based on those newly created metrics we can develop a descriptive version of an ERA estimator as well as a predictive version that both outperform FIP. There are tons of other really interesting analyses that can come out of this framework, including a feature I plan to work on more this season. We can create charts that evaluate how a given pitcher attacks hitters. See this example for Shane Bieber’s Breaking ball locations overlaid on expected whiff plots. 

 

 

As you can see, Bieber has been locating his breakers absolutely beautifully and it is a huge part of his success thus far this season. He has always had elite command but it seems to have gotten even better. This is all a work in progress and I am constantly working to improve the underlying models. Every week I will be providing leaderboards for the 2020 season and diving deeper into a pitcher that the model either loves or hates. The first of those articles will debut next Tuesday.