## Tool Version 2: Pitching Correlations with Improved Filtering

Now kids, I’m not a user of the Twitter, but I did follow a link to it in one of Eno’s articles last week, whereupon I came across an interesting question posed in a tweet by one @b_g_h: “Are hitters with low BB% also more volatile [because] of BABIP variance?”  There are different ways to address the question statistically, but it seemed to me that with an altered version of my pitching correlation tool, one could provide insight into issues like this, at least regarding pitchers.  A hitting version is waiting in the wings, don’t worry.  So, what I bring to you today is an interactive and downloadable spreadsheet that allows you not only to analyze the relationship between any two pitching statistics, but also to filter your data by any three statistics of your choosing. Read the rest of this entry »

## Tool: Basically Every Pitching Stat Correlation

In doing my research, I often like to take a look at correlations to get an idea about whether factors might be connected.  At the end of this season, I put together a spreadsheet to help me with that.  Well, I haven’t finished the research yet (FG+ subscribers will probably soon find out what’s been keeping me from it), but in the meantime, I thought I’d share what I hope will be a pretty handy tool for whomever out there might be interested in what lies a little beneath the surface of all these stats on FanGraphs.  And I do mean all of them.  Any pitching-related stat on FanGraphs should be represented in this tool.  You can compare one stat to another, or to itself in a different year.  Or, what the heck, you can even compare a stat to a different stat in a different year.  And, for you sticklers out there, it will even give you a confidence interval on these correlations (by default, it gives you the range of correlations that the true correlation has a 95% chance of being within).

What can you do with this?  Well, let’s say you want to see whether a stat is predictive of the next year’s ERA.  You could, for example, set Stat 1 to K% (after selecting the correct white box, type it in, or select from the drop-down list via the arrow to the right of the box), with the year set to 0 (meaning the present year), then set Stat 2 to ERA, with the year set to 1 (meaning the next year).  If you don’t change the IP or Season filters, you should see a correlation of -0.375.  That shows there’s a pretty decent connection between the two stats, in that if a pitcher has a high strikeout percentage in one season, he’ll likely have a low ERA the next (relative to the rest of the pitchers in the comparison).  If you change the year under ERA to 0, you’ll see the correlation gets stronger, whereas if you change it to 2 or 3, you’ll see it gets weaker.  That has a lot to do with the unpredictability of K%, and especially of ERA.  You’ll notice if you compare year 0 K% to year 1 K%, the correlation is a very strong 0.702, whereas if you do the same for ERA, it’s a moderate-to-weak 0.311.  Hopefully the graph will give you an idea of how strong those connections really are.
Read the rest of this entry »

## More Fun with Markov: Custom Run Expectancies

Before the season, I put up a three-part series (1, 2, and 3) that explained how linearly-weighted stats like wOBA, while useful for comparing players to each other, don’t necessarily reflect each player’s true contribution to their team’s run scoring.  You see, the weights used to calculate wOBA are based on league averages.  So, for a team with league average breakdowns in walk rate, singles rate, home run rate, etc., wOBA (and its offspring, wRC+) ought to work very well in figuring out how valuable a player is (or would be) to an offense.  However, when it comes to particularly bad or good offenses, or to those with unusual breakdowns, wOBA will lose some of its efficacy.

Why?  There are synergistic effects in offenses to consider.  First of all, if a team gets on base a lot, there will be more team plate appearances to go around, which of course gives its batters more chances to contribute.  Second of all, if the team gets on base a lot, a batter’s hits are generally worth more, because they’ll tend to drive in more runs.  And, of course, once the batter gets on base in such a team, it will be likelier that there will be a hit (or series of hits) to drive him in.  The reverse of all three points is true in a team that rarely gets on base.

But it goes even beyond that.  Let’s say Team A gets on base 40% of the time, and Team B gets on only 20%, but their balances of the ways they get on base are equal (e.g. each hits 7x as many singles as they do HRs) .  A home run is going to be worth something like 14% more to Team A, due to more runners being on base.  However, to Team B, a home run is worth over ten times as much as a walk, whereas to Team A, it’s worth only about 5 times as much.  That’s because Team A has a much better chance of sustaining a rally that will eventually drive in that walked batter.  Team B will be much more reliant on home runs for scoring runs.

