# Nylon Calculus: Defining and calculating luck-adjusted ratings for the NBA

On-off data is the most basic data available for tracking how a team performs when a player is on-court versus off-court. In the NBA, this is measured by comparing a team’s net rating (points scored per 100 possessions minus points allowed per 100 possessions) when the player is playing versus when they are on the bench. Unfortunately, raw on-off data is incredibly noisy. Luck-Adjusted ratings allow for a clearer view of team performance with and without a player.

A prime example was Kawhi Leonard’s defensive on-off data from the 2016-17 season. As a two-time Defensive Player of the Year, no one questions Leonard’s defensive prowess. However, the Spurs defense was 8.6 points per 100 possessions better in 2016-17 when Kawhi was on the bench. Was the team really that much better without him or was there something weird going on in the data? It turned out upon closer inspection that opponents were shooting miles better from 3 when he was on the court. Opponents shot 37.6 percent from 3 when he was on-court compared to 29.2 percent when he was off.

Studies on Nylon Calculus have shown time and again that teams have incredibly limited control over their opponents 3-point percentage. Building off that, an individual player would have virtually no control by themselves on opponent 3-point percent. The same is true for opponent free throw percent, where once again bad luck hurt Kawhi’s defensive rating.

While Kawhi did not suffer this bad luck on the offensive side of the court, similar actions can occur. For instance, an individual player cannot control if their teammates make or miss free throws when they are on the court. And while a player can have a limited impact on their teammates 3-point shooting, there still is a lot of statistical noise regarding the exact number of 3s a player’s teammates make when they are on the court versus off of it.

The solution is to adjust for these lucky or unlucky events to create more stable, luck-adjusted, offensive and defensive on-off ratings for each player.

Last season, the Spurs played 7,742 offensive possessions during the regular season and Leonard was on court for 62.1 percent of them. When Kawhi was on-court, the Spurs scored a true 5,550 points.

The first step in adjusting that true point total is adjusting teammate free throws. With Kawhi on-court, his teammates took 642 free throws and converted those at a 75.1 percent clip. However, the average teammate of Leonard shot 76.3 percent from the charity stripe. So, while the Kawhi’s teammates truly made 482 free throws while he was playing, the luck-adjusted total is 489.7 made free throws (642 times 76.3 percent). Thus, the teammate free throw adjustment for Kawhi last season would be +7.7 (489.7 minus 482).

Next is teammate 3-point shooting, which is slightly more complicated. As noted above, a player does have some control over teammate’s 3-point percent via individual gravity and playmaking. To differentiate this impact from noise, I regress on-court teammate 3-point percent to the season-long teammate average.

Leonard’s teammates shot 780 3-pointers while he was on the floor and they made them at a 41.8 percent clip. Overall during the season, Spurs players not named Kawhi shot 1533 3s and made them at a 39.5 percent clip. The following regression is used to reach the luck-adjusted 3-point total for Kawhi: [ (780 x 41.8%) + (1533 x 39.5%) ] / (780 + 1533) = 40.3%. This regressed total allows for the individual’s impact to be felt while limiting noise and small sample size issues. In reality, Kawhi’s teammates made 326 3s when he was on-court, but the total drops slightly to 314.3 made 3s after adjusting for luck. Thus, his teammate 3-point adjustment would be -35.1 (3 time 314.3 minus 326).

Overall on offense, Leonard’s luck-adjusted points scored would be 5,550 (the true points scored on court) plus 7.7 (the free throw adjustment) minus 35.1 (the three-point adjustment) equaling 5,522.6 points. Over the entire season, the Spurs scored 8,637 points in total. That means after the luck-adjustment, the Spurs scored 5,522.6 points when Kawhi was on-court and 3,114.4 points when he was on the bench. Because we can count the number of offensive possessions when Leonard was on and off of the court, we can convert those luck-adjusted points totals to points scored per 100 possessions.

