<iframe src="https://nfl-win-prob-tool.onrender.com"
        width="100%"
        height="900"
        style="border: 17px solid black;">
</iframe>

If you follow sports, you’ve likely seen a win probability graph, which charts a team’s win probability during various stages of a game. I’ve always liked these graphs because they neatly summarize a game’s narrative. If one team gets ahead and stays in control, then you’ll see a line that steadily approaches 100%. If there is chaos, with both teams taking and blowing leads, then you’ll see a line that rapidly oscillates between close to 0% and 100%. Win probability models have use beyond making these fun charts. Sportsbooks, for example, rely on these models for calculating live betting moneylines.

If you follow sports, you’ve likely seen a win probability graph, which charts a team’s win probability during various stages of a game. I’ve always liked these graphs because they neatly summarize a game’s narrative. If one team gets ahead and stays in control, then you’ll see a line that steadily approaches 100%. If there is chaos, with both teams taking and blowing leads, then you’ll see a line that rapidly oscillates between close to 0% and 100%. Win probability models have use beyond making these fun charts. Sportsbooks, for example, rely on these models for calculating live betting moneylines.

I recently decided to try making an NFL win probability model with the goal of deepening my understanding of the statistics and machine learning tools needed for model construction and evaluation. When I first tried to make a model a couple years ago, my approach was logical but oversimple. I gathered about 25 years of NFL play-by-play data, with each row (or snapshot) containing the time remaining, the home score, the away score, the pregame spread, the down and distance, the field position, and the game’s end result. To predict the home team’s probability of winning in some situation— say they were up 10 in the 2nd quarter at midfield— my model ran a search for snapshots in my database that matched those circumstances, and then calculated the proportion of those snapshots in which the home team won. This proportion represented the home team’s win probability. This model wasn’t terrible, but it was prone to overfitting. Just a few unusual past results could distort the probabilities and give misleading estimates. For example, say I wanted to calculate the win probability for a team winning at half time by 33 points. Intuition tells us that the probability of victory should be close to 100%. However, when my search engine looks for games with similar circumstances, it finds a 2022 game between the Colts and Vikings, in which the Vikings trailed by 33 at half but miraculously stormed back to win 39-36. Consequently, the engine drastically underestimates the leading team’s probability of victory.

To remedy this issue, I considered building a multiple logistic regression model, but my feeling was that such a model would be too simple.