Introducing xWHIP 2.0: the next generation

NOTE: THE ORIGINAL RELEASE OF THIS FILE HAD A TRANSPOSITION ERROR IN THE FORMULA. IT HAS BEEN FIXED AS OF JANUARY 8, 2011. I GREATLY APOLOGIZE FOR THE PROBLEM. PLEASE DOWNLOAD THE UPDATED FILE (link below). THANK YOU.

A few months ago, I debuted the first version of the expected WHIP (xWHIP) calculator, which took a pitcher’s batted ball distribution and, in determining an expected number of hits, calculated that pitcher’s expected WHIP. The tool was tinkered with and refined until version 1.4.3 was released and that, until now, has been the primary xWHIP tool available. xWHIP 1.4.3 overexpected WHIP a bit, but was otherwise pretty solid. Especially for relative comparison purposes, xWHIP 1.4.3 was a useful fantasy tool.

Not long ago, I was introduced to a fellow stathead by the name of Martin Alex Hambrick. He had done some number tinkering similar to what I had done independently with the xWHIP calculator, and he had an idea. He brought that idea to my attention, and from it a new formula for expected xWHIP was born.

Alex’s idea was that a pitcher’s actual innings pitched (aIP) are as much the by product of luck as expected hits (xHits). The theory is that a medley of defense, umpires, errors, random luck and the like skew the length of innings. The pitcher, for example, does not particularly control dropped third strikes by his catcher.

This idea is somewhat captured in the K% (K/TBF) and BB% (BB/TBF) movement of sabermetrics that rejects K/9 and BB/9 because the length of innings is largely out of the control of the pitcher, thereby skewing both K/9 and BB/9. Accordingly, we began work on a new denominator for xWHIP that incorporated an expected innings (xIP) total based on a pitcher’s outs-creating events.

With this idea in mind, we began work on a new xWHIP calculation. Law school delayed my work on a final formula until this week, but with “way too much time on my hands” (i.e., any lawyers out there need a law clerk for the summer?), I finally got around to hammering out a reliable formula and user-friendly interface, calibrated to Baseball Info Solutions (BIS) data.

The current formulation for expected innings is as follows:

xIP = ((K*1.000075)+((BB-IBB+HBP)*0.00016)+((0.808)*GB)+((0.278)*LD)+((0.992)*IFFB)+((0.745)*OFFB)+(0.020099*(BB+HBP+xH)))/3

The coefficients in the above formula represent the expected outs by event rate. You might notice the two percent adjustment applied to both modified walks (BB-IBB+HBP) and expected hits (xH). That figure represents a ten-year average outs-per-runners-put-on-base rate (ORB). ORB encapsulates the ten-year league average pickoff and caught stealing rates.

Because catcher defense and a pitcher’s pickoff talents are difficult to measure, and also not widely available, using a league average rate helps make the calculator more accessible. The final xWHIP figure should be mentally modified based on one’s own perception of a catcher’s pickoff ability or a pitcher’s pickoff ability. If Jason Varitek is the catcher, you might want to raise the pitcher’s calculated xWHIP, while the opposite would be true for those pitchers handled by Yadier Molina.

Alex is working on a simplified “Quick xWHIP” formula that simplifies the xWHIP calculation even further, to the point that you could do it on a calculator. He’ll tell you more about that (and the accuracies of both xWHIP 2.0 and Quick xWHIP) in a (near-) future post. All I can say for now regarding the calculator’s accuracy, at least to some degree of certainty, is two things. First, xWHIP works best—that is to say, it is most predictive—when you use multi-year data rather than year N-1 data. Second, the R^2 of the data seems to be solid for a predictive state.

