The Matchup Box Score

Posted by Alex Franks on May 27, 2016

Back in December we wrote about the algorithm we devised for identifying defensive matchups at every moment of an NBA game. We can leverage this algorithm to paint a detailed picture of defensive performance in an individual game using what we call ''the matchup box score''. In the matchup box score we compute and display ''points against'' for each matchup, a quantity that tallies how many points a player on one team scored against a player on the opposing team over the course of a game. For each possession where a player scores, those points get distributed proportionally across the defenders on the court based on the fraction of time they spent guarding the scorer.

For instance, if Russell Westbrook guards Steph Curry for 50% of a possession in which Curry makes a 3 point shot, Westbrook would get 1.5 points against added to the Westbrook-guarding-Curry square. The remaining 1.5 points are distributed across the other four defenders according to their share of the the remaining 50% of time spent guarding Curry.

Check out the matchup box score from the game 4 in which the Thunder stomped the Warriors.

Game 4

As an example, lets look at the play of Draymond Green. Green clearly had a bad game, and from this matchup matrix it's clear how he really struggled. Kevin Durant spent most of his time guarding Green, as indicated by the corresponding dark blue square, and did a great job. Green never scored on any possessions in which he was guarded by Durant and finished with only 6 points total. Defensively, Green also had a tough time. In this game, he spent a lot of time playing as a "roving defender", rather than matching up against a single offensive player for most of the game. This is apparent from the relative uniformity in minutes spent defending different Thunder players. This turned out to be a tough task for Green — three different Thunder players scored more than 5 points while guarded by Green who finished with the most points against of any Warrior at 16.1. Although Curry had a disappointing offensive night, he had reasonable defensive night guarding an impressive Westbrook. Westbrook scored 36 points, but only 1.2 of these points were directly attributed to Curry. Eleven of Westbrook's points were assigned to the "team responsibility", highlighting the fact that Westbrook points often came quickly in transition or off fast breaks.

In last night's game (game 5), the Warriors were able to turn things around and keep their title hopes alive. Compare the game four matchups to last night's matchups:

Game 5

Again Durant was able to shut down Green defensively and simultaneously put in a monster 40 point performance on the offensive end. This time it wasn't enough, in part because Curry had a much better offensive game scoring 31, 8.1 of which came against his primary defender, Westbrook. Defensively, Curry did not reciprocate the matchup with Westbrook as he did in game 4, ceding that task to Thompson. Instead Curry split his defensive efforts between Roberson and Waiters. Roberson did not repeat his 17 point game 4 performance. Although, Thompson was assigned responsibility for 14.2 of Westbrook's 31 points, much more than was credited to Curry in game 4, Westbrook still likely prefers the Curry matchup.

Note that our implementation of the defensive matchup algorithm only runs when all players are in the half court. This simplified things in part because matchup defense looks a lot different in transition. However, there are many possessions that end in baskets in which one or more player is on the wrong half of the court. We count these as ''fast breaks'' whether or not the possession would really be considered a fast break in the traditional sense. These points scored in which one or more players are on the wrong half of the court fast break points are lumped into the ''team responsibility'' category. We can improve upon this by tweaking our algorithm to estimate defensive matchups only for players in the half court.

Eventually we hope to assign points from free throws to the fouling defender but we have yet to implement this feature. One of the major challenges we've faced is that the tracking data we use to construct the matchup box score is not appropriate for tabulating box score statistics. Although the tracking data includes event annotations like ''FG made'' and ''FG missed'', it does not include more detailed annotations, including whether the attempt was a two point or three point shot! Currently, we estimate the value of the shot based on the location of the shot, although this is fairly error-prone because the tracking data isn't precise enough to determine exactly where the shooters' feet were. The solution, which we're in the process of working on, is to integrate play by play data with the tracking data. This will enable us to more accurately and easily construct these graphics in the future.

Feel free to leave feedback or suggestions on how to improve these graphics in the comments below!