NFL Ratings - Introduction
Published:
======
Predicting NFL outcomes with an Elo rating system - Introduction
Every year, I play a pick’em competition with my family. This consists of predicting the spread winner and over/under for each NFL game in the season. If you don’t know what those terms mean, don’t worry, I’ll get to it below, in the background section.
Truth be told, I don’t typically do well in this game. So this year, I decided to take a data-based approach. In this blog post, I’ll describe the Elo system that I’ve designed in order to predict outcomes.
Background
Spread This is the expected discrepancy between the favored team and the underdog. So if Tampa Bay is playing Detroit, and they are favored by 6.5 points, the spread would be written as either “Tampa Bay -6.5” or “Detroit +6.5”. If you bet Detroit to cover the spread, then you would win the bet as long as Detroit loses by less than 7 points.
Over/Under This is the expected total score of the game. So if the home team scores 21 points, and the away team scores 7, the total score would be 28. When betting on an over/under, Vegas sets the line, and betters decide whether they think the total score will be over or under.
Elo Rating System
“Elo” is a traditional rating system for zero-sum games. Elo is a score assigned to each team that represents their team-strength. It is derived from that team’s performance in a closed pool (e.g., the NFL) of zero-sum games. After each game played, a certain number is added to the winning team’s rating, and subtracted from the losing team. This number is determined by a couple of factors, including the pre-game elo of each team, and the margin of victory.
Let’s get a little more detailed. I based this system is based off the system used by FiveThirtyEight.
Probability of Winning
Using elo, you can estimate the probability of team A winning a given game as:
\[\begin{equation*} Pr(A) = \frac{1}{10^{\frac{-Elo Diff}{400}} + 1} \end{equation*}\]Margin of Victory Multiplier
\[\begin{equation*} MOV = \ln{(PointDiff+1)} \times \frac{2.2}{EloDiff \times 0.001 + 2.2} \end{equation*}\]Elo Update The post-game shift in Elo is calculated as:
\[\begin{equation*} Shift = K * MOV * (Result - Pr(A)) \end{equation*}\]Here, “Result” is 1 if team A won the game, 0 if team A lost, and 0.5 if they tied. K is a term that represents the recency bias of the algorithm. The above “Shift” is added to team A’s elo, and subtracted from team B’s elo.
Since K and MOV are strictly positive, you can see that a result of 1 will yield a positive shift1.
Conclusion
The repository described in this blog post can be found here.
In the future, I’m hoping to split a team’s Elo into defensive and offensive ratings. This should help when it comes to over/under predictions.
This assumes that Pr(A) is strictly less than 1, which is a safe assumption. Pr(A) can only reach 1 in the limit as the difference in Elo between each team grows to infinity. ↩