Wednesday, January 16, 2013

A Simpler Way to WAR (long post)

Since discovering Wins Above Replacement, I've had basically two ambitions:  one, to create an uber-stat which I could use to combine peak and career weight when having a Hall of Fame discussion.  I believe I've already done that with WARSCOR, particularly in its new revision (though it's admittedly much more convoluted than the Hall of Stats or JAWS methodologies).  The second goal I've had is to make calculating WAR a simpler process.  In other words, to be able to calculate it myself quickly and efficiently.  Well, I'm here to say that, while I haven't quite "done it," I've gotten much, much closer.  I now have a very good (and reasonable, I think) way to calculate WAR for offense and for pitching.  Defense, not so much, but that's okay (and we'll explore what that might look like, if there ever were such a thing, at the end of this post).  This is a start.  It doesn't really do that, but it does give you a way to compare offensive players to pitchers by giving them a "won-lost" record which matches up with a pitcher won-lost record - in other words, there are 162 decisions for the pitchers, but also 162 "decisions" for the hitters.

You may recall my last post that I used ERA+ to give relievers a "record."  Well, we're not going to worry about Fibonacci wins like I did in that post (though you'd certainly be welcome to play with them, if you feel like it).  But the rest of the methodology stays the same, pretty much.  Except that now, we're going to be comparing to replacement level.  So, what is a reasonable replacement level?  How about, just picking something out of the air, .310?  If you'd like to use something different, you're welcome to it.  Just follow the same steps, only with a different product side of the equation.  We have to find out that, if a team's run prevention and run scoring are equally bad (compared to average), what would they be for a .310 winning percentage?  The equation looks like this:

           (100-x)^2                     -     31
(100-x)^2 + (100+x)^2           -    100

100(100-x)^2 = 31(100-x)^2 + 31(100+x)^2
69(100-x)^2 = 31(100+x)^2
69(10000-200x+x^2) = 31(10000+200x+x^2)
690000-13800x+69x^2 = 310000+6200x+31x^2
380000-20000x+38x^2 = 0

Solve that equation, and you get (roughly) 20.  Actually, using 20, you get a winning percentage of .307, but that's good enough for me.

So, basically, since we have measures that can tell us how to compare players to average (where 100 is average) that are consistent (if not perfectly linearly related) to run scoring, we can actually tease out individual records from this exercise.  We want to know what a player would be like if he were on an average team.  We could actually do it with a replacement-level team instead, but average will work fine well.

So now, for pitchers, we figure out the record.  It's easy:  divide the number of innings pitched by 9.  This will be the number of decisions.  Then take 10000/(ERA+) [or, alternately, just use ERA-, which needn't be adjusted].  Take this number and insert it for "x" in this formula:

    100^2     
100^2 + x^2

Now, multiply by the number of decisions.  This gives you a number of wins.  You can get "losses" by subtracting wins from decisions, if you felt so inclined.

So, let's look at two pitchers:  Justin Verlander in 2011 (251 IP, 172 ERA+) and Justin Verlander in 2012 (238.1 IP, 160 ERA+).

2011:
10000/172 = 58
100^2/(100^2+58^2)=.748
251/9=27.9
.748*27.9=20.9
2011 Verlander, by this method, "went" 20.9-7.0

2012:
10000/160 = 63
100^2/(100^2+63^2)=.716
238/9=26.4
.716*26.4=18.9
2012 Verlander, by this method, "went" 18.9-7.5

So, let's do hitters.  They're pretty much the same, except that we use OPS+ or wRC+, and we're adjusting the numerator and denominator.  They'll do different things:  wRC+ will include SB and some other offensive events (including sacrifices, double plays, etc.); OPS+ will only consider hitting properly.  But they're basically the same.  Still, I'll show them separately, because they're just different enough to cause a kerfuffle.  For OPS+:

First, we take batting outs (AB-H) and divide by 25.5 to get the number of "decisions."  Then, we just plug like we did last time, with OPS+ standing in for x, but this time, it looks like this:

       x^2      
x^2 + 100^2

Then, we multiply by "decisions."  Here are two hitters, Miguel Cabrera in 2011 (572 AB, 197 H, 179 OPS+), and Miguel Cabrera in 2012 (622 AB, 205 H, 165 OPS+):

2011:
572-197=375
375/25.5=14.7
179^2/(179^2+100^2)=.762
.762*14.7=11.2
2011 Cabrera, by this method, "went" 11.2-3.5

2012:
622-205=417
417/25.5=16.4
165^2/(165^2+100^2)=.731
.731*16.3=12.0
2012 Cabrera, by this method, "went" 12.0-4.4

-------------------
Aside:
I'm gonna take this opportunity to say a word about replacement level.  A replacement level player on an average team will be considerably better than replacement level.  That just makes sense, doesn't it?  Since we're only comparing offense or defense, and making the other average, we will get the overall to be higher than .307, which is what we used as replacement level.  By this method, a replacement level offensive player would be stuck into this formula:

80*80/(80*80+100*100)=.390

A pitcher actually has a different replacement level, for this exercise, since:
100*100/(100*100+120*120)=.410
Personally, I don't see this as any reason to really care, because no one pitches enough innings for this to even make up a full win.  If you feel differently, please feel free to do the math to normalize this discrepancy.  Otherwise, keep in mind that this is just a fun, silly exercise by a person who only took one math class in college.

As you can see, the result is not .307, but .390.  Of course, this means that, comparing, say, 2012 Miguel Cabrera to replacement level, we'd do (replacement level) * (number of "decisions"), and then subtract that number from Cabrera's own wins.  In other words:

.390*16.3=6.4
11.9-6.4=5.5 "Wins Above Replacement"

Of course, there's another alternative.  We could have put Cabrera on a team that gave up runs at a replacement-level rate, and then simply subtracted wins at a rate of .307, our initial rate.  Like this:

165*165/(165*165+120*120)=.654
.654*16.3=10.7
.310*16.3=5.0
10.7-5.0=5.7 "Wins Above Replacement"

I've been working off the first method, but if you were to work by the second method, I wouldn't begrudge you.  It's probably actually a little better.  A little cleaner for the comparison to replacement, anyway.  But it's up to you.
End of Aside
-------------------

Finally, we'll look at what it looks like if you use wRC+, instead of the baseball-reference stats.  We'll use two players:  Ryan Braun in 2011 and Ryan Braun in 2012.  In this method, we look at all the outs the offensive player made, instead of just batting outs.  So the formula looks like this.

First, we figure total outs, by taking batting outs (AB-H), like before, and adding GDP, SH, SF, and CS.  Then we divide that by 27 to get "decisions."  The rest of the formula is identical to the OPS+ version.  So here's Brauny.

2011:
563-187+9+3+0+6=394
394/27=14.6
173^2/(173^2+100^2)=.750
.750*14.6=11.0
2011 Braun, by this method, "went" 11.0-3.6

2012:
598-191+12+5+0+7=431
431/27=16.0
162^2/(162^2+100^2)=.724
.724*16.0=11.6
2012 Braun, by this method, "went" 11.6-4.4

So, there you go.  You can see that we can, pretty easily, produce a "pitcher-like" record for an offensive player.  Obviously, it's not on the same scale quite, since even top players end up with under 20 "decisions," making comparisons difficult.  But it's still fun, I think, to look at.

So now, we get to imagination land.  How would I change this, if I could, to make it more like actual WAR?  Well, first of all, I would want a defensive system.  What we'd need to develop, of course, is a system by which we measured, basically, the number of "plays" that a player made (or perhaps better, runs saved on plays made, or whatever), relative to the expected number for his position, just as we would have for OPS+ or ERA-.  Once we have that number relative to 100, just as we do for other parts of the game, we can determine the number of decisions and then the number of wins.

Of course, it would be silly to have a number of defensive wins and losses that equalled 162, as well as a number of offensive and pitching wins and losses.  So what do we do about it?  Well, for my money, we would divide the offensive number by two, the defensive number by six, and the pitching number by three.  That would give us a much better basis for comparison.  We could actually see this already.  Take Cabrera in 2011 and Verlander that same year.  If we take Cabrera's record in half, we get 5.6-1.8; Verlander's as a third and we get 7.0-2.3.  Those are a lot more comparable, and would be even moreso if we were able to add in Cabrera's defensive wins and losses.  We'd see something much different from what we're used to seeing.