After adjusting for luck, the ORTG (offensive rating, points scored per 100 possessions) when Kawhi was on-court in 2016-17 was 114.86 and it dropped 8.71 points when he was on the bench to an ORTG of 106.15. That 8.71 points per 100 possession difference is Kawhi Leonard’s luck-adjusted offensive on-off rating for the 2016-17 regular season.

The defensive side of the ball is less complicated to adjust for. The Spurs played 7,767 defensive possessions in 2016-17 and Kawhi was on the floor for 61.9 percent of them. When he was on the court, the Spurs gave up 5,136 points.

As previously mentioned, Leonard was hurt by some incredibly unlucky opponent 3-point shooting and individuals have next to no control of their opponent’s 3-point percent. Opponents shot 1,202 3-pointers when he was on-court, making them at a 37.6 percent clip resulting in 452 made 3s. If opponents had shot the Spurs’ season-long opponent average from 3 of 34.4 percent, they would have made just 413.5 3s. Thus, the opponent 3-point adjustment for Leonard last season was a massive -115.6 (3 time 413.5 minus 452).

Kawhi was also unlucky at the charity stripe on the defensive end, another area where an individual has no ability to impact the game defensively. Opponents shot 78.9 percent on the 1,019 free throws attempted with Kawhi on-court, nearly 2 percent higher than the Spurs’ opponent average of 77.1 percent. If opponents had shot an average 77.1 percent from the line while Leonard was on the floor, they would have made 785.9 free throws compared to the 804 they made in reality. Thus, the opponent free throw adjustment for Kawhi was -18.1 (785.9 minus 804).

After adjusting for luck, the DRTG (defensive rating, opponent points scored per 100 possessions) when Kawhi was on-court in 2016-17 was 104.11 and it only improved by 1.32 points when he was on the bench to an DRTG of 102.79. That -1.32 points per 100 possession difference is Kawhi Leonard’s luck-adjusted defensive on-off rating for the 2016-17 regular season.

Kawhi’s luck-adjusted offensive on-off rating was about 1.5 points worse than the true value. His luck-adjusted defensive on-off rating was 7.3 points better than the true value. Adjusting for luck helped to weed out the noise and allowed us to better glimpse how the team performed with a player on the court versus off the court.

## Applying luck-adjusted ratings to the 2017-18 season

Among the 340 NBA players to play greater than 1,000 total possessions this season, the luckiest player to their overall net rating has been the European GOAT Milos Teodosic. While in reality the Clippers have been +13.6 points per 100 possessions better when he has been on-court, that total falls to just +3.0 points per 100 possessions after adjusting for luck.

On the flip side, the least lucky player has been D’Angelo Russell. The Nets were in reality 9.3 points per 100 possessions worse with Russell on-court earlier in the year, but have actually been +0.8 points per 100 possessions better after adjusting for luck.

Here is a histogram of where every player falls in terms of luck-adjustment so far this season.

On the offensive side of the court, the luckiest player has been Zaza Pachulia with the offense performing 7.6 points per 100 possessions better than expected when he has been on-court. The unluckiest player has been T.J. Leaf, who has seen the offense score 6.5 points per 100 possessions less than expected.

On defense, the luckiest player has been Eric Gordon with opponents scoring 10.1 points per 100 possessions fewer than expected. The unluckiest player on defense has been Elfrid Payton, who has seen opponents score 8.5 points per 100 possessions better than expected.

As you can see, adjusting for luck allows a much clearer view of how a team truly plays when a player is on or off of the court. Especially with smaller sample sizes, accounting for random variance that is not indicative of any true value is key to understanding how a team is performing.

A complete database of luck-adjusted on-off ratings for the 2017-18 season can be found here.

Luck-adjusted ratings for searching specific teams and set of games going back to the 2000-01 can be found here.

Luck-adjusted ratings for searching teammate pairs from specific teams and set of games going back to the 2000-01 can be found here.