Archive for Research

Extracting Luck From BABIP

Balls in play are subject to lucky bounces, bloops, and exquisite defensive plays. Are some great hitting seasons and breakout performances just a player getting lucky on more than their fair share of balls? Is there any way to tell if a player is truly lucky or good, or if his batting average on balls in play is higher than we would expect? Could building a better expected BABIP help us find over- or undervalued players?

In the hopes of better understanding players’ true abilities, I looked specifically at the correlation between BABIP and launch characteristics. A player’s BABIP viewed across a short timeframe, such as a single season, can be highly influenced by luck. BABIP doesn’t converge well over a small sample. Using the law of large numbers, we know that given enough balls in play, a player’s BABIP should converge to their “true” BABIP. Fortunately, other launch characteristics like exit velocity and launch angle (both vertical and horizontal) converge more quickly. My goal was to build a model for expected BABIP based on those launch characteristics that removes as much luck as possible and more closely reflects a player’s true skill.

This project started as work I did along with Eric Langdon, Kwasi Efah, and Jordan Genovese for Safwan Wshah’s machine learning class at the University of Vermont. We were using launch characteristics (exit velocity, vertical launch angle, and derived horizontal launch angle) to predict if balls would land for hits or not. We initially tried using a support vector machine classification but found that a random forest model delivered more accurate predictions. Read the rest of this entry »


Analyzing the Draft

Ever since the MLB draft was created in 1965, teams have been searching for any competitive edge to separate themselves from the rest of the league. After all, it is one of the best ways to acquire young affordable talent for your organization. Not picking the best players available is a huge missed opportunity for any club and can set the organization back for years. It can also exasperate even the most devoted fans. It is imperative to have successful drafts every year, but what constitutes a successful draft? How many major leaguers are available in a draft and where can you find these players? These are some of the questions I hope to answer.

Methodology

Much of my analysis in this article will include references to team-controlled WAR. I calculated each draftee’s WAR total by summing their pitching and hitting WAR totals for the first seven years of their career to estimate the amount of value they provided their clubs before the players were eligible for free agency. This method is not perfect, because it does not consider demotions to the minor leagues, and it incorrectly assumes that every team would keep their prospects down in the minors to gain an extra year of control. However, I believe that the first seven years of WAR in a player’s career is a valid estimation of the value a player provides his organization before he exhausts his team-controlled seasons.

The drafts being examined are the drafts that took place from 1965 to 2004. I chose to stop at 2004 because that was the last year that had every player in its draft class exhaust his team-controlled seasons. If I were to include more recent drafts that still have active players, I could draw erroneous conclusions, since these players still have time to make their major league debuts and accumulate more WAR in their team-controlled seasons. Read the rest of this entry »


Maybe It’s Better To Never Swing at Shane Bieber’s Pitches

You don’t need me to tell you how effective Shane Bieber was in 2020. He led the majors in ERA, FIP, K/9, overall strikeouts, and of course was the unanimous winner of the AL Cy Young Award. The underlying pitch-tracking data all back up the quality of his skillset. He’s very good. So you’re probably wondering how this all jibes with a title suggesting it may be better for hitters to not swing at Bieber’s pitches, right?

I’ll start with this: Bieber’s 34% zone rate ranks 316th out of 323 pitchers who threw a minimum of 20 innings in 2020. That’s dead last among qualified starters. How is this possible? The simple answer is that, once again, he’s very good. The slightly less simple answer is that batters swing at unhittable pitches and don’t swing at hittable pitches. Bieber throws almost twice as many pitches out of the zone as he throws in the zone, so what if hitters just stopped swinging at his offerings? Surely he would just change his approach if a batter didn’t swing at his pitches, right? Read the rest of this entry »


Calculating the Odds of Mike Brosseau’s Magic Moment

After watching the great matchup between the Yankees and Rays in the 2020 ALDS, including Mike Brosseau’s epic at-bat against Aroldis Chapman in the deciding Game 5 of that series, I couldn’t help but take a look at the characteristics of the pitch he hit. Chapman is known as having one of the best fastballs in the game and a long track record of success as a closer. After battling back from 0-2, on the 10th pitch of the at-bat, Brosseau hit a 100.2-mph fastball thrown with 2386 rpms and 7.4 feet of extension over the left-field wall, allowing the Rays to advance to the ALCS.

This pitch was 6.9 mph, 80 rpms, and 1.1 feet above the average velocity, spin rate, and extension for four-seam fastballs in 2020. Given the same location, if the pitch was a little faster, had more RPMs, or was thrown even closer to home plate, would the result have changed? The aim of this article is to create a model to determine what the exact chances were of Mike Brosseau hitting that home run.

