From: drw3l@delmarva.evsc.Virginia.EDU (David Robert Walker)
Subject: Equivalent Average: How To (Long, Technical)
Organization: University of Virginia
Distribution: na
Date: Mon, 12 Oct 1992 20:29:14 GMT

                  *******  WARNING *******
The following is a long and technical post describing a numerical
procedure called Equivalent Average. It attempts to measure the
total offensive value of players and teams, in a similar manner as
Runs Created. 

I use it preferentially for several reasons:
1) I developed it.
2) Its accuracy at measuring team runs is better than linear weights,
   runs created, OPS, OTS, total average, etc., over the 20th century.
3) The scale of EQA is similar to the scale of batting average, making
   the expression comprehensible without learning a new scale.
4) It measures the lineup, or marginal, value, as opposed to the
   individual value (i.e., the effect of one player's stats in a lineup
   of average players, rather than a lineup of nine of that player.)

Clay Davenport

Calculating Equivalent Average 

Abbreviations
EQA: Equivalent Average
EQR: Equivalent Runs
LgEQA: League Equivalent Average
Lg before anything: League value of that (LgAB= League at-bats)
K1: Per at-bat proportionality constant (~2.1)
K2: Per out proportionality constant (~3.1)
PF: Park Factor
EPEQA: Effective Park-adjusted EQA; EQA, normalized to league
       and corrected for park (pronounced ep'-uh-ka)
EPER: Effective Park adjusted Equivalent Runs (pronounced ep'-er)
AB: at bats
H: hits
TB: total bases
BB: walks
SB; stolen bases
CS: caught stealing
R: runs
^: raised to the power of
*: multiply by
/: divide by

The calculation of EQA comes in several steps:

1) Calculate RAW average

RAW=(H+TB+BB+SB)/(AB+CS+ SB/3 + 2/3*BB)/3

If AB were the only thing in the denominator, this formula would
be equal to 2/3 BA + 1/3 Secondary Average. This is the historical
origin of the formula, and I give Bill James full credit (blame?) for
getting me started. This explains the /3 at the end; it is an artifact
which I have retained because it is cosmetically useful (as I'll 
explain later).

2) Define LgEQA=LgRAW.

          K1=LgR/LgEQA^2/Lg(AB+BB)

          K2=LgR/LgEQA^2/Lg(AB-H+CS)

These figures apply to everyone in agiven league and year. Calculate
them once and retain them.

3) RAW produces a number of about .235 for an average player. If used in the
EQR formula, it would tell you how many runs a league which had that set
of statistics would score. It is more technically correct to know how many
runs a player adds to a group's total runs. You could calculate the EQR
for some group, like the whole league; then subtract the individual's
numbers from the group; calculate the EQR for this set of data; and say
that the player's value is the difference between the two. I call this
difference the lineup value of a player; others on this note express
the same idea with the term marginal value, and in the interest of
conformity I will adopt that term. The marginal value is always less than
or equal to the individual value; the difference increases as the 
players productivity rate differs from the league. Fortunately, the
effects of the procedure described above can be estimated with high
accuracy by the following formula:

mRAW= LgEQA* sqrt( 2*(RAW/LgEQA) -1)   if RAW>LgEQA/2
    =-LgEQA* sqrt(1-2*(RAW/LgEQA))     if RAW<LgEQA/2

Or, in one line:

mRAW=LgEQA*[(sqrt(abs(2*(RAW/LgEQA)-1)^(3/2) ]/(2*RAW/LgEQA-1)

mRAW is the marginal RAW score; a RAW score corrected for the lineup
effect. 

4) EQR is analagous to Runs Created, except, as noted, that it has been
corrected for lineup value. The formula is

   EQR = mRAW^2 * K1 * (AB+BB)

Any score above 100 is good. The scale of EQR is simialr to the scale 
of RBI. It is a measure of total production; as such it is heavily
influenced by playing time.

5) When comparing players, I beleive that the measurement of productivity, 
or rate of production, should be on a per out basis. This is a subjective 
decision on my part, but thats the way I do it. The final step produces 
the value of EQA which I report:

   EQA = sqrt( EQR / (AB-H+CS) / K2)

6) Steps 6-8 apply only for historical work, to make comparisons
across different seasons. This is how I defina a park factor:

   X= [(R+RA)/G, home]/[(R+RA)/G, away]    

I use one year of data for determing X. Others are welcome to use more.

   PF = 1/G * (HG*X + AG* (N-X)/(N-1) )

In these equations, G is team games, HG and AG are home and away games, 
and N is the number of teams in the league. When home and away games are
equal it become 1/2*(X+(N-X)/(N-1)). I make the implicit assuption that
the player had the same home/away split as his team. (Unfortunate
but necessary).