Someone once told me (or maybe I just read it somewhere) that an R^2 of .30-.35 is strong for a predictive stat, while a .60 or greater R^2 is what is required of an evaluative stat. Using 2007 xWHIP 2.0 to predict 2008 actual WHIP resulted in an R^2 of .34 amongst the 78 pitchers who faced a minimum of 500 batters, compared to an R^2 of .26 for 2007 actual WHIP. Likewise, using 2008 xWHIP to predict 2009 actual WHIP resulted in an R^2 of .36 amongst the 80 pitchers who faced a minimum of 500 batters, compared to an R^2 of .30 for 2008 actual WHIP.

Strangely, however, using 2009 xWHIP to predict 2010 xWHIP amongst the 82 pitchers who accrued 500+ total batters faced merely resulted in an R^2 of .15 (compared to a .14 R^2 for 2009 actual WHIP). Maybe I crunched the 2009-2010 data incorrectly. Maybe this is a sample size issue. Maybe not. As I mentioned above, Alex will supply more details on the accuracy of xWHIP 2.0 shortly.

I also tinkered some with the expected hits formula, but the changes are relatively minor and hardly warrant discussion. The important thing to note about the new xWHIP tool is that it is now calibrated per the past five years of BIS data rather than Game Day. I have done this because I believe that Fangraphs utilizes BIS, not Game Day, as their source for ball in play (BIP) data. Accordingly, this should make the tool more accurate for the average user. Most of the data stood relatively stable, but here are the new expected hits by batted ball types:

  • Popups: .004
  • Groundballs: 0.236
  • Outfield Flyballs: 0.250
  • Line Drives: 0.716

These data points include home runs, which is why the Outfield Flyball expected hits rate is so high. If you take home runs out of the equation and account for them separately (as the xWHIP calculator does), the expected hits rate, per BIS, for Outfield Flyballs and Line Drives falls to .158 and .714, respectively.

You can download the new xWHIP tool, version 2.0, by clicking here. The password to utilize the xWHIP tool is still “soto 18” and the batted ball data you will need to plug in can be found at Fangraphs.com.

Picture below is a screenshot of the xWHIP 2.0 tool, which was used in my Zack Greinke forecast article. For explanatory purposes, this screenshot has the 2010 numbers of Roy Halladay plugged in.


As the instructions on the tool indicate, the gray cells are for data you should manually input. The magenta park factor cell is also a manual data cell, though the number should be left at “1.00000″ unless you have the relevant park factor HR/FB index figure. You should not enter any data into any of the blue, green or yellow-orange cells.

The green cells feature the line drive-regressed expected-ball-in-play data. The yellow-orange cells display the expected innings, expected hits and expected WHIP for the pitcher, irrespective of defense. If you enter data into the Team Innings Pitched and Team UZR gray cells, then the blue cells will display a crude defensive adjustment to the expected hits total, assuming uniform defense and that all saved hits would be of the singles variety. All of the data cells are pre-formatted to visually round all numbers to keep the sheet clean, though cells will retain the full value of any number entered.

I also included a cell for xWHIP 1.4.3, calibrated from Game Day to BIS, in case people wanted to know a player’s expected WHIP using expected hits and actual innings, rather than expected innings.

I hope everyone enjoys this. If you have any questions/concerns/comments/criticisms, please post them in the comments below or email them to
, with the subject line "xWHIP 2.0 Calculator."

On a final note, I would like to give a special thank you to several of my THT colleagues who have been invaluable in the creation of the xWHIP 2.0 tool. Without the assistance of Derek Carty, Dave Studemund, and Harry Pavlidis, none of this would have been possible. I apologize to each of you for my incessant e-mailing in attempt to work out the mathematical kinks in the formula.

Print Friendly
 Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0Email this to someone
« Previous: The virtual 1960s New York Mets (Part 4: 1966-67)
Next: Twisting Oliver: wading into the batting pool »