## Why Strikeouts Secretly Matter for Batters

I got my start at FanGraphs by writing Community Research articles. As you may have noticed, community authors have been very busy this season, cranking out a lot of interesting articles. One that caught my eye the other day was triple_r’s piece on the importance of strikeouts for hitters. The piece correctly pointed out, as other studies have, that there’s basically no correlation between a hitter’s strikeout rate and his overall offensive production. Strikeouts don’t matter; case closed, right? Well, not exactly.

Let me present a hypothetical situation. Say there’s a group of players who go to an “anti-aging” clinic in Florida and pick up some anabolic steroids. Let’s say these hypothetical players are named Bryan Raun, Ralex Odriguez, Tiguel Mejada, Phonny Jeralta, Celson Nruz, and Barry Bon… nevermind. Yet, after using the steroids, it appears that the group of them, on average, has not improved. The steroids didn’t improve their performance, right? But, wait — let’s also say that while visiting Florida, some of them contracted syphilis, which spread to their brains, causing delusions and severely impacting their judgment, strike-zone and otherwise. The players whose brains aren’t syphilis-addled have actually improved quite a bit, but their gains are completely offset by the losses suffered by those whose central nervous systems are raging with syphilis. So, the fact that the steroids actually do improve performance has been completely obscured by another factor that is somewhat — but not necessarily — associated with the steroids.

## My Simple(ish) Playoff Chances Simulator

A month ago, I submitted an article with something I came up with that I thought was pretty cool.  It was a simulator similar to the Coolstandings sim, except that it would use Steamer and ZiPS rest-of-season (RoS) projections instead of year-to-date statistics as the measure of each team’s true talent.  Well, as you may have noticed, the boss, David Appelman, must have thought it was a pretty cool idea too, as unbeknownst to me, he had been working on the same sort of thing since long before the idea popped into my head.  But my duplication of effort will hopefully not go entirely to waste, as I’ll be sharing and explaining the simulator I created.  You’ll be able to use it to analyze your own “what if” scenarios, if that’s your sort of thing.  Think ZiPS and/or Steamer is overly optimistic or pessimistic about some teams?  You can fix that by running your own simulations with this.  Or you can apply it to past or completely hypothetical teams.  Go nuts.

## Simulating the Impact of Pitcher Inconsistency

I thought Matt Hunter’s FanGraphs debut article last week was really interesting.  So interesting, in fact, that I’m going to rip it off right now.  The difference is I’ll be using a Monte Carlo simulator I made for this sort of situation, which I’ll let you play with after you’re done reading (it’s at the bottom).

Matt posed the question of whether inconsistency could be a good thing for a pitcher.  He brought up the example of Jered Weaver vs. Matt Cain in 2012 — two pitchers with nearly identical overall stats, except that Weaver was a lot less consistent.  However, Weaver had a bit of an advantage in Win Probability Added (WPA), Matt points out.  WPA factors in a bunch of things, e.g. how close the game is and how many outs are left in the game when events occur.  Because of that, it’s a pretty noisy stat, heavily influenced by factors the pitcher doesn’t control much.  It’s not a predictive stat.  For that reason, I figured simulations might be fun and enlightening on the subject.  They sort of accomplish the same thing that WPA does, except that they allow you to base conclusions off of a lot more possible conditions and outcomes than you’d see in a handful of starts (i.e., they can help de-noise the situation).

## Reviewing the Preseason Standings Projections

The FanGraphs staff made its obligatory preseason picks before the season (naturally), and I think it’s safe to say that none of us have psychic powers. My picks of the Angels and Blue Jays to win their divisions — they’re not looking so hot right now. In my defense, I was just blindly going along with what our preseason WAR estimates told me. OK, not the greatest defense, but I figured Steamer + ZiPS + FG-created depth charts could produce better guesses than I could on my own. Especially with the roster changes that have happened lately, I thought it would be a good time to revisit our projections. The Angels came up the series victors against the Blue Jays in their recent four-game Battle of the Disappointments, but both teams are still far below the expectations put on them.  However, let’s examine: could they actually be good teams who have just been unlucky?

