# Calculating Best Statistical Performance in Sports

#### Background

I wanted some way to semi-objectively rank players across seasons and rule changes. In the NFL for example, defenders could previously hit the quarterback and wide receivers more than now. As a result, quarterback and wide receiver performances are theoretically better now, and running back performances are theoretically either worse or more reception-heavy. How do you compare players across seasons then?

Further, players play for different lengths of time. Some players go out on top and retire while they're still effective. Some players play until they can't any longer, so their performance drops in their later years. Should those that go out on top be punished in the rankings for accumulating fewer totals? Should those that stay until they can't be punished for being effective but not elite for longer?

#### Methodology

I settled on the following methodology:
• Pick a season
• Determine a statistic that matters for rankings
• Take that statistic for the top n players at each position who started more than half the games in the season (n varies by position)
• Find the mean and standard deviation of that statistic for those n players in that season
• Calculate the number of standard deviations off mean each player is for that statistic
• Repeat for all relevant statistics
• Weight the chosen statistics to get an effective overall score for each of the n players in that season (weights vary by position)
• Repeat for all seasons
• Average the m best scores for each player where m represents the length of a player's prime (m varies by position)
• The player with the highest average was the best player in his prime
The simple way to think of the score is 'how much of an outlier was this player?' The score roughly represents the number of standard deviations that player was above his peers.

#### Example Calculation

For NFL running backs, select the following statistics as important:
• total yards per game
• rushing yards per game
• total touchdowns per game
• yards per attempt
• fumbles per game
After calculating the mean and standard deviation of each of those statistics for the top 24 starting RBs in that season, imagine a player's results are (reference for 2018 provided):
• 1.1 standard deviations above mean (2018: 117 total yards per game)
• 1.2 standard deviations above mean (2018: 83 rushing yards per game)
• 1.0 standard deviations above mean (2018: 1.1 total tds per game)
• 1.5 standard deviations above mean (2018: 5.4 yards per carry)
• 0.3 standard deviations below mean (2018: 0.09 fumbles per game)
An example weighting is:
• total yards per game (0.125)
• rushing yards per game (0.125)
• total touchdowns per game (0.30)
• yards per attempt (0.40)
• fumbles per game (-0.05)
The sample player's score for that season is then:

(0.125 * 1.1) + (0.125 * 1.2) + (0.30 * 0.8) + (0.40 * 1.5) + (-0.05 * -0.3) = 1.2

For reference, Todd Gurley's 2018 season score was 1.3, so this is similar to his performance.

You could roughly say that this player was 1.2 standard deviations above the other starters at that position in that season.

This metric is not perfect by any means. Sample weaknesses are:
• If there are many really terrible starters in a season, the best in the league in that season will get better scores simply because their peers are bad.
• It's not clear exactly which statistics should be used with which weights.
• The results depend to some degree on how long a player's prime lasts
• It does not factor in team quality. Is Brady great because of Bellichick, Bellichick great because of Brady, or both? I don't know how to handle that.
• It does not work unless leagues are very standardized and stats are available, so it only goes back to 1970 for the NFL for example
However, since it weights results by seasons with direct comparisons to peers and only focuses on players' primes, it mitigates many issues, including:
• accounts for players retiring early within reason (retiring at 25 will block you in general though...)
• accounts for players staying in the league past their prime
• accounts for rule changes and coach evolution across eras
• accounts for being unlucky enough to be a backup early in their career (e.g., Aaron Rodgers behind Brett Favre)
• accounts for missing games or seasons due to injury