This post looks at whether particular NBA teams have demonstrated significantly different amounts of home court advantage over time. This is challenging, since team quality varies significantly over time.
The punchline? There is only very weak statistical evidence that teams have persistent and measurable differences in home court advantage relative to the league average.
As with the previous posts in this series on NBA home court advantage, we will look at 24,797 match ups from the 1996-97 through 2016-17 regular seasons.
Please see this Jupyter notebook for the code used to produce the data, analysis and figures in this post.
Home Versus Away Win Percentage
We will perform a relatively simple analysis. We want to simply take the difference between home win percentage and away win percentage, grouped by season and team.
This is a simple way to think about isolating the impact of home court advantage. Weak teams should have relatively weak home and away records, and strong teams should have relatively strong home and away records. Taking the difference between the home and away win percentage should average out the differences between teams and focus on the impact of the home court.
The NBA schedule isn’t perfectly balanced, in the sense that the average quality of home opponents may differ randomly from the quality of road opponents. But, there’s no reason I’m aware of to think that there is a systematic bias in how the home versus away games are scheduled from season to season. We will analyze the schedule and home versus away records by conference and division in a future post, to see if that has any impact on a team’s home court advantage.
Although teams can vary significantly intra-season due to trades and injuries, the regular season is a reasonable time unit for analyzing team performance.
Here’s a summary of the data, prior to grouping. Again, please see the Jupyter notebook for the code and all the details.
There are 622 distinct team/season pairs.
Grouping the Data
Let’s group these data by team and aggregate the statistics over the 21 complete seasons.
These are the 5 teams with the highest observed average home court advantage, measured by home versus away win percentage differential.
And these 5 teams have the lowest observed average home court advantage.
There are some familiar names in these lists. Denver and Utah often show up in articles about home court advantage. Some people attribute the supposed extra home court advantage to the altitude and the time zone of Denver and Salt Lake City. There’s even an article studying the potential effect of altitude on free throw shooting percentage. And, lastly, here’s an article that attempts to rank all 30 NBA teams by home court advantage, without any data to support the rankings.
In the words of the great American statistician W. Edwards Deming, “In God we trust; all others must bring data.”
Needless to say, I’m skeptical.
Survey Says…
Here’s a box plot of the home versus away win percentages for all 30 NBA teams. The dashed horizontal line shows the overall median home versus away win percentage differential of roughly 20%.
The main thing to notice about this plot is the significant variability in the data. Denver’s away win percentage has varied between 2% less than its home win percentage to as much as 46% less. Of course, a large win percentage differential could occur because a team has an awful road record or because it has an outstanding home record. Similarly, a small win percentage differential could occur because a team is outstanding on the road or is relatively weak at home.
The rectangles on the plot display the interquartile range for each team. The interquartial range is the difference between the 75% quantile and the 25% quantile. Approximately half of the observations for each team occur in each of the relevant rectangles.
The grey lines within each rectangle represent the median for each team. Approximately half of the win percentage differentials are above this line, and half are below this line.
(For the purists, the reason I say “approximately” in the preceding sentences is due to the fact that some fine-tuning may be required to break ties, depending upon the number of data points. See the links above for details on the calculation of median and interquartile range if you’re interested.)
All of the interquartile ranges intersect the line representing the overall median. If a team had a significantly different home court advantage (or disdvantage), you would expect to see that more clearly in the plot.
This plot doesn’t attempt to separate out the reasons why the home versus away win percentage varies so much. That will have to wait for another day. But, if the question being asked is does a team have a consistent and measurably different home court advantage, this plot certainly doesn’t support a yes answer to that question.
Analysis of Variance
There are more formal statistical tests of whether several groups have the same mean. An example of this is one-way analysis of variance, or ANOVA. The details don’t matter much, but to illustrate the method in Python, here is a one-way ANOVA testing whether all the teams have the same mean home versus away win percentage differential.
In Python, it’s easy to use the scipy
statistics package to perform this test.
data = [hca.loc[hca['team'] == team, 'home_away_diff'] for team in teams]
f_val, p_val = stats.f_oneway(*data)
p_val
In one-way ANOVA, the null hypothesis is that all the means are the same. For the NBA data, the resulting p-value of 9.1% is only very weak evidence against the null hypothesis that all the home court advantages are the same.
The statistical test tells the same story as the plot. The data are too noisy to support a strong conclusion.
Quantifying Differences in Home Court Advantage
Even though we’ve seen that the data don’t really support the argument that different teams have consistently different amounts of home court advantage, let’s take the analysis just a little bit further.
Suppose for a moment that teams really did have different home court advantages. How would you use that information?
Under the NBA schedule, every team plays the same number of home and away games every season. So, with a little bit of algebra, you can show that the overall win percentage is the average of the home win percentage and the away win percentage.
Also, remember that the way we are estimating home court advantage here is home win percentage minus away win percentage. The average team has roughly a 20% gap between home and away win percentages. But, as we’ve seen in prior posts, the gap between the home win percentage and the overall win percentage is around 10%. That is, half of 20%.
So, if a particular team had a significantly better home court advantage than the league average, the predicted impact on the overall season win percentage would only be half of the difference between that teams’s home court advantage, and the league average home court advantage.
Let’s estimate the predicted impact on overall win percentage, assuming that each team really did have different home court advantages.
We’ll estimate the home court advantage using the interquartile mean, which is the just the average of the 25% and 75% quartiles. It’s not the same as the median. You can visualize the interquartile mean as being the centers of the rectangles in the box plot above.
Here are the 5 best and 5 worst NBA team home court advantages, estimated by the historical interquartile mean over the past 21 completed NBA seasons.
def iq_mean(x):
return (x.quantile(0.75) + x.quantile(0.25))/2
y = hca.groupby('team')['home_away_diff'].agg(iq_mean).sort_values(ascending=False)
y.head()
y.tail()
Now, we can just subtract out the league interquartile mean and divide by 2, to look at the impact on each team’s estimated overall win percentage.
m = sum(y)/len(y)
m
home_edge = (y - m)/2
home_edge
Notice that by this measure, Indiana, Atlanta and Cleveland rank better than Utah, despite the claim that Salt Lake City’s altitude helps the Jazz. The Jazz just don’t stand out as much using the interquartile mean. This suggests some historical outliers may be influencing the common perception that the Jazz enjoy a special degree of home court advantage.
What’s also interesting is the teams at the bottom. People usually don’t think of OKC, Boston or Toronto as suffering from significantly below-average home court advantage.
If Denver really did have such a large relative home court advantage compared to the league average, it would be expected to pick up roughly an extra 3 games per season on average. It’s hard to detect that effect in the noisy year-to-year variation of the team’s record.
The general take-away is: treat claims of persistent home court advantage in the sports media with skepticism.