Most teams have played somewhere around 110 games this season. That leaves plenty of room for unpredictability. If you flipped a coin 110 times, you’d expect to get about 55 heads, right? Well, the binomial distribution says there’s only about a 49.5% chance of the heads total being within even three of that (somewhere between 52 and 58 times). MLB teams are pretty different from coins — they’re a lot more expensive — but I think you can apply the same principle to them. The above calculation for the coin assumes the “true” rate of heads is 50%. What would we see if we were to presume our projections’ estimated preseason win totals are actually representative of the “true” win rates for each team? The following table will show you: Read the rest of this entry »

## Batted Ball Types and Handedness Matchups, in General

Last month, I did a two-part analysis that showed what happens — strike out-wise — when, say, a pitcher who strikes out 15% of batters faces a batter who strikes out 20% of the time. As a special bonus for you all, I included a few hundred other K%-matchup types too. I made handedness matchups central to the study, as I think it’s pretty well-established that you can expect a hitter to strike out more often against same-handed pitchers. That is, if I was trying to give an expected result for a righty batter against a lefty pitcher, I looked only at the hitter’s past performance rates against lefties and the pitcher’s history against righties. Before I moved on to performing a similar analysis on batted ball types (grounders, liners, outfield fly balls, and infield popups), I wanted to see whether handedness matchups mattered to these as well.

For this study, my sample was all non-switch-hitting batters from 2002-2012 with at least 300 PA against lefty pitchers plus at least 300 PA against righties. I’d have gone by number of batted balls, except I’m throwing some non-batted ball stats into the analysis.

Let’s get right to it — the following table shows the chances that handedness really makes no difference to each stat, according to paired t-tests:

## Could Chris Davis Match Roger Maris?

Chris Davis, with 37 home runs so far this season, has been generating a lot of buzz lately — both on the field and more recently with some comments he made during the All-Star break. When he was asked about the all-time home run record, Davis said:

“In my opinion, 61 is the record, and I think most fans agree with me on that.”

I have no idea if most fans agree with him, but it probably shouldn’t be  surprising that a guy within spitting distance of a 61 home run season would view that as the mark to beat — rather than 73 home runs, which is essentially out of range. So, just for fun, let’s figure out what Davis’ chances are of reaching Roger Maris.

At Tom Tango’s website, there was a discussion that tried to put a number on Davis’ chances of reaching that mark. Tango performed a “quick back-of-envelope calculation” to do so, but today, I’ll be providing you with an interactive tool that might make it easy for you to perform a more sophisticated calculation for situations like this (and many other types of situations).

## Batter-Pitcher Matchups Part 2: Expected Matchup K%

In last episode’s thrilling cliffhanger, I left you with a formula that I brashly proclaimed “does a great job of explaining the trends” in strikeout rates for meetings between specific groups of batters and pitchers.  Coming up with a formula to explain what was going on wasn’t pure nerdiness — making formulas to predict these results is the point of this research project.  You see, the goal of my FanGraphs masters is to come up with a system by which we can look at a batter and a pitcher, and tell you, our loyal followers, some educated guesses of the chances of pretty much every conceivable outcome that could result from these two facing off against each other.  Getting a sense of the expected strikeout rate is merely the first step in what will likely be a long process of continuous improvement.

The idea of this matchup system is to not only give you estimates that are more free from the whims of randomness than “Batter A is 8-for-20 with 5 Ks and 1 HR in his career against Pitcher B,” but also to provide some evidence-based projections for matchups that have never even happened.  How do we propose this can be done?  By looking at the overall trends and seeing how players fit within them.  Can it really be done?  It definitely looks that way to me.  Today’s installment will be about attempting to convince you of that.

## Better Match-Up Data: Forecasting Strikeout Rate

“Riddle me this,” wrote editor Dave Cameron to me some time ago, “what happens when an unstoppable force meets an immovable object?”  OK, that’s not exactly how it went down.  What he actually did was to present me with the challenge of research, with the goal being to develop a model that would forecast the expected odds of an outcome of each match-up between a specific batter and a specific pitcher. Rather than talking about how players have done in small samples, can we use our understanding of player skillsets to develop an expected outcome matrix for each at-bat?

