Case study / 02 · Data Science · ML

How to Win a Formula 1 Race

A data-driven look at how driver performance, qualifying position, pit stops, and weather shape racing outcomes.

Data Science · ML
UC San Diego · COGS 108
PythonPandasData VisualizationLinear RegressionRandom Forest

The question

How do driver performance metrics, weather conditions, and pit-stop times affect the probability of winning a Formula 1 race? The team studied historical Formula 1 results and enriched race data to understand the factors associated with finishing performance.

Research & modeling

01
Explore historical race data

Cleaned and integrated driver, constructor, race, qualifying, pit-stop, and weather data to explore relationships with race outcomes.

02
Build predictive baselines

Investigated a linear regression approach for estimating finishing position using race and performance features.

03
Predict position changes

Trained a Random Forest classifier to predict categories of grid-to-finish position improvement from driver points, constructor points, starting grid position, circuit, pit stops, and wet-race status.

Selected result

72.7%Reported test-set accuracy for position-improvement classifier
80 / 20Training / testing split
1950–2023Historical dataset period described in the report

The notebook identifies driver championship points, starting grid position, constructor points, and circuit information as influential model features. These are associations in the explored data, not proof of causal effects.

What I took away

Race strategy is a multi-variable problem: driver form, team resources, track context, and the starting grid all interact. Modeling race outcomes means considering both sporting intuition and data limitations.

Explore the original work

Read the project notebook ↗Watch the project video ↗

Explore the work

Read the original project materials behind this case study.