Wednesday, July 21, 2021

Rate State Series, pt. 8: Rate Stats for Linear Weights III

This installment will tie up a few miscellaneous loose threads pertaining to rate stats to be used within a linear weights framework. The first relates to R+/PA, which I demonstrated is a “correct” rate stat to be used in this framework; I prefer it to RAA/PA, which produces identical linear differences between players, because it can be meaningfully compared on a ratio basis as well.

One issue with R+/PA for users is that R/PA is not a quantity that most people have intuitive feel for. We could still use RAA/650 PA, or we could use R+/650 PA, or we could convert R+/PA to a “team game basis” (along the lines of the previously discussed runs/25.2 or runs/27 outs) by multiplying by the league PA/G, or a long-term average thereof. As long as it’s a scalar multiplier consistently applied, there’s no real distortion imposed on the results – it’s just a matter of user preference as to which scale should be used.

A thornier issue is the implications of RAA/PA or R+/PA for teams. I have encountered sabermetricians for whom I have a great deal of respect whose ideal rate stat would be equally applicable to individuals and teams. I do not think - for reasons that were discussed earlier in this series - that this is possible. Of everything I’ve asserted in this series, I’m most confident that R/O is the proper rate stat for teams. Applying it to the normal range of major league players causes distortions, which while not disastrous are  too frequent for me to just ignore.

Let’s look at all of the teams in the 1994 AL through these rate stats. For this exercise, we can greatly simplify the calculation of R+/PA – we don’t need to estimate extra PA, we know exactly how many PA each team has generated. We can also calculate RAA simply by using R/O. While we could always look at the number of runs a given run estimator produces for a team, it is also cleaner to just use actual runs scored:


In this case, the rank order using R/O and R+/PA is the same – this does not have to be the case, and I’m a little disappointed it worked out this way as it would have been nice to have a real-life example from this league-season. Again, the fundamental reason why plate appearances are not the correct rate state denominator for teams is that since team plate appearances are solely a function of team OBA, it is of no consequence how many plate appearances they need to produce the same R/O rate as another team. An offense that every inning produced four walks and three outs would score 1/3 R/O, the same as a team that every inning produced one home run and three outs, but the former would score .167 R/PA and the latter .250. In a league where the average team scored 1/6 R/O and .123 R/PA, each would get .5 RAA per inning, but the former would have a R+/PA of .194 and the latter .248.

To make the point again, if we use actual team runs scored or an estimate of team runs created as the starting point for a team rate stat, there is no need to attempt to measure the impact of their PA generation. In fact, making an additional adjustment would be inappropriate double-counting. The team’s totals already incorporate this impact, as the team’s actual plate appearances were a function of their on base average.

What if someone decided they wanted to construct a rate stat that didn’t include any subtraction in the numerator, and instead would just be a positive quality per plate appearance? If you follow this path, you will no longer have a final result expressed in a unit of runs, but perhaps due to your desire for a different scale this is preferable. Or maybe you want a rate stat that can never assume a negative value, as any stat that has a negative linear weight coefficient for an event has the potential to do; as we’ve discussed, even our absolute runs variant of linear weights will produce negative values for pitcher-level hitters. Maybe you want to make one of these alterations and them impose a different scale for some reason.

One way you could do this is to eliminate outs from the LW_RAA/PA equation. If you just ignore them, you will distort all of the values, and be left with a rate stat that is not only unitless, but also is just plain wrong. However, recognizing that outs are simply the complement of the events with the positive coefficients (since we’ve restricted our list of events to mutually exclusive and exhaustive components of plate appearances given our simplified definitions of terms for this series), we could rectify this by just subtracting the absolute run out value from each positive event. To put this in practice, start with our LW_RAA/PA equation:

LW_RAA/PA = (.5069S + .8382D + 1.1695T + 1.4970HR + .3495W - .3150(outs))/PA