For example, such a tool might tell you that Adam Dunn has a 40% chance of striking out against Stephen Strasburg, a 10% chance of drawing a walk, a 5% chance of hitting a ground ball, etc… Forget I said those particular numbers — I completely made them up in my head just now.  You may be thinking “well, why should I care about that?  Rather than just being inundated with match-up data that is little more than randomness, such a tool might give you some idea of how much of a gain in expected strikeout rate a team would get by switching relief pitchers with a man on third base and less than two out. Or what the probability of getting a ground ball is in a double play situation, which might influence the decision of whether or not to bunt. Knowing the odds of potential outcomes could be quite beneficial in understanding the risks and rewards of various in-game decisions.

This project has been — and will continue to be — a major undertaking, as you can imagine.  This isn’t the kind of thing that can just be thrown together, but I really think the results could be great. Today, I’ll be sharing with you the findings of my research into perhaps the most important aspect of these matchups — K%, or strikeouts per plate appearance.  This will introduce the sort of process that will be involved in figuring out all of the other elements of the matchup tool. Read the rest of this entry »

## The Odds of Hitting for the Cycle

Last week, Mike Trout hit for the cycle. When asked for a comment, coach Mike Scioscia said, “If I’m a betting man, I’ve got to believe there’s another cycle in his career somewhere.” That got me wondering.

Whenever I was in a math class where probability was being discussed, the question often in the back of my mind was, “How can this be applied to baseball?” One of the things I love the most about baseball is how well it lends itself to situations of probability, compared to most sports. I’m not sure what that says about me. Anyway, I figured this would be the perfect opportunity to refresh my memory (and hopefully some of yours) on how to crunch the numbers on situations like this. Don’t worry — the principles work on useful things other than just calculating the odds of that gimmicky achievement we call the cycle. Read the rest of this entry »

## Randomness, Stabilization, & Regression

“Stabilization” plate appearance levels of different statistics have been popular around these parts in recent years, thanks to the great work of “Pizza Cutter,” a.k.a. Russell Carleton.  Each stat is given a PA cutoff, each of which is supposed to be a guideline for the minimum number PAs a player needs before you can start to take their results in that stat seriously.  Today I’ll be looking at the issue of stabilization from a few different angles.  At the heart of the issue are mathy concepts like separating out a player’s “true skill level” from variation due to randomness.  I’ll do my best to keep the math as easily digestible as I can.

## wRC+ and Handedness: The Importance of Being Lefty

I think we’re all aware that the lefty vs. righty matchup favors the batter.  But to what extent?  And what are the implications?  Prepare to be inundated with a bunch of charts and tables.

For the purposes of this article, I’ll be sticking to using wRC+, my favorite all-in-one, level-playing-field batting stat.  My sample consists of all batters from 2002-2012 who had at least 200 total PAs against lefties and at least 200 more against righties.

The charts in this article will break down the frequency distributions of wRC+ for left-, right-, and switch-hitting batters, grouped to the nearest multiple of 10.  For example, the chart below shows that 21.5% of right-handed batters (RHB) hit for over 85 but less than or equal to 95 wRC+ against right-handed pitchers (RHP).

## An Unsolicited Follow-Up Study of Pull%

I’m always looking for new angles to unlock the mysteries of BABIP, so I was intrigued by Jeff Sullivan’s exploration of pull rates against pitchers.  So I grabbed the data from baseball-reference.com, and set to work subjecting it to my usual rigmarole of correlations and multiple regressions.  You know how they say if your only tool is a hammer, everything looks like a nail to you?  Well, plug your ears — there’s about to be a lot of wild, uncontrolled pounding going on in here…

I’ll cut right to the chase — did I find anything interesting relating to pitchers’ overall effectiveness when it comes to their Pull%, Middle%, and Opposite%, as I’m calling them?  Well, I found one decent connection that will seem obvious and stupid after you think about it, and a slight but kind of interesting connection.  I’ll provide you with some correlation tables that have left few stones unturned.  But, mainly, the research might help to set some things straight about how important this stuff actually is for pitchers.

## BABIP Park Factors and the Batted Ball Connection