There is, of course, one problem that I must address.  If one were to implement the system I just suggested with, say a shortstop who was slightly below average fielding and hitting (let's say a 99 in each), he would grade out as a below-average player.  However, everyone knows that a shortstop who is basically average defensively and basically average offensively is a HUGE asset.  This is why, perhaps, it would be good in creating a defensive system to compare the runs saved, not to position, but to all positions on the field.  That would make shortstops automatically very valuable, while it would make first basemen very low in value.  But that's just an idea.  As far as I know, there's no such stat out there, so maybe that's another project for me.  But I doubt it.

So, that's my big brainstorm.  If you made it this far, wow.  Just wow.  Because I'm really, really impressed.  It was a ridiculously long post.  But I hope you enjoyed it.  Suggestions?

Thanks to baseball-reference and fangraphs for the stats in today's post!

Wednesday, January 2, 2013

Happy New Year... And Hall of Fame Relievers

It's Baseball Hall of Fame season, which is typically a very active time for me on this blog.  Well, it's been a really, REALLY busy few weeks, so I haven't done as much as I'd like.  But suffice it to say that I'm disappointed that it's likely no one will get election to the Hall this year.  I mean, I'm not the kind of person who says that Jack Morris should make the Hall of Fame.  But here's the thing:  Jack Morris was better at baseball than most people are at ANYTHING, and yet people scream and shout about how he doesn't belong.  Now, if I had a ballot, I would not vote for Morris.  I don't think he's good enough to make the Hall.  But if he did, I'd be very, very happy for him and for all the Tigers fans out there who have seen so many players who are above the Hall benchmark fail to be elected.

But anyway, today, Poz posted an article that discusses the candidates he didn't vote for, but who merit more consideration.  Well, I'm happy to say that one of the sections struck a chord with me:  the section on Lee Smith.  I thought to myself, would I vote for Lee Smith?  Now, with a ballot as crowded as this year's, the answer is "no."  But, if there were unlimited slots, would I?  I don't know.  So, I devised a way to figure it out.

People (like Poz) talk about how saves are too one-dimensional a stat.  I agree.  Especially when we're comparing people to starters (as we do in HOF voting).  So how do we account for this?  I think it's actually pretty easy.

First, we look at only two statistics for the pitcher:  ERA+ and Innings Pitched.  Normally, I'm more of a fan of ERA-, but I'll use the more commonly-known baseball-reference stat (speaking of which:  all stats courtesy of that wonderful site).  And I use Batters Faced for most of the silly little things I do with pitchers, but in this case, IP is necessary.

Anyway, we first convert ERA+ to ERA-, which is easy, and necessary.  ERA+ measures how much higher the league ERA was than the pitcher's (adjusted for ballpark).  What we need to know is the inverse (in other words, how much lower was the pitcher's ERA than the league, adjusted for ballpark).  Here it is:
10000/ERA+
It's that easy.  So we then have that number.  And we'll figure out a Pythagorean winning percentage, based on an average offense.  It looks like this:
100^2/(ERA-^2+100^2)
Now, we have a winning percentage.  Let's keep that in our back pockets.

Next, we take the innings pitched, and we divide by nine.  Why?  Because, roughly every nine innings, there's a decision.  Look at individual pitchers (starters, preferably), if you want.  Divide their career innings by nine.  Usually, you'll find that they have roughly nine times as many innings pitched as decisions.  If that's not good enough proof for you, go ahead and pick a random team in history.  Divide their number of Innings Pitched by the number of Games Played.  You will usually find that the answer hovers between 8.8 and 9.2 - which is good enough for me to just call it nine.

So anyway, we now have a number of "decisions" and a "winning percentage."  Now, just multiply them together.  That gives us a number of "pitcher wins" for these players who usually don't really have those to look at!

This gives us a nice starting point, actually.  But we can go a step further, of course.  We simply take the decisions, and subtract the wins.  That gives us losses, because that's important to know, too.  Then, we use one of my favorite Bill James tools:  Fibonacci wins.  We take:
Wins*Winning%+(Wins-Losses).  This helps us account for both the raw total of winnings, and the percentage of the time the player won.

Anyway, I did this for eleven relievers, who are considered among the best of all-time.  Why eleven?  Because these are the eleven relievers who are either in the Hall of Fame, or I have heard an argument for belonging in the Hall of Fame.  Here they are, presented with their "record," as well as Fibonacci wins (and ordered by the latter).

Hoyt Wilhelm:  171.2-79.2; 209.1
Dennis Eckersley:  209.4-155.6; 173.9
Mariano Rivera:  109.7-25.8; 172.6
Goose Gossage:  123.3-77.7; 121.3
Billy Wagner:  78.0-22.3; 116.4
John Franco:  90.8-47.7; 102.6
Rollie Fingers:  111.6-77.5; 99.9
Lee Smith:  91.0-52.2; 96.6
Dan Quisenberry:  78.9-37.0; 95.6
Trevor Hoffman:  80.5-40.5; 93.6
Bruce Sutter:  75.1-40.6; 83.3

Obviously, this is overly simplistic.  It takes a lot to say that you can boil things down to one number (as much as we all try to do it).  But at the end of the day, when it comes to the Hall of Fame, there are only two options:  in or out.  That's a binary decision.  Binaries are numbers.  So you have to be able to put a number on it.  And this is a pretty good place to start, if you ask me.

As you can tell, innings pitched is skewed for Eckersley because of his years as a starter.  But so what?  He did that pitching, as well.  And when you factor it all in, he's roughly as good as Mariano, which sounds about right to me.  Wilhelm's HUGE number of innings keeps him at the top of the group, which sounds about right to me.  And frankly, I'm not sure if I could vote for anyone below Mariano - the gap seems to be in roughly the 150 Fibonacci win area.

But, back to the topic at hand, which is Lee Smith.  Fingers' induction has been much-maligned by many people.  But seeing Fingers, Wagner, and John Franco atop Lee Smith makes me fairly certain of this much:  I don't think I could vote for him.  He deserves to be remembered, so, like Jack Morris, I would never begrudge his election.  But, also like Morris, I just don't think the Hall of Fame is big enough to include not only Lee Smith, but all of the players who were better or roughly his equal.  I just don't think anyone wants a Hall of Fame with 10 relief pitchers - not yet, anyway.  Maybe in another 50 years, but not right now.  And if Smith is still one of the 10 best relievers of all-time in 50 years, then we can talk about it.  But for now, it's a no.