Wednesday, July 14, 2010

Win Shares and Replacement Level

For those of you who have not seen it, the new site The Baseball Gauge (operated by "Railsplitter") has an impressive database of Win Shares, Win Shares Above Bench, and WAR figures for the entirety of major league history. There are a lot of different ways to view the data and I suggest you check it out.

The methodology used to calculate WAR on that site has been discussed at The Book Blog, and I believe that the method used to figure Fielding WAR is based on a faulty conversion of Win Shares to WAR. It's an easy trap to fall into with Win Shares.

To illustrate the Win Shares replacement trap, I'll focus on Offensive Win Shares (OWS is much more straightforward and easily comparable to other metrics like RAR that Fielding WS), but the principle applies to hitting, pitching, and fielding WS.

Suppose you have a league in which there are 25 outs per game and the average team scores 5 runs per game. An 81-81 team that scores and allows 5 runs per game in this league will get credit for 40.5 OWS (assuming the use of 50/150 as the WS margins rather than 52/152 in the original version, and ignoring James' scalar of "3", which is cosmetic and would only serve to complicate comparisons to other metrics in this case).

Suppose this team has no players who contribute "sub-marginal" runs. Then the Win Shares margin is at 5*.5 = 2.5 RG, and this team will have a total of 2.5*162 = 405 marginal runs, meaning 405/40.5 = 10 marginal runs/win. Suppose that this team has four players whom we are interested in, all making 350 outs. One creates 100 runs, another 80 runs, another 70 runs (which happens to be league average), and the last 57.75 (which is 82.5% of the league average, which is defined as the replacement level in Railsplitter's system).

A marginal player will have 2.5 RG, which is 35 runs/350 outs, so we simply subtract 35 to find marginal runs and 57.75 to find RAR. To convert to Win Shares or WAR, we can divide by 10 runs per win:



So we now know exactly what WAR should be for each player. Can we produce the same results by looking only at Win Shares? Railsplitter's approach would be to find the WS produced by an average player (we know this to be 3.5) and multiply by the replacement level (.825): 3.5*.825 = 2.8875. So, we can subtract that 2.8875 from each player's OWS to get our second WAR estimate (WARx):



As you can see, this doesn't work. The differences between players are constant; Alpha is still two wins better than Bravo, who is one win better than Charlie, who is 1.225 wins better than Eko. But the scale is off; everyone is less valuable than we know them to be. Eko, who defines replacement level, is sub-replacement level. Everyone is .6125 WAR below where they should be.

This happens because we've now taken 82.5% of RC above 50% rather than what the replacement level is supposed to represent--82.5% of absolute RC.

This does not demonstrate that Win Shares cannot be converted to WAR (although it will fail for sub-marginal players if they are zeroed out, which is a feature of the original system but can be waived). It just shows that you have to figure a different percentage other than the one you are using.

Here, we know that the ratio of Eko/Charlie is equal to the replacement/average ratio, and it is 65% (2.275/3.5). How can we calculate this without going through the example?

Take the difference between the replacement level (.825) and the margin (.50), and divide by one minus the margin (1 - .5 = .5). This gives (.825 - .5)/(1 - .5) = .65, which we know is the right answer.

Suppose our replacement level was 70% rather than 82.5%. The replacement level in terms of win shares would be (.7 - .5)/(1 - .5) = .4. A different replacement level player, Foxtrot, would create 49 runs, and as you can see, using 40% as the new OWS replacement values matches WAR for this case as well:



One can convert Win Shares to a measure of value above replacement; you just have to keep in mind that the replacement level will be expressed differently as a ratio of win shares than as a ratio of runs created.

ADDENDUM: I forgot to show you what the actual effective replacement level is when one applies 82.5% directly to OWS. Solve this equation for x:

.825 = (x - .5)/(1 - .5)

x = .9125. Applying .825 directly to Win Shares is the equivalent of a "normal" replacement level of .9125, which is roughly a .455 W%--a very high effective replacement level.

Monday, July 12, 2010

Flavors of Component ERA

The introduction of SIERA has triggered a lot of discussion about ERA estimators in the sabermetric community. This piece does not further that discussion; rather, it takes a step back and considers the choices made in constructing such metrics and sketches out a classification system for them.

I'm under no illusion that anyone is going to adopt the system and start referring to ERC as a ERD or xFIP as a EBS-R. My intent is simply to organize my thoughts on the various constructions and hopefully to prod you to do the same. As with so many sabermetric decisions regarding methodology, the choice of which metric to use is very much dependent on the question you'd like to answer. Hopefully this missive will help to clarify (at least in my own mind) the varying constructions of ERA estimators.

I have chosen four properties on which to base the classification system: what the formula estimates (earned runs or total runs allowed); what inputs the method takes (traditional results, defense-independent, or batted ball data); whether the weights placed on events in the formula are dynamic or static; and whether runs are estimated through a model of the scoring process, linear weights, or regression.

Delving into the properties individually:

1. Earned runs (E) or total runs allowed (T)

A system that produces an estimate in earned runs (or ERA) will get an E code; those that estimate total runs get a T. This is pretty straightforward and needs no further explanation.

2. Result inputs (R), defense-independent inputs (D), or batted ball inputs (B)

Some of the categories used have a bit of overlap; batted ball inputs are defense-independent, but make a more restrictive grouping.

By result inputs, I mean traditional statistics: hits allowed, walks, strikeouts, and the like. Defense-independent inputs remove non-HR hits from consideration. Batted ball inputs can include walks, strikeouts, and hit batters in addition to batted ball types, of course.

3. Dynamic (D) or static (S) weighting

Any fully linear formula is static; any formula that involves interaction (to use SIERA's term) between events is dynamic. Generally, dynamic formulas in this category will be any that use a dynamic run estimator like Runs Created or Base Runs as its foundation, although there are two notable exceptions, both from Baseball Prospectus.

4. Regression-based (R)

As I describe it above, this category would cover whether the run estimator used was model-based (like RC, BsR, Markov models, etc.), used linear weights, or used regression. As such, it obviously would largely repeat the property of the metric covered by the third criteria. Additionally, regression is not a mutually-exclusive category, as both models and linear weight formulas could be at least partially regression-based. So instead, I'm just going to include a "-R" at the end of the classification for formulas that are regression-generated.

This is not intended to be a scarlet letter of any kind, but I can see where some readers might get that impression. I just think it is helpful to have a further understanding of where event weights are coming from and to distinguish between methods that get their dynamism from the run estimator used and which get it from conscious choices of the creator to add interactive terms--distinctions that would otherwise be glossed over by this classification system.

Now, I'll consider several component ERAs in common use in the sabermetric community and explain how this scheme would classify them. It is not intended in to be comprehensive in any way; it includes some of the most commonly used metrics and some that help to illustrate the shortcomings of my classification system:

Bill James' Component ERA: ERD

Component ERA estimates earned runs; it uses results (hits, walks, strikeouts, home runs, and the like) as its inputs; and it is based on a dynamic model of run scoring (Runs Created).

As you can see when it is put in practice, this classification system does not make any sort of judgment on the utility of the metric. I don't care for Runs Created, but it is still a dynamic run estimator. Any sort of result-based ERA estimator I'd propose would be based on Base Runs, but would still get the same "ERD" classification.

Tango Tiger's FIP: EDS-R

FIP is an earned run estimator that does not include non-HR hits and uses static weights (with a floating constant). The coefficients logically coincide to linear weights, but were regression-derived so I tack on the "-R" at the end of the code.

My own eRA: TRD & dRA: TDD

These two are "my own" only in the sense that I defined a specific name, formula, and abbreviation for them--otherwise, they simply use Base Runs to estimate RA, one using actual results and one assuming that balls in play become hits with the league average frequency and severity. No innovation on my part, just applying David Smyth's run estimator and Voros McCracken's theory. I have always preferred to look at total runs allowed rather than earned runs, and so I constructed metrics to estimate RA, using my preferred run estimator.

Dave Studeman's xFIP: EBS-R

xFIP illustrates a shortcoming of the R/D/B descriptions, as it only uses one batted ball component (league average for HR on FB), but I've included it in a group with other metrics that use multiple batted ball categories.

Graham MacAree's tRA: TBS

tRA is one of the rare metrics that estimates total runs allowed. It does so by considering all batted ball types at their actual linear weight values.

Peter Jensen's DIRVA: TDS

DIRVA is expressed in terms of runs above/below average, so it's not really an ERA/RA estimator in that form, although of course it could be converted into such.

Jensen's method also differs from many others here because it uses the actual play-by-play sequence. A pitcher's DIRVA is his run value prevented (based on the RE table) for defense-independent events, minus the run value prevented on defense-independent events for an average pitcher in the same number of innings. If you don't understand that sentence, that's because it's not very well written--please go read Jensen's explanation which is infinitely more coherent.

What makes DIRVA unique is that it considers sequencing, something that the other metrics ignore by estimating runs from scratch rather than taking advantage of play-by-play data. This property is not reflected in its code, and static is a questionable description of the weighting--the weights are static in that they are derived from a fixed RE table, but the weight of any given walk will depend on the base/out state in which it occurs, rather than the value of a walk being a constant as it is for other methods tagged with the "S" for static.

Nate Silver's Quick ERA: EBD-R

and

Matt Swartz and Eric Seidman's SIERA: EBD-R

Both metrics from Baseball Prospectus estimate earned runs using batted ball data with dynamic weighting based on regression results. Neither metric considers the complete spectrum of batted ball types--Silver only considers groundballs and Swartz and Seidman use the term (GB-FB-PU)/PA based on their research on the persistence of line drive frequency and the creators' belief that popups might well turn into flyballs in the future.

I've written a little bit about SIERA before, but the point I want to make here is that the "interactivity" which is one of the main selling points is not unique. The specific implementation of interactivity is--SIERA only looks at certain interactions (strikeout rate with itself, grounders less flies and popups per PA with itself, strikeouts, and walks). But interactivity itself is present in any metric based on a dynamic run estimator.

Consider an estimator based on Runs Created, which has a numerator of (H + W)*TB. Of course, that can be broken down further into:

(S + D + T + HR + W)*(S + 2D + 3T + 4HR)

If you foil that out, you get:

S^2 + 2SD + 3ST + 4S(HR) + DS + 2D^2 + 3DT + 4D(HR) + ....

There's interactivity everywhere. Every term in the A factor interacts with every term in the B factor. Of course, you might not actually want all of that interaction. Base Runs (and RC) work by homogenizing baserunner's starting locations, assuming that the score rate is constant regardless of whether a runner starts at first, second, or third. Obviously, that is false, but if you tried to work around that you would have a mess on your hands, and you would lose the benefit of using a formula rather than a more involved method like a Markov model.

The other thing that makes SIERA's interaction unique is that it is a regression equation; a lot of analysts just run linear regressions that don't include any interactive terms.

There's a lot more that could be written on this topic, specifically which class of methods is appropriate dependent on the purpose it is being used for and the emphasis placed on correlation with future ERA. A lot of that is squarely in the realm of opinion, though, and I'll spare you my thoughts for the time being. I believe that having a clear understanding of how each metric operates is a necessary first step in sorting through those more philosophical questions.

Sunday, July 04, 2010

Thursday, July 01, 2010

More on LL Bean's Scoring System

Henry from Bean's was kind enough to send me some material that their PR department has on LL Bean's scoring system, so this time you'll actually get to read a little more about the original rather than my interpretation of it.  Here is his description of the material:

[T]hey have about a half-dozen of these scorebooks, all used by LL.  I've attached some high-res scans.  The most interesting is the Sox Yankees game that LL scored -- not actually a consequential game, I checked BR and the Sox were out of it in 62, but it's cool that at age 90, he stayed and scored through the end.

Actually, now that I think of it, I wonder if age wasn't part of the 'easy to score at night' thing, in which case it makes a little more sense -- a system of scoring like this would make sense for someone older who was having trouble seeing / writing.  The scorebook itself would have been something that, published in 1954, LL put out when he was 82.  To your point, he was a pretty impressive guy.

Only other point of trivia was that apparently he also created a scoring system and published a scorebook "especially adapted for Official Little League Baseball"., of which he was a big supporter -- he put a field right on our corporate campus that's still there and still in use.


I have attached two of the scans that Henry sent me.  One is of the aforementioned Yankees/Red Sox game, and the other is a key of Bean's codes that was included in the scorebooks.  Here is the link to the Retrosheet PBP of the Yankees/Red Sox game, in case you'd like to interpret Bean's scoring.



The Yankees won 1-0 on July 17, 1962 with a run in the eighth inning generated by the bottom of their lineup: Lopez, Boyer, and Tresh all singled.  Mickey Mantle flew to center, drew two walks, and singled to right.  The most notable future name in the Sox lineup, then just in his second season, Yaz hit into a double play (hard to make out on Bean's scorecard--I checked the Retrosheet account), struck out, grounded to second, and tripled to center.  The triple to center led off the ninth, but Boston was unable to push him across as Malzone grounded to short, Runnels flew to center, and Clinton grounded to third.

And the scoring key:



Many thanks to Henry and the Bean company for sharing this material.

Monday, June 28, 2010

Keeping Score With L.L. Bean

In The Joy of Keeping Score, Paul Dickson describes a number of novel scorekeeping systems that have been developed over the years. One, to which he gives particular attention because of the notoriety of the developer, is a system devised by L.L. Bean, and published in 1954 in a scorebook billed as "L.L. Bean's Simplified Baseball Scoring".

Unfortunately, all that I know about this system is taken from Dickson's book. It's hard to track down a copy of a scorebook from 1954--it's not the kind of book that is usually available from libraries, and while I'm sure one pops up on EBay from time-to-time, my interest is not up to the hassle and resources that would be required to acquire one. In any event, Dickson describes enough of Bean's system (including reprinting one of Bean's example games) to implement at least a crude approximation of it.

Bean was right; his system is simple. It doesn't allow for tracking the process of runners around the bases and in some cases it doesn't identify the specific fielders involved in recording an out, or even making an error. A walk is simply "W", an error "E". A hit is a line with a dot on the end in the direction of the hit, and numbers (2, 3, 4) to indicate the number of bases it was worth. This is the only place where numbers appear in the scoring.

The main symbol for an out is a circle. Groundouts are marked with a line in the direction of the baseman who made the play. A groundout to third thus has a line drawn from the center of the circle to a west compass direction. A groundout to first is the opposite; groundouts to the middle infielders have lines that intersect the circle near the top.

Flyouts are indicated by solid dots around the circle, so a fly to center is marked with a dot above the circle, centered. Flies to left and right have dots off to the side, while a popup to pitcher would have a dot directly in the center of the circle. The boundaries of the circle sort of represent the boundaries of the infield.

That covers most outs; strikeouts are marked with a small, unfilled dot in the center of the circle, while double plays just have a capital "D" in the center of the circle.

The cover of Bean's scorebook brags that it is "especially adapted for night scoring". This is a wonderful anachronism; apparently in the early days of night baseball, L.L. Bean felt that the light was not bright enough to take down detailed notes on a game. I wonder if this was a personal idiosyncrasy, or a common complaint of 1950s baseball fans.

Bean's system really doesn't do much for me, personally, but scorekeeping is an intensely personal pursuit, and it might be something that interests others. It's a visual system, and a pretty decent one at that; the little pictures with circles, lines, and dots that you draw for outs do a pretty good job of representing the play. The sheet is not cluttered with all manner of numbers and letters as a Project Scoresheet scoresheet or a detailed traditional scoresheet will be.

On the other hand, it just leaves out to many details for my taste, even to use on occasion as a lark. I can't bring myself to just ignore whether a groundout to first was unassisted or whether it was a 3-1. I can't just mark down a double play without noting whether it was 363, 543, or unassisted by the first baseman on a line drive, and I can't go without noting how runners advance around the bases.

So I worked up a compromise system, using Bean's symbols, and used it to score a spring training game between Boston and Minnesota (I've actually been using it on rare occasions for a couple years now, but this is the game I scored to serve as the example here). I marked the number of bases on a hit as I normally do, by using the appropriate number of dashes (one for a single, three for a triple, etc.), but in order to avoid letters or numbers I marked the location of the hit with a solid dot. If the dot is on the left side of the dash, the hit was to left; on the right side, to right. If the dot was on the dash, it was a line drive; below the line for a groundball and above the line for a flyball. For extra base hits, the line drive dot is worked in between the lines--there's no reason to draw the dot over a line when you already have multiple lines. Infield singles are marked by a "+" with a dot in one of the quadrants formed indicating the direction the ball was hit (lower right = first base, upper right = second base, upper left = shortstop, lower left = third base, bottom = catcher, middle = pitcher).

I marked outfield and middle infield foulouts with a "`" mark and line drive outs with a dash rather than a solid dot. Infield foulouts to catcher, first, and third are marked by drawing the appropriate solid dot on the outside of the circle rather than on the border of the circle. Any sort of out made on the bases was so indicated, but circled so that the circle stands as the universal symbol of an out throughout the scoresheet.

I stuck with K and backwards K for strikeouts, but written within the universal out circle. For groundouts with unusual or unimplied putout/assist strings (like 31 or 41), I marked them as one would mark a normal groundout to the initiating fielder, then put the numerical clarification inside the circle. If a sacrifice was credited on a play, I also noted this inside the circle.

Here is the sheet, and the written description for each plate appearance for each lineup slot which can serve as a key:


BOS #1: fly to left, strikeout swinging, infield single to first, fly to right, strikeout swinging
BOS #2: strikeout swinging, flyball single to center, groundball single to left, fly to center
BOS #3: fly to right, groundball single to left, line drive single to left, flyball double to right
BOS #4: strikeout swinging, popup to short, 363 double play, groundout to first (unassisted)
BOS #5: groundout to short, line drive double to right, flyball single to left, groundout to short
BOS #6: fly to right, fly to left, fly to center, strikeout looking
BOS #7: strikeout swinging, hit batter, foul pop to short, strikeout swinging
BOS #8: line drive to short, fielding error by shortstop, strikeout swinging, grounder to short
BOS #9: strikeout swinging (completed 23), walk, flyball single to center, infield single to second

MIN #1: walk, groundout to short, walk, groundout to short, strikeout swinging
MIN #2: flyball double to right, fly to right, 163 double play, fly to center, fly to right
MIN #3: walk, fly to right, walk, fly to left, groundout to first (unassisted)
MIN #4: fly to center, walk, walk, fly to center
MIN #5: line drive double to left, flyball single to right, sacrifice fly to left, groundout to short
MIN #6: line drive to third, groundout to second, walk, fly to left
MIN #7: foul pop to catcher, flyball single to right, strikeout swinging, fly to center
MIN #8: strikeout looking, pop to short, strikeout swinging, fly to center
MIN #9: fly to right, walk, foul pop to first, fly to center

Sunday, June 27, 2010

Great Moments in Yahoo! Play-by-Play



I didn't realize trading players to your opponent in the middle of a non-suspended game was permitted.

Great Moments in Yahoo! Box Scores



Perhaps they just didn't believe that Josh Wilson started at first base, or wanted to spare the rest of us that knowledge.

Thursday, June 17, 2010

New Coach: Greg Beals

Ohio State has hired Greg Beals to replace Bob Todd as head baseball coach. Beals is a forty-year old 1995 graduate of Kent State and spent three years (1991-93) in the Mets system as a poor hitting catcher (.250/.334/.311, all in A ball). He became an assistant at his alma mater and obtained a master's degree before taking the head coaching position at Ball State in 2004, where he replaced Rich Maloney. Maloney had left BSU for a certain school of questionable repute in Ann Arbor.

Beals led Ball State to its first NCAA appearance since 1969 in 2006, and his program has produced a number of high draft picks including Red Sox 2010 first rounder Kolbrin Vitek. He will now inherit a Buckeye programming coming off a disappointing season, and losing a lot of talent to boot. Of course, he also inherits the support of one of the wealthiest athletic departments in the country, and one which is as committed to baseball as any northern program.

Since Beals began his coaching tenure in 2004, it might be worthwhile to examine the record of his BSU program as compared to those of the Big Ten schools and the MAC's top dog, Kent State. Here are the team's places in the ISR rankings, published by Boyd's World, for those twelve schools over Beals' tenure:



And the average rankings:



A couple points based on these figures:

1. OSU has ceded its top dog status in the Big Ten to the forces of evil over this period, but contrary to the belief of some critics of Bob Todd, the program clearly stands in the conference elite. Minnesota may have won more conference titles over this span (the Buckeyes took just one regular season title in 2009), but OSU's overall annual record is quite comparable with that of the Gophers. None of the other seven baseball-playing Big Ten schools (sorry Nebraska, you don't count yet) come close to OSU, MIN, and those other guys.

2. Some other people seem to think that Kent State is the state's premiere baseball program. That's not the case either. KSU did compile a better ranking in three of the seven seasons, but OSU had three seasons with a higher ranking then KSU's best (sure, one was by only two spots, not a significant amount, but then OSU's fourth-best performance was only two spots behind KSU's best). KSU has produced more pro players, but that is an inappropriate measuring stick for a college program.

3. Beals' record at Ball State is solid but unspectacular. Ball State has not challenged Kent for MAC superiority, but their overall performance is comparable to that of an average Big Ten program. While the gap between resources available to Big Ten and MAC programs in baseball is relatively small, it's still encouraging that Beals could assemble the same quality of teams at OSU that he did at BSU and hold his own. However, it is discouraging that his two best seasons came shortly after inheriting the program from Maloney.

Obviously, it is not my intent to evaluate the hire based solely on a crude ranking comparison of twelve programs. However, the comparison does nothing to move me off my gut reaction when I read last night that Beals' appointment was imminent: solid, safe, underwhelming. Underwhelming is not meant to be a negative reaction, just to convey my lack of excitement beyond what I usually exhibit for Buckeye baseball--which is fairly substantial. I wish Coach Beals nothing but the best, as there is no baseball team on the planet that I have more emotional investment in than that of The Ohio State University.