# Freelance Friday: Shot Distribution and Half-Court Play

Mar 17, 2015; Houston, TX, USA; Orlando Magic guard Victor Oladipo (5) dribbles the ball during the fourth quarter as Houston Rockets guard James Harden (13) defends at Toyota Center. The Rockets defeated the Magic 107-94. Mandatory Credit: Troy Taormina-USA TODAY Sports

Freelance Friday is a project that lets us share our platform with the multitude of talented writers and basketball analysts who aren’t part of our regular staff of contributors. As part of that series we’re proud to present this guest post from Johannes Becker. Johannes is interested in basketball and statistics and is a PhD student in bioinformatics. You can follow him on twitter @SportsTribution and on his blog, SportsTribution.blogspot.ch

Basketball looks completely different whether the defense is set or not. While a half-court set can be a very elaborate game of chess, a fast break at its best is pure carnage. Here I’m continuing my work from a previous guest on shot distributions and, to make my life a little bit easier, I decided to look only at plays for which the shot clock is less than 18 seconds, giving the defense enough time to settle. As the data I have at hand[1. http://www.danielforsyth.me/exploring_nba_data_in_python/] gives me only information about made and missed shots and not about free throws and turnovers, I decided to combine this information with the NBA’s Synergy Sports Play Type data. Disregarding transition baskets and putbacks, I can estimate the scored or conceived points per possession for half court play[1. You can find all the code that I used for data scraping (Python) and visualization (R) here.].

## Part I: Defense

Both looking at defense and offense, I will focus at three observations for which I have shot distance context: shot distribution, shooting percentage and defender distance.

Here is an overview over these team distancology plots:

What you can see here are the raw numbers. There is in general nothing new.

• Left: The shot distribution shows that the most shots are from three to five feet or from corner (second to last column) or non corner threes (last column).
• Middle: Shooting percentages Are high for close range shots and plateau at around seven-feet from the basket.
• Right: Defenders are, on average, the closest for shots at the basket and further away for shots that are further away (duh). Please note that defenders are even further away for corner threes than for non-corner threes.

The leftmost columns use the play-type data to give us the points per possession for each team. Again, I removed the play-types transition and putback, so they won’t be visible in our figures (as there are more than 18 seconds on the shot clock).

While this plot is nice as a general overview, it is hard to see the fine nuances between different teams. Therefore, I will show you the same plot, but every row is normalized by its mean.

Now it becomes much clearer, why teams are clustered together. The problem now is of course that teams remain not in the same position in each subfigure, making it hard to understand what’s going on.

To fix this problem, I use a different normalization, giving each row a mean of 0 and a standard deviation of 1. I will only use shot distribution and defender distance, as I think that those two are more linked to strategy, while field goal percentage is already a result.

The clearest cluster is on the lower part of the figure. Basically all teams from San Antonio until Washington are doing the right things[1.Please note that ‘doing the right things’ is a very vague term. Without looking at millions of hours of video I have no actual idea what they are doing. But it seems to keep the offense from the sweet spots.] on defense—taking away the paint and the three-point line, thus forcing teams to shoot from mid-range (green color from 5 feet to 21 feet), while staying close to the offense (red everywhere on the right side of the figure). While Phoenix is defending the offense closely, they allow a lot of shots near the basket[1. Phoenix plays/played relatively small lineups, which might additionally skew the perception of close defense. But that’s a different article. Let’s just say having Rudy Gobert 3 feet away from you has a different impact than having Isiah Thomas 3 feet away from you].

Atlanta, Memphis and Milwaukee might not have the perfect Moreyball defense, but generally defend their opponents closely. Milwaukee and Memphis also spurt some pretty long/big fellas, which might help.

All other teams have at least some flaws. The Pelicans for example defend the three quite well, but allow an enormous amount of close range shots. The Clippers are one average the farthest away for close range shots. These might be bad signs for DeAndre’s and Anthony’s DPOY cases, but I would need to figure out a way to look at on/off court statistics. Two of the four leftover teams that have above-average defense but not a good distancology are known for their rim protectors (Tyson Chandler and Serge Ibaka). Philly has the wingspan of a Pterodactyl (which they would consider trading for a second round pick).

This brings us to Houston:

Houston’s defense is, in huge parts, so good because of its ‘good’ three point defense. They ‘allow’ the lowest percentage on corner-threes and one of the lowest percentages on other threes. As a back of the envelope calculation, teams shoot around 4 percent below-average on three-point attempts against them, which means that they get an advantage of around three points per game purely because of its ‘good’ three-point defense—the difference between a top five and an average defense. The problem with this is that low opponent three-point percentage is not a sustainable strategy, but mostly luck.

Seth wrote a longer article about it from a player perspective, but I want to drive this point home from a team perspective as well. In the following plots, we will look at average defender distance in comparison to shot percentage and shot frequency. Let us first look at defender distances compared to percentages for close range shots (three feet), corner-threes and non-corner threes:

As you can see, average defender distance does not influence three-point percentage, while it is a very good indicator for close range percentage. Now, people could say ‘well Hannes, your data stinks! Let smarter people do some proper analysis!’
This might be correct, but let us take a look at average defense distance versus shot frequency from the respective possession:

While the correlations are not huge (after all, the data analysis is really kind of crude), you can still see a correlation for defender distance and shot frequency. And Houston is not making an exception, meaning that the long arms of Trevor Ariza and Patrick Beverley or James Harden’s Beard do not stop people from shooting threes. For some reason they are not making them (my guess is voodoo). Interestingly, there is no correlation between defender distance and close range frequency.

The qualitative explanation for all this is simple. Once a team gets to the hoop, it is going to shoot the ball, no matter if there is help defense or not. Because even a contested close range shot is still a good shot. So, better (help) defense has an influence on the field goal percentage, but not necessarily on the shot frequency. For three pointers on the other hand, most people have a feeling if this is a good shot that they should take or not (insert ‘your least favorite gunner’ joke here). And for those shots that are taken, the tiny quality differences are strongly superseded by the general noise of long range make or miss probabilities.

I hope that this post was an interesting overview over general team tendencies. Next week we’ll take the same approach to looking at team offense.