2024-06-11

Linear Regression Applied to American Football Statistics

Linear regression, in its most basic of forms, is the numerical analysis of dependency; the analysis of if the value of one unknown variable can be predicted via the value of a known one.

One application of this kind of analysis is the breakdown of trends and correlation in sports statistics. Today, we take a look at applying linear regression to American Football statistics, and we’ll see if we can find some trends.

Completion Percentage vs. Season, Overview

A popular topic of conversation in the football analysis world is the trend of football becoming a “pass-heavy” game. In simpler terms, passing the ball has become both more common and easier than running it. We’ll use linear regression to take a look at some passing stats.

First we will look at the top 200 completion % finishes from Quarterbacks since 1970, minimum 100 attempts, and plot these finishes against the year in which they occurred. We’ll look at the raw data, and then an easier to digest graphical analysis.

The data here is courtesy of Stathead.com and by extension is copyright Sports Reference, LLC.

Completion Percentage vs. Season, Raw

## 
## Call:
## lm(formula = Cmp ~ Season, data = passing_stats)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -251.94  -75.33   29.34   76.45  174.34 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -5791.0629  1508.1112  -3.840 0.000166 ***
## Season          3.0257     0.7491   4.039 7.68e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 108.2 on 198 degrees of freedom
## Multiple R-squared:  0.07612,    Adjusted R-squared:  0.07145 
## F-statistic: 16.31 on 1 and 198 DF,  p-value: 7.677e-05

Completion Percentage vs. Season, Visualized

## `geom_smooth()` using formula = 'y ~ x'

Rushing Attempts vs. Season, Overview

Clearly there is a bit of a correlation there!

Let’s take a look at the inverse of this. Let’s apply regression to rushing attempts by season, and see if we have a trend in the opposite direction.

This data is once again copyright Sports Reference, LLC.

Rushing Attempts vs. Season, Visualized

## `geom_smooth()` using formula = 'y ~ x'

Rushing vs Receiving TDs, Overview

Lastly, let’s compare rushing and receiving touchdowns for a very illuminating contrast between the two.

The data we’ll be looking at is the league-wide average per game of each respective kind of touchdown through the years; averaged in order to prevent bias in the data that results from more recent data having more teams. This data is once again copyright Sports Reference, LLC.

Rushing vs Receiving TDs, Visualized