Archive for Research

The MVP Batter Through the First Month

In one of the later chapters of The MVP Machine, the authors describe a working relationship between an unnamed position player and a writer at an “analytically inclined” baseball website. The player felt that his club’s advanced scouting data wasn’t granular enough and asked the writer to supplement the information he was given by the club with additional detail. The writer was eventually performing scouting reports on the player himself, opposing pitchers, as well as the home plate umpires’ strike zones. In terms of evaluating his own performance, the writer summarized that the player was basically looking at three things: “Am I squaring up the ball? Am I swinging and missing? Am I swinging at strikes?”

With the first month of the season in the books, who would be some of the best performing hitters in the league according to this particular player’s criteria? Thanks to Statcast, we have the tools at our disposal to try and figure out just that. Note that the dataset I used for this exercise was all qualified batters as of the morning of April 30th, 2021.

First, we need to decide which parameters to use to represent each of the three questions posed by the player. Two of the three are pretty easy. “Am I swinging and missing?” We can look up a player’s whiff percentage on Statcast. “Am I swinging at strikes?” That information is represented in a player’s chase percentage. “Am I squaring up the ball?” The natural candidates here would be, if we’re using just one number, the average exit velocity, hard hit percentage, and barrel percentage. I decided to go with the average exit velocity because it takes into account every batted ball put in play by the batter. Let me explain. Read the rest of this entry »


Expected Pitch Value

There is an index called pitch value that calculates the increase or decrease in runs scored depending on the pitch type. In this article I will look to create an environment-neutral version of pitch value.

Shortcomings of Existing Pitch Value

Pitch Value (hereafter PV) and RV use the average or sum of the variable values of RE288. This method has the advantage of being able to measure how much a pitch actually increased or decreased the number of runs scored on that pitch. However, the metric is not consistent enough to be used in a single year given that it depends on a relatively small number of batted balls and plate appearances.

The following is the average delta_run_exp (RV/100) of sliders for pitchers who threw 500 or more of them in each year from 2017-20, with the data obtained from Statcast.

The correlation coefficient is 0.14, which means that there is almost no correlation. Even if a pitcher records an excellent RV/100 in one year, there is no way to know what kind of value he will record the following year. It seems that it is difficult to measure the stable value of a pitch type with the existing PV and RV.

Using xwOBAvalue for Situation-Neutral Run Value and Batted Ball Evaluation

We can try to make improvements in measuring the value of pitches with a small number of at-bats or pitches in a single year.

First, we use a situation-neutral scoring value for events that occur rather than a change in scoring value. For example, a home run with no runners on base and a home run with runners on base have different values in the existing RV, but the situation-neutral scoring value is calculated using the average scoring value of home runs in all situations combined. The reason for this is that it is not appropriate to evaluate the ability of a single pitch to prevent runs from being scored if it depends on the circumstances in which it is thrown.

Another correction is to use the xwOBAvalue (estimated_woba_using_speedangle in Statcast) instead of the actual batting result when a pitch is hit. The pitcher has little control over whether a batted ball becomes a hit or an out, and it is known that the number tends to be unstable in a single year. If we consider that it is difficult for a pitcher to control the number of batted balls in a season, the batted ball number of pitch type in a season is even smaller, so the index becomes less stable. Therefore, for batted balls, we use the value of runs (xwOBA_value), which is estimated from the speed and angle of the batted ball. The purpose of this is to remove the influence of defense and chance as much as possible.

In this way, we try to calculate the pitch value as situationally neutral as possible.

Calculate wOBA by count

I will call this situation-neutral pitch value xPV (expected pitch value) for now.

The first step is to find the wOBA by count. Here, the wOBA by count is calculated based on “all final batting results that have passed that count.” Note that this is not the same as the batting results recorded at the time of that count.

For example, if a batter misses a strike in an 0-1 count and the count goes to 0-2, and then strikes out on three pitches, one strikeout is recorded in the 0-1 record. But if a batter hits a single in that 0-2 count, a single hit is recorded in the 0-1 record1. Also note, 0-0 is the count that has elapsed in all counts, so 0-0 = wOBA for all at-bats in that period.

Calculating the Run Value by Count

Using this wOBA by count, we can calculate the value of points scored by count.

(count wOBA after pitching – count wOBA before pitching) / wOBAscale (≈1.15 in Statcast csv data)

First, when the count changes, the actual RAA is calculated as:

(wOBA of the count after the pitch – wOBA of the count before the pitch) / 1.15

If a batted ball occurs, then this is used to calculate RAA:

