Among some circles, there is a long-standing belief that NBA referees make calls based on personal bias sometimes aimed against teams or specific players. One notorious case is Tim Donaghy, the referee responsible for rigging the 2002 playoff matchup between the Sacramento Kings and the Los Angeles Lakers.
However, does referee bias really exist in the modern NBA game? We examined if some teams were more likely to collect personal fouls against using data from the 2014-15, 2015-16, and 2016-17 seasons via NBA.com.
The average number of fouls called per game was 20.3 in 2014-2015 and 2015-2016. This number dropped to 20.0 called personal fouls per game last season with a standard deviation of 0.36 points higher than 2015-16. 
During the 2016-17 campaign, the Phoenix Suns were called for 24.8 fouls per game while the Charlotte Hornets accumulated just 16.6 fouls per game among the lowest in NBA history falling on opposite ends of the spectrum. Hornet’s head coach Steve Clifford values high possessions and low foul totals as a means to gain an edge against more star studded lineups.
Last season, the Hornets defended just 27 shots per game within 0-5 feet of the hoop falling in the bottom third of NBA teams. The Suns defended 32 field goal attempts within this range (6th in the league). This may in part explain the Hornets and Suns’ low and high foul totals respectively.
A Poisson regression model was used to determine if shooting distance (on defense) is a good predictor of personal fouls against per game.
For reference, in Poisson regression, the response/outcome variable Y is a count. However, the rate (or incidence) can also be used as a response variable. In our model, the explanatory variables were continuous shot distance variables or the number of shots individual teams defended from 0-5 , 5-9 , 10-14 , 15-19, 20-25, and 25-29 feet from the hoop.
We found that the number of shots defended by distance was not significant in predicting the number of fouls called against a team over the course of a game. In other words, each shot distance coefficient had a p-value greater than 0.05, which is baseline to determine if the shot distance is significant or not in the model.
No evidence for referee bias
We calculated the Z-scores for each of the 90 unique team’s average personal fouls over the last three seasons to test for referee bias. For reference, a Z-score measures how many standard deviations above or below the mean a data point is.
Our findings suggest that NBA referees have been consistent in calling fouls over the last three seasons. Only six of the 90 teams had Z-scores that were significantly different than the mean (p-value<0.05). On the low end, the 2016-17 Hornets (Z-score=-2.51) , 2015-16 San Antonio Spurs (-1.82), and 2016-17 Chicago Bulls (-1.68) averaged a significantly lower than average fouls per game.
Figure 1: Average personal fouls (against) per game for NBA teams during the 2014-15, 2015-16, and 2017 seasons. The far left outliers on the left and right are the 2016-17 Charlotte Hornets and the 2016-17 Phoenix Suns
On the upper tier, the 2016-17 and 2015-16 Suns (Z-scores of 3.20 and 1.74 respectively) alongside the 2014-15 Denver Nuggets (Z-score= 1.95) averaged significantly more personal fouls than expected compared to league average.
However, the other 84 teams in our sample fell within the 95% confidence interval for average personal fouls against per game falling between 19.9 to 20.5. A one-sample t-test reveals that the average personal fouls per team is not significant against the mean over this three season span ( p=0.17 and t=1.36).
We used a Poisson distribution to determine how likely the Suns and Hornets’ foul totals were last season. A Poisson distribution measures the number of times an event occurs in an interval of time (or space).
We can say that all things being equal the 2016-17 Suns and Hornets had a 21.3% and 29.7% probability of generating 25 and 17 fouls against per game (rounded to nearest whole number) last season making them outliers in our sample.
To be clear, this analysis examines fouls called over the last three seasons. It is possible referee bias could have existed if we go back five to ten years but given our findings suggest this is highly unlikely. This hints that NBA referees should be getting more credit than they deserve and put a stop to referee conspiracy theories
 During the 2014-15 and 2015-16 NBA seasons, the standard deviations for personal fouls called per game against teams was 1.26 and 1.62 respectively.