Background

I was wanting to look at fantasy football data and see what impacts fantasy score specifically for QBs and how I can use that to better know what to look for when a game is being played to what QB may be the best to start that week based on the impacts they are facing. I want to look into outside factors like stadium setting or temperature significantly affect fantasy points scored

Hypothesis

What impacts fantasy points scored by a QB?

\[ H_0: \beta_1 = 0 \\ H_a: \beta_1 \neq 0 \]

\[ H_0: \beta_2 = 0 \\ H_a: \beta_2 \neq 0 \]

\[ H_0: \beta_3 = 0 \\ H_a: \beta_3 \neq 0 \]

\[ H_0: \beta_4 = 0 \\ H_a: \beta_4 \neq 0 \]

\[ H_0: \beta_5 = 0 \\ H_a: \beta_5 \neq 0 \]

\[ H_0: \beta_6 = 0 \\ H_a: \beta_6 \neq 0 \]

We will be using a Logistic Regression Model to test for the probability of a QB scoring higher then 25 fantasy points on FanDuel:

\[ P(Y_i = 1|\, x_i) = \frac{e^{\beta_0 + \beta_1 x_i+ \beta_2 x_2i + \beta_3 x_3i + \beta_4 x_4i + \beta_5 x5_i + \beta_6 x6_i}}{1+e^{\beta_0 + \beta_1 x_i+ \beta_2 x_2i + \beta_3 x_3i + \beta_4 x_4i + \beta_5 x5_i + \beta_6 x6_i}} = \pi_i \] Our level of significance will be:

\[ \alpha = .05 \]

Analysis

After looking at all the factors from outside the scoring points like temperature or humidity, I found that none of those factors significantly impacted a QBs chances of scoring 25 fantasy points in a game or not. While these factors probably affect play calling styles or game plans. QBs still seem to produce fantasy points at the same efficiency. So our model is based on the main statistics that influence points scoring in fantasy football. This would be passing yards, touchdowns, and interceptions. As well as rushing touchdowns and instead of rushing yards I chose to include my own factor based on rushing attempts to see how reliably or often a QB runs and if we should anticipate many points coming from designed runs. If they run 7 times a game they are considered a running QB and are put on a different line then the base model.

  Estimate Std. Error z value Pr(>|z|)
(Intercept) -18.89 1.434 -13.17 1.319e-39
pass_yds 0.02878 0.002842 10.12 4.288e-24
pass_td 3.221 0.261 12.34 5.541e-35
pass_int -1.146 0.2059 -5.566 2.609e-08
Run_QB 3.624 0.4502 8.049 8.351e-16
rush_td 4.95 0.4287 11.55 7.602e-31

(Dispersion parameter for binomial family taken to be 1 )

Null deviance: 1481.5 on 1699 degrees of freedom
Residual deviance: 374.7 on 1694 degrees of freedom
##  (Intercept)     pass_yds      pass_td     pass_int       Run_QB      rush_td 
## -18.88506430   0.02877748   3.22088599  -1.14626786   3.62373619   4.95002026

pander(predict(qb.glm, data.frame(pass_yds = 300, pass_td = 2, pass_int = 1, Run_QB= 0, rush_td = 0), type = "response"))
1
0.00699

Here we cut out a slice or a scenario we may see from a game. If we are looking at these as predicted numbers before the game. If a QB is predicted to throw for 300 yards, 2 touchdowns, and throw an interception he has a 20.5% chance of scoring above 25 fantasy points that game. But the number below shows what his odds would be if he was deemed a rushing QB that will get several opportunities to gain rushing yards as well and received the exact same stats. He would then have a 33.9% chance to get 25 points for the same game showing that running QBs are valuable to fantasy football.

pander(predict(qb.glm, data.frame(pass_yds = 300, pass_td = 2, pass_int = 1, Run_QB= 1, rush_td = 0),interval = "response"))
1
-1.333

Interpretation

Pass Yards

pander(exp(8.237e-04*100))

1.086

You have an 8.6% chance for your QB to score above 25 fantasy points for every 100 yards they pass for in the game.

pander(exp(1.438e-01))

1.155

You have an 15.4% chance for your QB to score above 25 fantasy points for every TD they throw in the game.

pander(1 - exp(-3.074e-02))

0.03027

Your chances to score above 25 decrease 3% for every interception your QB throws in a game.

pander(exp(1.330e-01))

1.142

Your chances increase by 14.2% if you have at least 7 rushing attempts in the game.

pander(exp(2.451e-01))

1.278

You have an 27.8% chance for your QB to score above 25 fantasy points for every TD they run for in the game.

Explanatory Plots

Below I have included charts showing trends of the top 7 fantasy scoring QBs over the last 3 seasons according to the official Fantasy points attribute in the data set. I have charts showing trends on the 4 most important factors in my model and showing where the top QBs finish in each category.

Pass Yards:

ggplot(nfl_qb_top, aes(x = Date, y = pass_yds)) +
  geom_point(mapping = aes(color = player), pch = 21, formula = "y~x")+
  geom_smooth(mapping = aes(x = Date, y = pass_yds, color = player), se = FALSE) +
  labs(title = "Passing Yards per Game (2019-2022)", subtitle = "QBs over 900 Total FP", xlab = "Date", ylab = "Pass Yards")+
  theme_classic()

Pass TDs:

ggplot(nfl_qb_top, aes(x = Date, y = pass_td)) +
  geom_point(mapping = aes(color = player), pch = 21, formula = "y~x")+
  geom_smooth(mapping = aes(x = Date, y = pass_td, color = player), se = FALSE) +
  labs(title = "Passing TDs per Game (2019-2022)", subtitle = "QBs over 900 Total FP", xlab = "Date", ylab = "Pass TDs")+
  theme_classic()

Rush Attempts:

ggplot(nfl_qb_top, aes(x = Date, y = rush_att)) +
  geom_point(mapping = aes(color = player), pch = 21, formula = "y~x")+
  geom_smooth(mapping = aes(x = Date, y = rush_att, color = player), se = FALSE) +
  labs(title = "Rushing Attempts per Game (2019-2022)", subtitle = "QBs over 900 Total FP", xlab = "Date", ylab = "Rush Attempts")+
  theme_classic()

Rush TDs:

ggplot(nfl_qb_top, aes(x = Date, y = rush_td)) +
  geom_point(mapping = aes(color = player), pch = 21, formula = "y~x")+
  geom_smooth(mapping = aes(x = Date, y = rush_td, color = player), se = FALSE) +
  labs(title = "Rushing TDs per Game (2019-2022)", subtitle = "QBs over 900 Total FP", xlab = "Date", ylab = "Pass TDs")+
  theme_classic()

Conclusion

Based off of the regression performed and reviewing the explanatory plots. I would say that Josh Allen and Patrick Mahomes should be your top 2 considerations for fantasy football next year as Allen is a versatile thrower that also is very consistent scoring rushing TDs which we have shown to be valuable in scoring large amounts of fantasy points. Mahomes should be right behind him as he is a top thrower that does scramble from time to time and gain value that way but he is not a consistent and reliable runner. All the other QBs seem to be on even field as they are either middle of the pack on all the categories or excel at either throwing or running but under performs on the other end.