Using Baseball Savant and its wealth of Statcast data and more typical statistics, we can select all the four-seam fastballs thrown in 2020 and their related metrics. The data was cleaned for missing values, four-seam fastballs thrown by position players, eephus pitches, and four-seamers that may have been mislabeled as sliders or changeups. For the latter category, a minimum velocity of 87 mph was used to remove these potential label errors, and pitches with negative pfx_z values were removed as four-seam fastballs are expected to drop less relative to gravity. For pfx_x, the absolute value of the given value was used, as I want to look at the magnitude of the horizontal break as opposed to which side of the plate the movement is going towards. Read the rest of this entry »


Stars or Depth? What Is the Best Way To Build an MLB Roster?

Building an MLB roster is anything but simple, to say the least.

It would be very convenient if it was as easy as playing MLB: The Show, but as we are well aware of, there are many complexities to roster construction. Not only do organizations need to have high-end talent, but they also need to have 26 quality big-leaguers as well other players in the pipeline when adversity hits.

In a perfect world, teams would be able to have tons of star talent as well as intriguing depth. However, we do not live in a perfect world, and for that reason, teams need to adopt a specific strategy when it comes to building the best roster possible in the most efficient way imaginable.

Teams have generally two courses: will they prioritize star talent, or will they look to have as deep a team as possible? The first option is typically known as the “stars and scrubs” approach, and it is one that you see often see in basketball. Meanwhile, the latter approach is one that you’ll see with sports with deeper rosters, primarily football. Overall, both methods are used frequently by teams, but it is unclear which one is the more efficient when it comes to roster building.

What good is there to posing a problem if we aren’t going to find the answer for it? We need to dig deep into these two approaches! Should teams prioritize star talent even if it means their depth is lacking? Or is quantity more valuable than quality? Let us try to discover the answer to this critical question! Read the rest of this entry »


The Utility of “Going For It” in the Offseason

For fans of the 29 teams whose autumns aren’t highlighted by a World Series parade (in a normal year at least), the offseason is a time of equality, when every team is zero games back from a playoff spot and hope springs eternal. Front offices have four months to write checks and strike deals with the hope of blocking off the streets come November, or at least sell some tickets along the way. Baseball Twitter and internet forums everywhere are filled with catchphrases like “winning the offseason,” “making a splash,” and of course, “going for it.”

In a perfect world, every team would try its hardest and “go for it” every year, but in today’s MLB, no offseason is without a large swathe of teams sitting on their hands if not outright tanking. The merits of managing a team for the sake of the bottom line or stockpiling prospects for some future championship run can be debated ad nauseum, but the teams that deserve our attention are the ones who spend the winter months actively trying to improve their on-field products and win the whole damn thing.

But what exactly does it look like when a team decides to go for it? A simple look at which teams sign the most free agents could be a start, but a team who signs an army of relievers to minor league contracts shouldn’t be regarded as trying harder than a team that adds a pair of high-profile bats. New dollars committed might be a step closer, but one massive long term contract would skew the results and heavily outweigh a team signing multiple short-term deals.

The best way, then, to judge to what extent a team “went for it” in an offseason would be to look at the perceived short-term value of the players added via trade or free agency compared to those who departed by those same avenues. Read the rest of this entry »


Studying Release Point Standard Deviation From Center

A few summers ago, Walker Buehler and the Los Angeles Dodgers came to Baltimore at the very end of the season. That night my buddy and I couldn’t figure out why the Dodgers, and the overwhelming mass of their fans in attendance, were so pumped about winning a single game in Baltimore. Once we saw staffers in ties and headsets running out with the “Division Champions” t-shirts, we realized what was going on.

Needless to say, Buehler was excellent, going 7 innings with 11 Ks and — because it was the 2019 Orioles — gave up no runs on four hits. During the game, while surrounded by very excited Dodgers fans, I mentioned that Buehler’s delivery seemed so efficient that his motion looked exactly the same every time he threw the ball. If you’ve ever worked on physical mechanics of any kind, be it baseball swings, golf swings, freestyle swim stroke, running stride, or maybe just proper form sitting at a desk to avoid that “work from home/pandemic backache,” you know how hard it can be to exactly replicate a motion over and over again. Buehler amazed us in his ability to do just that. We know that repetition in delivery mechanics leads to success in various forms, so with that in mind, the point of this analysis is to look at release point consistency and how that correlates with resulting pitching metrics. Read the rest of this entry »


