NBA Elo Ratings

I made some colorful graphs. Here they are:

How the Eastern Conference's Elos have developed over the course of the season

How the Western Conference's Elos have developed over the course of the season

As awesome as colorful graphs are, why did I make them? I started playing chess seriously at the beginning of the COVID lockdown. I find chess fascinating, mostly for the usual reasons, but also because of the grip that one algorithm has over millions of people. The Elo algorithm is what's used to compute the relative scores of chess players. You get points depending on the expected value of your match, where 0 is a loss, 1 is a win, and .5 is a tie. The difference between expected and actual outcome is then used to alter your Elo score, so it goes up if you win, and down if you lose. Our algorithm will also reward teams for winning wih a high margin of victory. Both over the board and online, there's a complete obsession in chess with quality of results: as long as you win, it doesn't matter how. You get your Elo points regardless. What if we applied this metric to basketball? What if we don't care about injuries, or margin of victory?

Through the end of the 2022-23 NBA season, FiveThirtyEight published their NBA predictions, which were based on a mixture of advanced basketball statistics and Elo score. I'm using their work as inspiration for my own project. The goal is to produce accurate, insightful ratings for teams that have predictive capabilities. The code for this project, which is still ongoing, is available in this GitHub repository.

First, regarding our retrospective regular season ratings: they're pretty good. The most notable indication of this is the Philadelphia 76ers, who lost star center Joel Embiid to injury at the end of January. Similarly, we can track how the three way dogfight for the top seed in the West was impacted by Minnesota forward Karl Anthony Towns' injury, and suggest that his teammate Anthony Edwards is the one doing most of the heavy lifting for that Timberwolves team. We can also track the historically awful seasons of the Pistons and Wizards, as well as measure just how good this Celtics team is. Generational.

Now, for the playoffs. The math behind the Elo system generates probabilistic results for each game. We can take those results, update the rating recursively, and then implement logic in Python to simulate the NBA playoffs. All of this only takes about a tenth of a second, so it is a relatively easy problem to brute force. This is good, because calculating the actual conditional probabilities using Bayes' Theorem would take far to long to run on any machine. Using tens of thousands of simulations, we can estimate the probability of almost anything that may occur during the postseason. In my case, I'm tracking the probability that each team makes it to a given round of the playoffs, or wins the whole thing. These predictions are returned in Pandas dataframes that are super easy to work with; if you'd like any data or specific predictions, please feel free to reach out.

Now finally, the moment you've all been waiting for. My probabilistic predictions for the destination of this year's NBA Championship: Last year's predictions:

My probabilistic NBA Championship predictions as of 4/1/2024