Friday, August 16, 2019

Do All-in-one Basketball Ratings Work?

Author's note: this is the second part of a pair of articles on All-in-one ratings. The first article focuses on history, while this article focuses on the creation and analysis of my own personal model, Normalized Production.

With that crash course in box score ratings out of the way, it is much easier to gauge realistic expectations for I intend to accomplish by throwing my hat in the mix. The model I've created won't be groundbreaking, because in the modern, analytics driven NBA, player tracking data has become much more accurate than simple box scores. Instead, I aim to create an elegant formula and use the easy to understand intuition as a way to better explore the data. The result is an All-in-one rating named Normalized Production (NP).

PER's lack of efficiency measures, as shown in Formula 1, is a major sticking point that calls into question the accuracy of the metric. While Hollinger does scale the model to league totals, the lack of shooting percentages means the costs that inefficient, volume scorers bear on a team are not internalized in the formula. Between the creation of PER and the present day, efficiency has become much more integral to basketball strategy. The video below, produced by talented NBA data visualist and writer, Kirk Goldsberry, highlights how far out of favor the inefficient mid range shot has become. Nowadays efficiency is so important that teams optimize each possession to end with either a high value three point shot, or a very efficient shot attempt at the hoop.


To account for shooting efficiency in NP, i settled on using Effective Field Goal Percentage (eFG%). eFG%'s formula can be found under the formula for Normalized Production, in Formula 2. eFG% is a better representation of shooting efficiency than standard field goal percentage because it corrects for the difference in value between two point shots and three point shots. Under eFG%, a player that makes 50% of the two point shots he attempts would have an eFG% of 50% and a FG% of 50%. However, a player that makes 50% of the three point shots he attempts would have an eFG% of 75%, but a FG% of only 50%. In short, eFG% avoids unfairly docking players for taking more valuable, and more difficult, three point shots.


Formula 1
In PER's crowded formula, there is very little punishment for players who take inefficient shots.

Beyond Effective Field Goal Percentage, the rest of the variables are the categories that you would see in any box score. Unlike my other projects, this formula is not regression based, instead each category is weighed equally to form NP. A very reasonable and immediate criticism of this approach is that each effect of each variable isn't constant; you could argue that assists are more valuable for a player's "true production" than something like steals or blocks. This line of reasoning is correct and is important to keep in mind when contextualizing results from the model, but ultimately, I believe that even if this approach could be more accurate, it still serves as a good practice in R.

Formula 2
Normalized Production accounts for shooting efficiency by including eFG% 

Part III Viz and Results

Typically, all-in-one ratings are used to gauge the impact of the league's best players, after all, the average basketball fan is a lot more interested in stars rather than the benchwarmers. When analyzing the representativeness of a rating however, the lowest performers are just as relevant. The chart below displays the top 20 and bottom 20 accumulators of Normalized Production for the 2018-2019 season. At a glance, the top 20 looks quite representative, in fact, 14 of 15 All-NBA Team award winners make the list, while Blake Griffin falls just short of cut. However, when we look at the bottom 20 some quirks in the methodology become apparent.
Chart A
The 20 best and worst players by NP.
Chart B
The 20 best and worst players with at least 20 games played by NP.

Of all of the players in the bottom 20, not a single player logged more than 20 games played. Many of the players exist in the same cohort: young players at the very end of the bench. In fact, the average games played is just under 4. In a sense, this result is reasonable, since many of these players were minor league call ups filling gaps where injuries reduced the number of players available for a given game. Since the NBA has one of the weakest minor league systems, due to most drafted players immediately playing in the NBA, these minor league call ups may really be the worst players. It depends on the definition of "worst", is it a player that plays many minutes poorly, or a player not good enough to warrant receiving those minutes in the first place? For the purposes of this paper, I believe the former definition is most accurate because the latter is based on drawing conclusions of a player's quality based on tiny sample sizes. Since Normalized Production performance is strictly measured as performance relative to the mean, it loses the cumulative effect of poor play. Players with small sample sizes get their impact blown out of proportion.