Adjusting Batter Performance by the Quality of the Opposing Pitcher

In the 2020 season, American League MVP José Abreu faced 107 different pitchers, including the top four in Cy Young voting point totals (Shane Bieber, Trevor Bauer, Yu Darvish, and Kenta Maeda). Bauer was the only of the four not to allow a home run to Abreu in 2020. In comparison, MVP Runner-up José Ramírez faced 69 of the pitchers that Abreu faced. The third-place DJ LeMahieu faced a completely different set of pitchers, not a single one overlapping with Abreu’s.

While these batters were compared by their offensive production, it appears Abreu faced more challenging pitching. Using FanGraphs’s xFIP- (for which a lower number is better) as a measure of a pitcher’s quality, Abreu was up against a 96.75 xFIP- on average while LeMahieu faced pitchers with at a 105.93 mark. Both LeMahieu’s weighted on-base average (wOBA) of .429 and Abreu’s .411 were exceptional, but is the 18-point difference truly reflective of the difference between the two players’ seasons?

Overview

To answer the question, I derived a value with a similar intuition to Baseball Prospectus’s Deserved Run Average (DRA). DRA is a measure that adjusts a pitcher’s performance by the quality of the batters they are facing. This statistic also accounts for numerous context factors to attempt to better isolate the pitcher’s contribution. DRA shows that the quality of the batter can be influential in a pitcher’s performance, so it makes sense that the quality of pitcher is influential in a batter’s performance.

As for the statistic I will be working with, I choose to refer to this as “pitcher-adjusted weighted on-base average,” or pwOBA. The intuition is simple: a batter should get credit for offensive production against challenging pitching. The formula for pwOBA is based on the formula for wOBA. With wOBA, every event has a run value (ex. 1.979 for home runs in 2020) and a batter gets credit for these values accumulated over the course of the season. The sum of these values is then divided by (AB + BB – IBB + SF + HBP). Read the rest of this entry »


PitchingBot: Using Machine Learning To Understand What Makes a Good Pitch

People have always been looking to understand what makes a good pitch. With advances in pitch tracking technology and computing power, we can begin to use large amounts of data to answer this question more definitively. I’ve created a model called PitchingBot which uses machine learning to try and find what makes a good pitch.

Machine learning describes a general class of algorithms that are very flexible and “learn” patterns from large amounts of data. This means I don’t have to tell PitchingBot what I think a good pitch is, but instead I can give it a load of pitches (and the results of those pitches) and it will train itself to recognize a pitch that gives good results.

I intend to investigate a couple of key questions:

Does PitchingBot reach the same conclusions as conventional wisdom about what makes a good pitch?

Naively, I would expect a good pitch to have the following qualities: high velocity, plenty of movement, and good location in the corner of the strike zone. I will look at whether these are true for PitchingBot and how the definition of a good pitch changes with the ball/strike count.

Can we meaningfully compare and evaluate pitchers using PitchingBot?

Are the pitchers who are best according to PitchingBot those who get the best results? PitchingBot isn’t very useful if it does not agree with real pitcher performance. Read the rest of this entry »


Building a Hitting Prospect Projection Model

How well do you think you can predict the future of a minor leaguer? My computer may be able to help. Towards the end of the regular season, I found the prospects page at FanGraphs and started experimenting with it. I have always had a lot of fun thinking about the future and predicting outcomes, so I decided to try to build a model to predict whether or not a prospect would make it to the majors. I had all the data I needed thanks to FanGraphs, and I had recently been looking into similar models built by others to figure out how I could accomplish this project. I realized that all these articles I was reading detailed the results of their models, but not the code and behind-the-scenes work that goes into creating them.

With that in mind, I decided to figure it out on my own. I had a good idea of what statistics I wanted to use, but there were a few issues I needed to consider before I started throwing data around:

  1. Prospects can play multiple years at a single level.
  2. Not all prospects play at all levels of the minor leagues.
  3. What do I do with players who skipped levels?
  4. How can I make this model useful and practical?

Prospects playing multiple years at a single level isn’t too difficult to deal with because I can just aggregate the stats from those seasons. The fact that not all prospects play in every level of the minor leagues before reaching the majors is tough, however, because that makes for a lot of missing data that needs to be handled before building the model. I decided to replace all the missing values with the means of the existing data, and I created variables to indicate whether or not a player’s season stats for that particular level of the minor leagues were real. To make this model useful, I would want to take out certain variables. For example, I figured I wouldn’t need or want Triple-A stats included in the model because typically once a player has reached that level of the minors, you are more interested in how well they will do in the majors. Read the rest of this entry »