Now we will subtract -.3150 from each of the events in the numerator that comprise the complement of outs (again, in this case this is all of the other variables in the numerator) to get a rate stat that for the moment I will call U (for “unitless”, although it’s really just for ease of reference) :

U = (.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W)/PA

This looks weird, since these weights are no longer in units of R or even R+, but what value does it take on for the league average? By definition, LW_RAA/PA for the league is zero, so this resolves to zero for the league:

LW_RAA/PA = (.5069S + .8382D + 1.1695T + 1.4970HR + .3495W - .3150(outs))/PA 

The manipulation we did to get U was just to subtract -.3150*PA from everything, so:

(.5069S + .8382D + 1.1695T + 1.4970HR + .3495W - .3150(outs) - (-.3150*PA) )/PA = (0 + .3150*PA)/PA = .3150

So the league average of U is by definition equal to the negative of the outs coefficient (.3150 for the 1994 AL). So what happens if we compare a player’s U to the league average?

(.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W )/PA – LgU 

multiply U by PA/PA to get

(.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W)/PA – (LgU *PA)/PA

= (.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W – LgU*PA)/PA

plug back in that LgU = .3150 in our case to get:

(.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W – .3150PA)/PA

If we distribute the -.3150 to all of the events already in the numerator that are plate appearances, then the leftover PA are outs, and so we are left with:

(.5069S + .8382D + 1.1695T + 1.4970HR + .3495W - .3150(outs))/PA

So U - LgU = LW_RAA/PA. Even though the coefficients have been manipulated into unitless, non-negative values, U maintains the necessary condition to be a proper rate stat for a linear weight framework because it produces the correct RAA/PA.

Why would someone want to express an equivalent to RAA/PA in these terms? This is not a question that I am qualified to answer, since I don’t personally use this form – but there’s a decent chance that you, as a consumer of baseball analysis circa 2021 have been exposed to it, whether you realize it or not. 

Since U is now unitless, one might wish to manipulate it in order to put it on a scale that they find useful, perhaps the scale of a fundamental statistic. If you think about what U is, the numerator includes all on-base events, weighted by their run value – the RAA out coefficient. The denominator is just plate appearances. There is a fundamental statistic that we have been using throughout this series that takes a similar form, except instead of weighting the on-base events, it gives them all an equal weight of one. The fundamental form is the same though:

U = (.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W)/PA

other stat = (S + D + T + HR + W)/PA

The other stat is of course On Base Average. If one were to tweak the numerator coefficients for each event in U, it could be put on the same scale as OBA, but instead of giving each on-base event a weight of one, it would give each on-base event a weight based on its run value. It would be a weighted On Base Average. Enter Tom Tango and wOBA, which is now one of the two most ubiquitous rate stat in general sabermetric use thanks to its prominence at Fangraphs (with the other being OPS+ thanks to Baseball-Reference).

In order to convert what I have called U to wOBA, we just need to multiply it by the ratio between the league OBA and U, or equivalently the ratio between the league OBA and the negative of the LW_RAA out coefficient. For the 1994 AL, the average OBA was .3433 and U is .3150, so the ratio is 1.0896 (I will define V = LgOBA/LgU just for ease of writing formulas) which produces:

wOBA = U*V = (.8219S + 1.1533D + 1.4846T + 1.8210HR + .6646W)/PA*1.0896

wOBA = (.8956S + 1.2566D + 1.6176T + 1.9744HR + .7241W)/PA

I think there is a lack of understanding among even engaged consumers of sabermetric analysis as to what wOBA actually represents, and how it relates to linear weights. I admit that even as someone who is deeply interested in anything related to run estimators or rate stats, as I don’t actively use wOBA, I have to remind myself why it works. I have fielded multiple email questions from people who obviously think much more deeply about the construction of metrics than the average consumer, and they don’t know the connection and don’t find it intuitive.

I don’t consider this is the fault of Tango, who has explained this. Dave Studeman has written a good article explaining this. But for whatever reason it feels like a secret despite the best efforts of the people who are responsible for it.

