Friday, January 16, 2015

NBA Win Probability - Take Two

On the eve of the 2014-15 NBA season, I hinted at new features I planned on adding to my NBA Win Probability tools. I believe the word I used was "soon", and I suppose this qualifies, but it took a bit longer than expected. I'm not sure what went wrong, I even took into account Hofstadter's Law.

The new graphs and their corresponding features version use a different data source that goes back to the 1996-97 NBA season. I just have current season results up now, but I have plans to add prior seasons in the coming weeks, barring any data issues or website strain (I'm dying to see what Tracy McGrady's 13 points in 35 seconds looks like on a win probability graph).

With the new data source, I created a new win probability model, removing some of the kludge-iness of the old version. The new model appears to perform better out of sample, resulting in a higher log likelihood score for the 2014 season, compared to the existing version.

With the new tools, there is a lot to rollout, and some of it is still a work in progress. But I'll start with the win probability graphs. Here is a link to the new, improved, version: NBA Win Probability Graphs and Box Scores. In most respects, this looks very similar to the old version, but with some added features:

  • Real Time Axis - You now have the option of viewing a game's win probability graph as it developed in real time, as opposed to just game time (just check the "Real Time" box). Here is how last night's Cleveland Cavaliers - Los Angeles Lakers win probability developed in normal game time:

And here is how that same graph looks in real time:

As one would expect, you have a large gap at halftime, and smaller gaps after the first and third quarters. Also as expected, the fourth quarter takes up much more space on the graph in the real time version. The final minute of NBA game time alone lasts five real minutes on average (even longer if the game is close).

  • Pre Game Odds - Next to the "Real Time" check box, there is an option for "Pre Game Odds". When this is selected, the win probability graph no longer starts at 50%, but reflects the pre-game win probability, as implied by the Vegas point spread. Please note that only the graphs, Excitement Index, and Comeback Factor are updated when this option is activated. The player win probability added metrics stay unchanged. Here is that same Cavs-Lakers game with pre-game odds:

The Lakers were six point underdogs at home, and started the game with a win probability of 28%. Even with an eight point lead early in the second quarter, their win probability never cracked the 50% line.

  • Leverage - Underneath the margin graph, there is a new graph labelled "leverage" that looks like this:

Inspired by Fangraph's leverage index for their MLB win probability graphs, this chart attempts to convey the relative importance of each play of the game, according to how much the play's outcome could have affected win probability. The graph currently shows leverage for the following play types: field goals, free throws, and rebounds. I chose these plays because their outcome is binary, and thus relatively easy to calculate leverage for.

For each play, I calculate what the win probability would have been if the opposite outcome had occurred. If the shot was missed, I calculate the win probability in the event of a make. If a team grabs an offensive rebound, I calculate the win probability if the defense had grabbed the rebound instead. To calculate leverage, I am using "Recipe #2" from Tom Tango's pioneering article on the subject. You can mouse over each bar for the particulars of each play.

Here is what the leverage chart looks like for a blowout:

And here is a leverage chart for an exciting multiple overtime game:

  • Player Sparklines - Next to each player's win probability box score is a sparkline. This displays how each player's cumulative win probability added developed throughout the game. I'm still playing around with the format on this one, but it gives you a sense as to when each player made their meaningful contributions. 
Consider this a soft launch for now, as I work on rolling out the rest of the existing features in this new framework (win probability calculator, player win probability added, and the top games finder). The old versions will all continue to run for now, but will most likely be brought down once the new suite of tools is up and running smoothly. Check back for more developments and new features in the coming weeks. And let me know if anything looks odd.

No comments:

Post a Comment