A philosophical aside here: park adjustments do NOT tell what a player
"would have done" in a neutral park. They are like an exchange rate.
Runs have different values in different parks; PF measures that
difference. Applying PF to EQR in a given park just inflates or
deflates those runs, to give all parks the same average value. If
you keep your run production the same, while everyone else is 
losing 10% off theirs, that is equivalent to a 10% increase in your
value. I beleive that some types of players, especially walk-and-steal
players, are less affected by parks than most players. Thus their actual
value is the same in any park, but their relative value increases in a 
pitcher's park and declines in a hitters park.  

7) EPEQA = EQA * .235/LgEQA / sqrt(PF)

This translates the EPEQA into a league with a .235 EQA, which is
close to the major league average since 1920, and a neutral park.
For any league with a DH, the LgEQA should be multiplied by .975. 
(Assuming DH increases offense by 5%. So, league without DH has
.95 the runs of a league with DH. The square root of .95 is .975; since
runs are proportional to EQA squared, (.975*EQA)^2= .95 EQR.

8) EPER = EPEQA^2 * 3.1 * (AB-H+CS)

By calculating EQR based on outs, rather than plate appearances,
comparisons between high-OBA leagues and low-OBA leagues are more
equal.

A couple of notes:
1)The proportionality constants K1 and K2 are not similar to the
OUT value of linear weights. They are primarily a function of errors,
as well as other things like balks and sacrifices that contribute to
runs or outs but are not included in the calculations. In particular,
they do not depend on the offensive level of the league. They exist
to make certain that LgEQR exactly equals LgR.
  When I test how well EQA measures team runs, against RC for instance, I
create a proportionality constant for RC, defined as LgR/LgRC. For
RC this is close to 1; thats why it is usually ignored. But it does exist
and it does vary. For the AL 1970-90, the Rc adjustment varied from 1.029 
to .994, mean 1.009, standard deviation .000921; the stddev was
.91% of the mean. Over the same period, K1 varied from 2.122 to
2.062, mean 2.090, stddev .0176; stddev was .84% of mean. 
  You can make decent estimates for the last ten years by assuming
constants of .230, 2.1, and 3.1.

2) The final value of EQA and EPEQA have a similar scale to batting
average, except that the mean is ~20 points lower. In particular, the
record performances are close to the batting average records: Ruth has
a .377 career EPEQA, while Mantle '57 scores .433 for a single season
record (just ahead of Ruth '20, .4333 to .4327. Williams '41 is .4288.)
A typical league-leading figure is .350. It is this appealing 
correspondence between the two that makes me keep the /3 in the formulas. 

3) Comparing EQA to RC and LW over the 20th century, EQA wins in a walk.

1901-90, AL and NL   root-mean-square errors
EQA                     23.58
LW                      24.52
RC                      24.90

I followed the LW and RC instructions as closely as I could, with
the following rules. 
a) Given data: league R; for all teams, AB, H, DB, TP, HR, BB, SB,CS.
b) One formula for entire period. League constants are allowed,
   provided they are defined by a single formula.
  (IE: Can't use one formula for 1901-18 and another for 1919-90)
c) Raw data from Total Baseball I.

Formula for EQA: as described
Formula for RC: (H+BB-CS)(TB+.52SB)/(AB+BB) * LgR/LgRC
Formula for LW: .47H+.33DB+.55TP+.93HR+.33BB+.3SB-.6CS-(AB-H)*X
   X is set so that LgLWR=LgR. It is equal to the value of out
   as Palmer would calculate it (which gives LgLWR=0), plus the
   value of runs per out. It comes out to about .1, most years.

Incidental note: if you always set X to .1, and calculate a new
proportionality constant, which multiplies the entire equation such 
that LgLWR=LgR, accuracy goes up. In fact, it goes to 23.55, very 
slightly ahead of EQA. Does Pete Palmer know this?

I will happily supply the fortran code I used to calculate these, and
welcome any criticisms, suggestions, or other stats to compare. But 
that is getting even more technical, and should go through e-mail
for a while. (with postings when warranted).

4) The constant K2 has the appearance of being an implicit measure
of league quality, for leagues adjacent in time. I mean the minor 
leagues of a given year vs. the major leagues of a given year. I
have used this as an important part of my own MLE method, which
has produced some good results. (This is because K2 is primarily
a function of errors, and we can assume, roughly, that fielding 
skill is proportional to batting skill at a given minor league
level. Fielding average declines as you go down through the minors.)
You can not use this to compare 1910 and 1990, however. The lower FA's
of 1910 are due only partly to lesser skill; improved gloves have a
lot to do with it, IMO.

That's the system. It is a little more complex than RC, but I feel it
is worth it to get the marginal value and a scale similar to the BA that
we are all so familiar with. Still, it is easy enough with a
spreadsheet.

Use them wisely. Use them in friendship. 

Clay Davenport