Some of you may recall that before being promoted from a FanGraphs Community Research writer to an actual FanGraphs writer, my primary focus was on the relationship between batted ball types (infield fly balls, in particular) and BABIP for pitchers.  At the time, I’d been leaving park factors out of the equation in a [vain] attempt to keep things simple, but now I want to give them a bit of attention.

## Team-Specific Hitter Values by Markov

In my first article, I wrote about the limitations of the linear weights system that wOBA is based on when it comes to the context of unusual team offenses. In my second, I explained how Tom Tango, wOBA’s creator, also came up with a way of addressing some of these limitations by deriving a new set of linear weights for different run environments, thanks to BaseRuns. Today, I will tell you about the next step in the evolution of run estimators — the Markov model. Tom Tango created such a model that can be accessed through his website, and I’ve turned that model into a spreadsheet that I’ll share with you here.

I’ve told you that the problem with the standard run estimator formulas is that they make assumptions about what a hit is going to be worth, run-wise, based on what it was worth to an average team. That means it’s not going to apply very well to an unusual team. What’s so great about the Markov is that it makes no such assumptions — it figures all of that out itself, specific to each team. And when I say it figures it out, I mean it basically calculates out a typical game for that team, given the proportion of singles, walks, home runs, etc. the team gets in its plate appearances. It therefore estimates the run-scoring of typical teams better than just about anything, but it also theoretically should apply much, much better to very unusual or even made-up teams.
Read the rest of this entry »

## Linear Weights + BaseRuns = Good

In my last article, I explained how wOBA’s current implementation changes the value of walks, singles, home runs, etc., annually due to changing league characteristics.  Does this mean that the value of an event is the same for every team in the league each season?  Or in every park in the league?  No way.  If you’re talking about a weak offense in a high-offense era, then the overall constants for a weak offensive era are probably more applicable to that team.  However, it’s not really the point of standard wOBA to guess the run-producing contribution of a particular player to a particular team; I think it’s probably more accurate to say it’s about his probable productiveness in a typical team (although park effects aren’t taken into account, so not exactly… that would be more true of wRC+).

Anyway, Tom Tango realized this limitation, and produced a table that shows how the values change depending on a team’s runs scored.  He accomplished this system of “Custom Linear Weights” (“a necessary offshoot” of linear weights, he says) by making use of David Smyth’s BaseRuns formula, which is, in simplest terms, Runs Scored = base runners * (% of base runners that score) + home runs.  Home run hitters are not considered base runners, in this equation, by the way.  Makes perfect sense, right?

Tango realized that BaseRuns had a better handle on the team run-scoring process than his basic linear weights system (and all the other run estimators), so he translated the results of BaseRuns in various run environments into linear weights.  Specifically, the BaseRuns formula told him how many runs the team should score, and the linear weight value of each hit came from how many additional runs BaseRuns expected the team score if it had one more of that type of hit (the marginal value of each hit type).  Here are just the basics of his results, in graphical form:

## Adjusting Linear Weights for Extreme Environments

Well, it’s my first assignment as a real writer, having been promoted for my Community Research articles on pitcher BABIPs and ERA estimators, and I’ve been thrown into the deep end of the pool: linear weights.  It’s a tricky subject, but I’ll try to walk you through both the problems with linear weights and how they can be overcome.  This article series mainly draws from various works of Tom “Tango,” a.k.a. “tangotiger,” the creator of wOBA and FIP, as well as from David Smyth’s BaseRuns.  I’ll go deeper and deeper down the rabbit hole of stat geekishness as the series goes on, eventually emerging with a spreadsheet version of Tango’s Markov run modeler that I made for you all to play with.  Where the Markov mainly shines over wOBA is when it comes to extreme run environments, such as unusual offenses or extreme ball parks.

#### Who cares about extreme run environments?

Nerds like me, I guess?  Tom Tango cared enough to come up with ways to address the shortcomings his original wOBA formulation.  If you’ve ever wondered how valuable a certain player is to your favorite team, maybe you should care too; that low-OBP slugger might be more valuable than wOBA might suggest to your low-OBP team.  On the other end, a typical walk last year was worth considerably more to the high-OBP Cardinals than it was to the low-OBP Mariners (around 0.04-0.065 more runs each… which adds up over a season).