By restricting the requirements to 20 games played, the results look much more representative. Although the bottom 20 still consists primarily of young players, this is reasonable because young players normally have an adjustment period to the physicality and speed of the NBA compared to college or international basketball. Many of these players are not even old enough to drink in the United States yet! Isaac Bonga, the player with the lowest NP, was also the youngest player in the league at just 19 years old.  This makes the veterans on the list, Ryan Anderson and José Calderón, really stand out compared to all of the rookies and sophomores. While José Calderón, age 37, has had a long, successful career and a graceful decline, Ryan Anderson has had a sharp drop in effectiveness. Anderson has a unique skill set as a perimeter shooting big man that earned him a massive 4 year, $80 million dollar contract. Unfortunately, Anderson's defensive flaws were amplified by changes in NBA offensive strategy which have made him a net negative in recent years. Since a player's value is a function of both his production and contract, Anderson sticks out as the biggest downside in the NBA.    


While I previously established that Normalized Production does do a good job of representing the All-NBA award winners, there are some quirks to discuss in the top 25. Chart A of Table 2 below shows the top 25 players distinguished by position, Anthony Davis claims the top spot. Although Davis is a great player, this highlights a flaw in the formula, not accounting for playing time or time spent on the court. A player's value is decided on the court, and Davis spent a lot of time off the court this season, especially compared to James Harden and Giannis Antetokounmpo. Davis played in 56 out of 82 games and logged his lowest minute total since his rookie season. The reasons for this are twofold: injuries and a trade request.

Chart A:
Distinguishing by position highlights some interesting quirks of NP.
Chart B:
The overrepresentation of Centers relative to their diminished role in the NBA.
On January 28th, 2019 Anthony Davis requested a trade from the New Orleans Pelicans, forgoing a five-year, $240 million dollar supermax contract extension, as reported by Adrian Wojnarowski. From that point forward, the Pelicans restricted his playing time to 20 minutes per game. In comparison, both Harden and Antetokounmpo have over 70 games played and played consistent minutes through all of them. So what are the quirks of NP that allowed Davis to earn the top spot? Since NP weighs each stat equally, Anthony Davis is the player with the highest cumulative total among all categories is the top performer. When thought of through this lens, the results make much more sense: Anthony Davis is a true jack-of-all-trades. Anthony Davis is a true jack-of-all-trades. Davis was once a guard in high school, before a massive growth spurt shifted his position to center, the infographic provided by TNT highlights this. He retains many guard skills such as ball handling, passing, and court awareness

While many centers never need to develop passing ability, Davis' unreal growth spurt gave him the best of both worlds.
Source: NBA on TNT

It isn't just Davis that is overrepresented, but instead all traditional "big men" in the NBA are overvalued. Chart B of Table 2 above shows the proportion of each position in the top 25. To see 8 centers make the cut is quite surprising, especially since the position has had a hard time adapting to the perimeter focused NBA. Table 3 helps explain this phenomenon, by displaying the share of each category that each position earned. Centers benefit in Normalized Production from having very specialized roles in blocking shots and rebounding on offense and defense where they accrued 39% and 30% respectively. In addition, centers are typically low usage players, meaning that the offense does not flow through them. In contrast, point guards are high usage players because they orchestrate the plays being run and contribute to many baskets through assists. This is expressed through centers' low assist and turnover rates. For example, James Harden's 5 turnovers per game is nearly 5 standard deviations away from the mean, while Davis' turnovers are only 1.17 standard deviations from the mean. Finally, centers have a relatively efficient shot selection, mainly slam dunks and layups, which leads to a high field goal percentage. In the 2018-2019 season, seven of the top ten leaders in field goal percentage are centers. Even when looking at Effective Field Goal Percentage, which better represents three point shooters, 6 are still centers.



I believe the success of Normalized Production can be looked at three ways. If someone who had no knowledge of the NBA were to use Normalized Production to draw conclusions, I think they would generally get the right idea, with the exception of JaKarr Sampson, the top 25 consists of worthy players. From the perspective of an NBA fan, there are a few results that would stand out as incongruent with reality. And finally, an NBA analytics buff would criticize the simplicity of the methodology or lack of features that other models have. At the end of the day, for work that was not intended to be groundbreaking, I think that is a good place to stand: functional, but with room for improvement.

As for areas of improvement, there are a few I would like to explore. In terms of the model, accounting for the pace of play and minutes played would go a long way to iron out many of the kinks. I would also like to take advantage of one of the luxuries of box score based models: historical comparison. The systems that I have used for data scraping in R worked great, but expanding the data set to 1979 using those methods would be quite tedious, and potentially unwieldy. I think a better solution would be integrating SQL to manage a database that is on a larger scale than anything I have previously worked with.