Predicting Formula 1 results with Elo Ratings
By: Ville Kuosmanen
Tags: Sports, Formula 1, Analytics, Data Science, Sports Analytics

Formula 1 races are further complicated by the qualifying, which sets out the grid order for a race. Because a driver’s grid position has significant impact in their expected finishing position, the Elo score for a participant is adjusted up or down based on their grid position. The grid-adjusted Elo score (gaElo) is the score used to predict race results for a driver. Like in the qualifying model, the predictions are generated with a Monte Carlo simulation where during a simulation each driver, constructor, and engine’s gaElo-score is randomly adjusted up or down. A chance of a driver retiring from the race is also simulated here. By running the simulation multiple times, percentual probabilities for each driver’s finishing positions can be calculated.

As mentioned before, the race model’s predictions depend on a given starting grid. Besides the grid decided on Saturday’s qualifying session, we can also use the qualifying model’s simulated qualifying results to generate a race prediction. This is called a “pre-quali prediction”, and it tends to have a larger variance of scores than the “after-quali prediction”. This is understandable, because the pre-quali predictions contain twice the uncertainty. Building pipelines that allow the two models to be run sequentially was not easy, but the result is quite rewarding!

Predictions generated by the race model are presented in the project’s website along with the existing qualifying model. Predictions for the 2020 Eifel GP in Germany are generated by the current model, while the earlier ones were generated by experimental models.

A screenshot of race predictions for Max Verstappen. Image by Ville Kuosmanen

The model’s performance was measured against two benchmarks: a random model, which predicts results randomly, and a model that always predicts results to be the same as the starting grid. Our evaluation shows the model outperforming the benchmarks, though only barely when compared to the grid-based model, showing that the model still has a long way to go in terms of accuracy. The race model especially struggles in predicting results for fast drivers who start at the back of the field due to grid penalties or issues in qualifying, which is something we want to address in the future.

The race model still has a lot to improve upon. Despite this, I do not believe the race model can ever match the performance of the qualifying model: Formula 1 races feel inherently more random than qualifyings (whether this is really true remains to be proven). The next features we would like to work on include giving predictions for the entire championship by simulating races further on to the future. Just like connecting the qualifying model with the race model, this is an engineering problem requiring the construction of new data pipelines. I would also like to improve the explainability of the model (a topic I have written about in recommender systems) by showing some insights into the model’s inner workings on the website. It would also be interesting to investigate data from pre-season testing: both the race and qualifying model tend to perform worst at the beginning of each season as the balance of power between constructors is shaken up.

If you’re interested in learning more about our Formula 1 predicting project, you can check out the project page (complete with open-source code) on GitHub. And while as an engineer I would love to see a model that could perfectly predict the results of each race, as a spectator it’s refreshing to be proven wrong with an unexpected race winner every once in a while!