(xwOBAvalue – wOBA of the count before the pitch) / wOBAscale

Total the value, Take the Average

The xPV is calculated by summing and averaging the RAAs calculated in this way.

The advantage of this xPV is that it reduces the influence of chance as much as possible and increases the consistency of the index by giving it a situation-neutral value. The following is the year-to-year correlation of the xPV/100 (xPV per 100 pitches) of sliders for pitchers who threw at least 500 sliders from 2017-20.

The correlation coefficient was 0.49, which is a moderate correlation and much improved over the 0.14 of RV/100.

For xPV, I referred to this article.

1The reason why we use hitting stats through a count instead of hitting stats at that count is that we can take into account the effects of events that occur only in a particular count, and we can also evaluate pitches that are not directly related to the batting results. For a detailed explanation, snin’s article is very helpful.

I have also put the R code here.


Your Team’s Prospects Are Probably Not Going To Work Out

Serious prospect hounds know that only about 10% of minor leaguers ever participate in a major league game. However, even the most discerning fans can be deluded into believing that their team’s farm system can overcome the odds and build a perennial contender based on their prospects alone.

I decided to investigate how much average WAR a prospect generates based on their ranking in Baseball America’s Prospect Handbook. I used a similar process in a previous article in which I calculated the amount of WAR based on the next six seasons of a player’s career since being listed (instead of when a player makes their major league debut). This means that players closer to the majors get a boost to their value, since they will have more opportunities to accumulate WAR than players in the lower minors.

Next, I grouped the players by their ordinal ranking in their organization from the 2001-2015 seasons and calculated each group’s average WAR to create the visualization below. Read the rest of this entry »


Introducing pWAR: A Predictive Wins Measurement for Pitchers

When WAR was first introduced, it attempted to answer a baseball question that has existed as long as teams have played professionally: how much can one player contribute to a team’s record? It is an ongoing debate to this day, but WAR is widely recognized as an excellent measure of overall performance. WAR numbers for major league players are regularly cited and recognized by both Major League Baseball and the Elias Sports Bureau. However, there is another question behind WAR, also long predating the existence of the statistic, and it’s a question that has yet to be answered by it. When a front office is deciding whether or not (or how aggressively) to pursue a player, they’re ultimately searching for the answer to one question — how many more games will we win if we get this guy?

Enter pWAR.

Read the rest of this entry »


Introducing xxxFIP

ERA, FIP, xFIP, and beyond…

There are a wide range of pitching stats available to the discerning baseball fan. From Wins and ERA to DRA- and xBACON, there’s something for all tastes. In this post I’ll introduce a new stat, xxxFIP, which is definitely NSFW (Not Safe For Wise decision-making).

Before diving into the details of xxxFIP, let’s discuss its predecessors and what they are trying to measure. Read the rest of this entry »


Enhancing Prospect Outlooks Using Scouting Report Text

Wander Franco is the latest prospect to be discussed as a top player in the game before stepping on a major league field field. Vladimir Guerrero Jr. was likely the recipient of even more hype in 2018, though he has reminded us at times that there are no automatic superstars in baseball. Franco and Guerrero Jr. have the unique distinction as the only two players to be given the maximum “hit tool” score of 80 on MLB.com’s prospect rankings. Guerrero Jr. (in 2018) scored higher on “power” while Franco has the edge in running and fielding. They were both rated 70 overall and were the respective No. 1 prospects in baseball at the time.

When comparing the two players’ ratings, we might stop at this point and declare a virtual tie. The same could be said for any number of lower level prospects with similar ratings. However, there is still a significant amount of data available describing the players: the words used in the scouting reports. On MLB.com, below the numeric ratings, there is a blurb detailing the prospects’ exploits. At first glance, we might not think the text provides information that can separate players, as many of the writeups are similar in both style and substance. Yet there is a possibility that there are indicators in the text that are not obvious to a human reader (or at least a human reader with my minimal experience analyzing text).

To examine the importance of the scouting report text, I developed two models — one with the text data and one without — to predict whether a prospect has made his major league debut as of the end of the 2020 season. Both models use variables such as year, position, numerical skill ratings, etc. to account for all of the non-text information available on MLB.com. Thus, if there is a difference in model effectiveness, it will be a result of the text data adding information that is not captured by the other features. Read the rest of this entry »


Rethinking How We Look at Team Defense

They say that a run prevented is as important as a run scored, and this checks out. In fact, based on the coefficient of determination (r^2) for the two variables, a run prevented has actually been more correlated with team success than a run scored. This has indeed been labeled as the “run prevention era,” and just by that measure, this would appear to be the case.