Comments

  1. Ben Pritchett said...

    I can’t even begin to imagine how much time this took you to compile and formulate. My Braves baseball cap is tipped to you. Well done.

  2. Jeffrey Gross said...

    @Jeremy,
    There is indeed. I will release it publicly after or inside of Alex’s article.

    @Ben,

    Thank you!

  3. Chris said...

    Why are there passwords on these tools? I use open office which I guess doesn’t like password protected spreadsheets because the last time I downloaded one I got stuck with Hideki Matsui’s batting line from 2005 and unable to change a thing about it because all fields were protected.

  4. Jeffrey Gross said...

    @Chris,

    I password protect because otherwise the tool gets pirate linked and I want to make sure people get the tool from THT, who I created it for.

    Check your email, I just sent you an unprotected copy. If anyone else has this problem, please email me and I will shoot you an unprotected copy.

  5. Mike said...

    Great Stuff! Being somewhat new to fantasy baseball, am I wrong in asssuming the tool could be used to “interpret” what a specific player’s whip should have been given his various outcomes (LD, GB, FB, BB, etc.)? Or is the tool used to project future outcomes? I’d appreciate any insight that you could pass along, as I’m really interested in how to apply this great formula. Thanks.

  6. Jeffrey Gross said...

    Mike,

    You are correct. xWHIP is what a pitcher’s expected WHIP is based on his batted ball ratios. Assuming you believe such remains constant, then xWHIP is also predictive (which, by the way, it is if you use multi-year data—I prefer the most recent 3 years).

    xWHIP regresses balls-in-play to a 19% line drive rate

  7. Jeffrey Gross said...

    The xWHIP 2.0 calc had a formula error which has been fixed. I am working on tinkering with xIP a little more to account for Outfield Assists and Baserunning Outs (e.g., stretching a single into a double and getting thrown out).

    I will make a new post when I am finished

  8. Will Hatheway said...

    Jeffrey-

    As mentioned, this is really really cool.

    Your last bit reminded me how devastating LDs are, and made me wonder a stupid question: are you implying that LD% is a skill, insofar as—if I am reading this right—your calculator should be predictive of future performance based on actual batted ball data? If so, do you find that it is more effective when considering relievers, since they tend to have more control over such things?

    (Oh, and sort of related, since I won’t be playing fantasy against you anytime soon, I feel free to suggest that for those – such as myself – who actually make broad usage of non-closer relievers, that a super quick and dirty method for predicting notoriously fluctuating year to year RP performance is to use 3-year average +RA, since it accounts for much more control than, say, xFIP).

    Anyway, Cheers!

  9. Jeffrey Gross said...

    @Will,

    No, to the contrary, for pitchers, LD% tends to approach 19% over time. At least thats what I read.

    LD% over the past 8 seasons ranges from 16.7% (plus Fausto’s ridiculously low 14.8%) to 24%. It all oscillates around that league average 19% mark. Guys on the low and high end of this range are not of any specific batted ball type. Derek lowe and fausto have the lowest LD%, but but Horacio Ramirez, Mike Hampton, and Ryan Drese (all extreme GB pitchers) are on the high end. Likewise, Weaver is in the low LD% range too.

    Regarding samples to plug in, I recommend using at least 3-year data (years n-3 thru n-1) if possible. For relievers, maybe Career numbers are required, due to samples.

  10. Will Hatheway said...

    Making Lowe’s career (well, majority of it: 2002-2010) # (16.7%) just crazy… and of course Mo.

    I guess I agree, and so was just curious as to whether LD% should be penciled in as part of predictive formula. I think the answer is that I’m just a bit dense…

  11. Jeffrey Gross said...

    Will,

    you are not dense, the answer is just not so straightforward as yes or no, just “most likely”

    I’ll and try and find some research and post it here

  12. Jeffrey Gross said...

    I am working on a new update to the interface which will not only let you change runs values, as well as the regresed HR/FB% and LD% index, but also feature expected FIP, expected tRA, and expected BABIP-against.

    In other words, if you feel a pitcher’s true HR/FB rate talent for whatever reason is say 7%, you will be able to determine his expected DIPS numbers using a 7% HR/FB%. Likewise if you think your pitcher is a 24% LD% pitcher.

    You will also be able, if you have the data, to change runs-values by season, so you can get the most accurate calculations.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current ye@r *