So I will take a second here and spell out the relationship between the wOBA family of metrics, which includes wOBA, wRC (Weighted Runs Created, which will be equivalent to what we called R+), and wRAA (Weighted RAA, which is equivalent to LW_RAA), and R+/PA and LW_RAA/PA as we’ve discussed in this series. Keep in mind that I am speaking generally about these relationships using the metrics as I have defined them in this series, and not specifically about the implementation at Fangraphs or anywhere else, although the basic relationships hold. Some of the algebraic demonstrations can be simplified.

If you wish to convert wOBA into RAA (which Fangraphs would call wRAA), we’ve already demonstrated that we can compare U directly league U, so when using wOBA instead of U you just need to remember to remove V:

wRAA = (wOBA – LgwOBA)/V * PA

To calculate wRC (which will be equivalent to R+),  you need to add in the league average R/PA times the batter’s PA:

wRC = wRAA + LgR/PA*PA = (wOBA – LgwOBA)/V*PA + LgR/PA*PA = ((wOBA – LgwOBA)/V + LgR/PA)*PA

wOBA can be easily converted to wRAA/PA, which is equal to LW_RAA/PA:

wRAA/PA = LW_RAA/PA = (wOBA – LgwOBA)/V

and since R+/PA = LW_RAA/PA + LgR/PA, we can also write:

R+/PA = (wOBA – LgwOBA)/V + LgR/PA

Let’s run a leaderboard using the “w” stats, although we’ve already seen most of these values in different guises:

Personally, I prefer R+/PA to wOBA as a rate stat, as the former is directly comparable both as a difference and a ratio, while the latter has to be manipulated in order to be compared either way – both differences and ratios of wOBA have no intrinsic meaning. However, the advantages of having a scale similar to that of OBA, where no negative values are possible, where each event has a clean positive weight, and the “natural” denominator of plate appearances is used. Tango et. al. also took advantage of its structure to more easily apply statistical techniques in The Book, so there are certainly reasons why a user might prefer it, and it is well-constructed by which I mean that the scaling does not cause issues for derivative metrics as long as you know how to account for it.

Finally, the third loose thread I wanted to address in this post. Prior to introducing wOBA, Tango developed a rate stat version of linear weights he called Linear Weight Ratio. It was somewhat conceptually similar to wOBA in that it sought to eliminate the negative weight for outs. Instead of adding the out value to the positive events in the numerator and thus being able to dispense with the negative value of the out as is the case for wOBA, LWR was constructed by making outs the denominator. In order to make the relationship between the positive events more clear, the value of a single was fixed at 1.0, with the coefficients for the other events defined as the ratio of the LW value for the given event to the LW value for a single. If you let the LW value of a single be s, a double be d, etc., then the formula for LWR is:

LWR = (s/s*S + d/s*D + t/s*T + hr/s*HR + w/s*W)/Outs

Which for our 1994 AL weights of  .5069S + .8382D + 1.1695T + 1.4970HR + .3495W becomes:

LWR = (S + 1.6536D + 2.3072T + 2.9532HR + .6895W)/Outs

If we define “x” as the absolute LW value of the out (-.1076 in this case), there are some very straightforward relationships between LWR and LW_RC/O:

LW_RC/O = s*LWR + x

LWR = (LW_RC/O + x)/s

If we define “y” as the average LW value of the out (-.3150 in this case), we can define similar relationships between LWR and LW_RAA/O:

LW_RAA/O = s*LWR + y

LWR = (LW_RAA/O + y)/s

Of course, LW_RAA is the building block for our “correct” rate stat (be it LW_RAA/PA, R+/PA, or wOBA) for the linear weights framework, so you could with some additional algebra convert LWR to those, although LWR sans manipulation does not meet the differential or ratio comparability standards. 

1 comment:

  1. Terrific stuff, glad to see everything laid out so well in one place

    ReplyDelete

I reserve the right to reject any comment for any reason.