As we’ve discovered in the past, offense and pitching wins championships, especially compared to defense. However, that certainly does not mean that defense does not matter. Rather, it is a small advantage that teams can leverage to continue to win between the margins. Small-market organizations such as Cleveland, the Rays, and the D-backs have all benefitted from strong defense in the past, while the Mets have been a clear example of what poor defense can do to you.

How can teams gain an edge defensively, and how much does it matter? What are the most important defensive positions, and how does it vary from the defensive spectrum? Should teams tailor their defense specifically to their pitching? Let us change the way we look at team defense by crunching through the numbers! Read the rest of this entry »


Pulling a Rockies Pitching Solution Out of Thin Air

The success of the Colorado Rockies franchise has historically been impeded by air: the thin air of Coors Field and the hot air blown by higher-ups in the front office.

Due in large part to playing their home games in a comically extreme hitters’ park, the Rockies have finished 14th or worse in the National League in runs allowed per game in 21 of their 28 seasons in franchise history. Colorado has finished with a winning record five times in the past 20 seasons, and in four of those they ranked in the top 10 in the NL in RA/G. No, their run prevention as a whole has never been what you would call “good” or even “well above average,” but their only brushes with success have come at times when their pitching ventured beyond putrid.

The adverse effect of the thin atmosphere on pitching is twofold. The more apparent aspect is that it imparts less drag on a batted ball, allowing for fly balls to carry further, resulting in increased slugging at Coors. Perhaps less obviously, movement of pitches due to the Magnus effect is diminished. At the risk of triggering memories of my undergraduate fluid dynamics course, the lift on a baseball (or any spinning sphere) is proportional to the density of the fluid it moves through. Thus, when a fastball is thrown at Coors Field, it has less “rise” (or more accurately, is less affected by gravity) than it would at other major league parks.

Does this mean that every pitcher will perform demonstrably worse if he takes up in-season residence in Denver? Well, yes, but actually no. Read the rest of this entry »


Rearing Back: Pitchers’ Effort in Important Situations

Leading 3-1 and one out away from being a World Series Champion, Los Angeles Dodgers pitcher Julio Urías faces Tampa Bay Rays infielder Willy Adames. The first two pitches of the at-bat, fastballs resulting in a swinging strike and a called strike, clock in at 94.9 mph and 94.1 mph. The last pitch of the at-bat (and subsequently the World Series) comes on the third pitch. Urias fires a third straight four-seam fastball, this time for a called strike three at 96.7 mph. This may not feel particularly fast in a day and age in which some pitchers consistently hit 100 mph, but for Urías, there was a little something extra behind that final pitch. Of the 682 four-seam fastballs that Urías threw in 2020, this pitch was the fastest. While it may have been a coincidence that his hardest-thrown pitch was also in the most important situation, I suspect the significance of the moment was a key factor.

I doubt this claim comes as much of a surprise to anyone. Most people in crucial situations will push a little harder to ensure the outcome is in their favor. To test the theory, I examined pitch velocities from the 2019 regular season. I chose 2019 rather than 2020 to ensure the situations were most similar to a normal year in case any of the irregularities of baseball during COVID influenced the data. In general, it appears that two-strike fastballs are thrown harder than fastballs in other counts. I graphed the respective densities of fastball velocities below. Read the rest of this entry »


Modeling the Effect of Deadening the Baseball

Much has been made of the “juiced ball era” which we currently inhabit. Decreased drag on the ball along with an increase in-ball bounciness means that fly balls are carrying further, rewarding hitters with more home runs than ever before. This change has coincided with increases in strikeout rates which can be partially explained by pitchers throwing harder, but also may be due to more hitters selling out for a home run. There are now fewer balls in play than ever before, and many fans no longer enjoy this Three True Outcomes style of baseball.

Deadening the ball is a proposed solution to ballooning home run rates. Introducing a deadened ball along with measures to limit the dominance of pitchers (such as shrinking the strike zone) could increase the number of balls in play, improving the aesthetic value of baseball for many viewers as discussed on this site in a recent article. But what would baseball with a deadened ball actually look like? How much would the ball have to be deadened to return home run rates to those seen in past years? Would deadening the ball disincentivize strikeouts more strongly than the juiced ball? Which hitters would be the biggest winners and losers in a season with a deadened ball?

I aim to investigate all these questions in this article, so without further ado, let’s dive right in. Read the rest of this entry »