Luck in the Pythagorean Theorem


Last week, I was providing an introduction to baseball analytics to freshmen data science majors and I introduced the Pythagorean Theorem which relates runs to wins,  I thought it would be interesting to revisit this relationship, focusing on teams that do better or worse than what is expected by Pythagorean, that is, the “luck” component.

The 2016 season

To get started, let’s look at the 2016 season.  The Pythagorean relationship, on the log scale, can be written as

log(W / L) = k log(R / RA)

(I express it this way since this is now a linear model and easy to fit using the R lm function.)  Below I plot values of log(W/L) and log(R/RA) for the 30 teams and overlay a least-squares line.


Here the estimated slope is 1.68.  Teams that fall above the line are considered lucky in the sense that they won more games than one would expect based on the runs scored and allowed.  Looking at the graph, Texas appeared to be lucky and Minnesota was unusually unlucky.  The Cubs were extreme on their ratio of runs to runs scored, but their point falls a little below the line, indicating they were a little unlucky in terms of their W/L ratio.

This raises several questions:

  • How has the Pythagorean slope changed over seasons?
  • What is the general size of this luck component?  That is, over many seasons, how many additional wins or losses to teams have based on “luck”?  (Here I am using luck to describe the variation in wins/losses not explained by the R/RA ratio.)
  • Are there possible explanations for the luck component?

Pythagorean slope

To see how the Pythagorean slope has changed over seasons, I fit this model for the past 50 seasons — here is a graph of the estimated slope against seasons.


In the days of low scoring like 1968, the estimate was small (1.6), and then the estimate showed a steady increase until 1990, steady from 1990 to 2005, and then has shown a decrease in recent seasons.  What is actually remarkable is not the trend, but the high variability of the estimate — it appears that we don’t get a great estimate at this slope from data from a single season.

Size of the luck component?

In my model, the residual is relatively hard to interpret since the variables are on a log scale.  So I focus on the residual

Residual = Actual Wins – Predicted Wins

So, for example, if Residual = 5, then this team has won 5 more games than one would expect based on the Pythagorean relationship.  For each of my 50 seasons, I found all of the residuals — here is a density estimate of all of these residuals.


These residuals are bell-shaped  and 85% of the values fall between -5 and 5.  Thus it is pretty unusual for a team to win more than 5 or lose more than 5 games than expected.  Only 2% of the residuals exceed 10 in absolute value.  It is really unusual for a team to vary 10 or more than expected by the Pythagorean formula.  (By the way, the 2016 Texas team actually had a residual value of 13 which was the most remarkable lucky season in this 50-season exploration.)

Explanations for the luck component?

Okay, what are some possible explanations for a team winning more games than expected?

  • They win a lot of close games.
  • They have great relievers who are good in preserving games.
  • They are good in playing small ball, that is scoring the winning runs by singles, bunts, etc. in close games.

In the BR article referenced above, it says “Deviations from expected W-L are often attributed to the quality of a team’s bullpen, or more dubiously, “clutch play”; many sabermetrics advocates believe the deviations are the result of luck and random chance.”

I believe it has been shown that luck is not persistent in that a team that is lucky one season does not tend to be lucky the previous season.  That is, there is a small association between the luck values for consecutive seasons.

But I’ll throw out one interesting thing that I found.  Suppose we graph the residuals against the number of games won for all 50 seasons.  I overlay a smoothing curve to see the pattern.


What this appears to show is a “team with extreme records” effect.  Teams that are very successful (that is, win 95 or more games) tend to win more than one would expect based on the R/RA ratio.  Conversely, poor teams tend to lose more than one would expect based on the Pythagorean relationship.  For a team with 100 wins, it wins about 3 games more than expected.

Final comments

I think the general topic of Pythagorean residuals is interesting and deserves further exploration,  For example, it would be interesting to examine the teams like the 2016 Rangers that had very lucky and very unlucky seasons and see if there are any common characteristics.

This study is easy to reproduce using Retrosheet game log data.  I have downloaded the game log files for many seasons and it is easy to bring these files into R.  Let me know if any of you are interested in seeing the R code for this exploration.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: