If you’re watching a sporting event, at any given time there is a probability your team will win or lose. If your team is ahead by a lot, they’ll probably end up winning. If the opposite case is true, they’ll probably lose. If the Vegas odds are in favor of your team, that matters (but only at the beginning of the game). If your team has possession of the ball, that matters too.

During this year’s NFL playoff’s we had a great picture of how these probabilities unfolded when the Indianapolis Colts ended defeating the Kansas City Chief after being down by 28 points fairly late in the game. At one point, the Chiefs had over a 99% chance of winning. They ended up losing.

Source: ESPN

The above graph shows us the 60-minute journey to the Colts’ 45-44 win two weekends ago. After a brief back-and-forth during the first quarter, the Chiefs looked like almost-guaranteed winners for most of the game. But then the Colts overcame a 28-point deficit in one of the biggest comebacks in NFL playoff history. The Win Probability model mirrored these momentum shifts.

So what is it that makes this model tick? Three major factors working in tandem:

1. Vegas Odds

Sports bookies begin each week by determining the point spread, and they decided the Colts were 2.5-point favorites. At the beginning of a game, because there is plenty of football left to be played, the odds of winning stay relatively close to what the bookies say. The Chiefs leading by 7 in the first quarter didn’t give us (or the model) enough information to pick a winner.

2. The Scoreboard

As the game progresses, though, the scoreboard becomes key. The model can tell us how likely teams in the past have been to win based on the current score and time left in the game. ESPN’s model is based on 10 years-worth of NFL play-by-play game data, which is a lot of plays. At halftime, with the Chiefs up 31-10, it calculated that they had a 96.4% chance to win. A team winning by 3 touchdowns at half is historically an almost sure pick.

3. Field Position

Towards the end of the game, as there is not much time left, a team’s chances to take the lead are more dependent on where they are on the field and who has the ball. For example, a team that is up by 3 has a much better chance of winning if they’re on the opponent’s 1-yard line than on their own 1-yard line. Why? Because, historically, being on the opponent’s 1-yard line gives a team an expected value of 6.9 points on the next play.

Brian Burke at Advanced NFL Stats puts a lot this together in an interesting chart below. Assuming the team has possession of the ball, how likely are they to win based on the current score and how much time is left.