Look at Mercedes, 2025. Twenty-three qualifying sessions have a time for both George Russell and Andrea
In This Chapter
- 21.1 The problem: one lap time, two causes
- 21.2 The qualifying head-to-head and the median gap
- 21.3 Race pace, consistency and what qualifying misses
- 21.4 Wet ability: the smallest samples in the book
- 21.5 An Elo rating from teammate duels
- 21.6 Driver effects and car effects in one model
- 21.7 The teammate chain: Hamilton vs Verstappen
- 21.8 What the numbers cannot tell you
- Spaced Review
- Project Checkpoint: ratings.py
- Chapter Summary
- What's Next
Chapter 21 — Driver Comparison: Separating Driver Skill from Car Performance — The Hardest Problem in F1 Analytics
Look at Mercedes, 2025. Twenty-three qualifying sessions have a time for both George Russell and Andrea Kimi Antonelli in a session they both reached. In 21 of them Russell is faster. Measured on the best session both drivers completed, the median gap is 0.405 % of a lap in Russell's favour, about 0.35 s. Resample the rounds a thousand times and the 95 % interval for that median runs from +0.271 % to +0.520 %. It never comes near zero. On this evidence Russell is the quicker qualifier, and it is not close.
Now look at the same two drivers in the same team in 2026, after 21 of 23 rounds:
Antonelli vs Russell (Mercedes), Antonelli's gap (negative = Antonelli faster)
2025: n=23 median=+0.405 % (bootstrap 95% CI +0.271 to +0.520) mean=+0.491 % Antonelli ahead 2-21 median gap in s +0.350
2026: n=21 median=-0.241 % (bootstrap 95% CI -0.352 to +0.240) mean=-0.011 % Antonelli ahead 12-9 median gap in s -0.222
The sign has flipped. Antonelli out-qualifies Russell 12–9, and his median gap is now 0.241 % faster. He also clinched the 2026 drivers' championship at the Mexico City Grand Prix (round 19). The interval is the honest part of the story, though. It runs from −0.352 % to +0.240 %, so it includes zero. The 2026 data say Antonelli went from clearly slower to level or ahead. They do not yet say he is clearly faster.

📊 Figure (described): One bar per qualifying session, 2025 on the left and 2026 on the right of the dashed line. Orange bars (Russell faster) dominate 2025, and the season median sits at +0.40 %. In 2026 blue bars (Antonelli faster) are the majority and the median drops to −0.24 %, but several large orange bars remain. The takeaway: the same pair in the same team produced opposite answers one year apart.
Sit with that for a moment, because it is the whole problem of this chapter in miniature. These two drivers shared a team, a factory, a strategy department and, as far as the public can tell, the same car specification. That is as close to a controlled experiment as Formula 1 ever gets. And the experiment's answer changed from one year to the next. A young driver improved, or a new car (the 2026 regulations changed almost everything) suited him better, or both. The data cannot tell those apart.
If the cleanest comparison in the sport moves this much, how could we ever compare Lewis Hamilton with Max Verstappen? They have never been teammates. They have never driven the same car in the same season. Every claim about who is "better" has to travel through other drivers: through Jenson Button, Valtteri Bottas, Sergio Pérez, Charles Leclerc and Carlos Sainz, each link carrying its own noise.
This chapter builds the tools that make that comparison as honest as it can be. We start with the teammate method: the qualifying head-to-head and the median percentage gap, then race pace, consistency and wet-weather performance. We then build two rating systems, an Elo rating from teammate duels and a regression with driver and car-season effects. Finally we put Hamilton and Verstappen through the teammate chain, with intervals, and say exactly what the data can and cannot conclude. Along the way we will try to answer the question every fan asks first: how much of performance is the car? You will see why the honest answer is a range that depends on the season and the method, not "80 %".
🏎️ Fan Track: Read 21.1–21.4 for the teammate method and what it can show, then 21.7 for the Hamilton–Verstappen comparison. The code is optional; each figure description carries the result.
📊 Analytics Track: The core is 21.5–21.7: Elo, the driver + car-season regression and the bootstrapped teammate chain. These are the methods you will reuse in Chapter 26.
🎰 Betting Track: 21.2 (how many rounds before a head-to-head means anything) and 21.5 (Elo's calibration) are the parts that touch teammate head-to-head markets.
21.1 The problem: one lap time, two causes
Every lap time is a product of two things we cannot observe separately: what the car can do, and how much of that the driver extracts. The physics is simple to state. In Chapter 1 the cornering limit came from the friction circle: the tyres can supply a lateral force of at most $\mu N$, and downforce raises $N$. That sets a capability envelope, the fastest lap physically possible for that car on that day. The driver then decides how close to the envelope to run: where to brake, how early to commit to throttle, how much margin to leave at the apex.
A useful way to write this is
$$ t_{ij} = T_j \,(1 + \delta_i) \, (1 + \varepsilon_{ij}) $$
where $t_{ij}$ is the lap time of driver $i$ in car $j$, $T_j$ is the car's best possible lap at that circuit, $\delta_i$ is the driver's fractional shortfall from that limit, and $\varepsilon_{ij}$ is everything else on the day: traffic, track evolution, a gust, a mistake. In plain English: the car sets the target, and the driver's skill is how small a fraction they leave on the table.
The trouble is immediate. We see $t_{ij}$, never $T_j$. A fast lap could be a great car with an average driver or an average car with a great driver. With one car per driver, the equation has more unknowns than observations. That is the identification problem, and no amount of data from a single driver solves it.
The teammate as control group
Formula 1 hands us one partial fix. Each team runs two cars, built to the same specification and run by the same organisation. If drivers $a$ and $b$ share car $j$, take logs and subtract:
$$ \ln t_{aj} - \ln t_{bj} \approx \delta_a - \delta_b + (\varepsilon_{aj} - \varepsilon_{bj}) $$
The car term $T_j$ cancels. What is left is the difference in driver shortfalls plus noise. For gaps of a few tenths, the log difference is almost exactly the percentage gap, which is why this book measures teammate gaps in percent of lap time.
📐 Definition: teammate qualifying gap. For each round and team with two qualifiers, take the best common session: the latest of Q3, Q2 and Q1 (or the single session in older formats) in which both drivers set a time. Then $\text{gap}_\% = 100 \times (t - t_\text{mate}) / \tfrac{1}{2}(t + t_\text{mate})$. Negative means faster. The two drivers' values are exact opposites. This is the toolkit's
metrics.teammate_quali_gap; summarise a season with the median, not the mean.
Worked number. In the 2025 Mercedes pair above, the median gap was +0.405 % for Antonelli. On a lap of about 86 s that is 0.405/100 × 86 ≈ 0.35 s, which matches the median gap in seconds the script printed (+0.350 s). Percent is the right unit because the same driver advantage is worth more seconds on a long lap: 0.3 % is 0.22 s at a 72 s lap and 0.32 s at a 106 s lap. Comparing seconds across circuits would mix lap length into the driver signal.
Why the best common session and not each driver's best lap of the day? Because qualifying is a knockout. If one driver reaches Q3 and the other is eliminated in Q2, their best laps were set at different times, on a different track (rubber goes down as the session runs, which Chapter 16 measured as track evolution) and possibly on different fuel and tyre plans. The best common session compares like with like: both drivers, the same session, the same track state.
What the teammate does not control
The teammate method is the best tool we have, but it is not a laboratory. Four things leak through.
- Setup and specification. Two cars of the same team can carry different setups, and occasionally different upgrade parts when only one set is available. A setup that suits one driver's style is a real advantage that the method credits to the driver.
- Run plans. In qualifying, one driver may give the other a tow, go out first on an evolving track, or be sent out in traffic. These are team decisions, not driver skill.
- Reliability and incidents. A power-unit problem in Q2 or a crash in Q3 produces a huge gap that says nothing about pace. That is one reason the canonical summary is the median.
- The other driver. A gap measures a driver against one person. Beating a weak teammate by 0.5 % and beating a strong one by 0.1 % may reflect the same ability.
The last point is the seed of everything from 21.5 onwards. A teammate gap is a relative measurement, and to rate drivers on one scale we have to connect the pairs.
🔄 Check your understanding 1. Why is the teammate gap measured in percent rather than seconds? 2. Driver A is eliminated in Q2; driver B reaches Q3. Which session's times does the canonical gap use?
Answer
- The same relative advantage is worth more seconds on a longer lap; percent removes lap length so gaps can be pooled across circuits. 2. Q2, the latest session in which both set a time. B's Q3 lap was set on a later, faster track and is not comparable.
21.2 The qualifying head-to-head and the median gap
Qualifying is the purest comparison we have. It is one lap, on low fuel, on new tyres, with no strategy and (in principle) no traffic. Two summaries dominate. The head-to-head (H2H) count is how many sessions each driver won. The median gap is how far ahead they typically were. The first is what broadcasters show; the second carries more information, because it knows the difference between winning by a hundredth and winning by half a second.
Here is the 2026 picture, computed by code/01_teammate_gaps.py on Jolpica qualifying with the corrupt
times removed (the dump contains a few impossible values, such as a 1,053 s "lap"; times more than
1.25 times the round's median are dropped first):
gaps = ratings.teammate_gaps() # one row per driver per round, 1994-2026
h = ratings.head_to_head(gaps, years=2026) # median gap, rounds ahead, Wilson CI per driver-season
h = h[(h.median_gap_pct <= 0) & (h.n >= 5)] # the faster driver's row of each pair, >= 5 rounds
2026 teammate qualifying duels (faster driver first; best common session; median of rounds)
team_ref driver teammate n median_gap_pct h2h share
alpine Gasly Colapinto 21 -0.380 16-5 76% (55-89)
williams Sainz Albon 20 -0.365 16-4 80% (58-92)
aston_martin Alonso Stroll 19 -0.355 17-2 89% (69-97)
haas Bearman Ocon 17 -0.258 13-4 76% (53-90)
audi Hülkenberg Bortoleto 21 -0.250 12-9 57% (37-76)
mercedes Antonelli Russell 21 -0.241 12-9 57% (37-76)
red_bull Verstappen Hadjar 16 -0.148 12-4 75% (51-90)
cadillac Pérez Bottas 21 -0.123 12-9 57% (37-76)
mclaren Norris Piastri 21 -0.119 14-7 67% (45-83)
rb Lawson Lindblad 18 -0.096 11-7 61% (39-80)
ferrari Leclerc Hamilton 21 -0.047 13-8 62% (41-79)
The share column is the head-to-head win share with a Wilson 95 % interval (canonical for
proportions; see Appendix E). Look at how
wide those intervals are. A 12–9 head-to-head is a 57 % share with an interval from 37 % to 76 %: it is
consistent with anything from "clearly slower" to "clearly faster". Even 16–5 only just excludes a coin
flip.

📊 Figure (described): Each row is a 2026 teammate pair (faster driver named first), each dot a round, the black diamond the median, and the right-hand column the head-to-head. Medians all sit between −0.05 % and −0.38 %, yet individual rounds spread over more than a full percent for most pairs. The takeaway: a single qualifying session tells you very little; the median of a season tells you a lot more.
Three things stand out.
The medians are small. No 2026 pair (with at least five rounds) is separated by more than 0.38 %. The book's reference tables put the median absolute teammate gap at 0.355 % for 2026 and between 0.356 % and 0.383 % for every season 2023–2026. Historically gaps were larger: the median |gap| was 0.661 % over 1994–2005 against 0.359 % over 2014–2026 (n = 1,228 and 2,700 team-rounds). Teammates have become closer, which is one face of theme 4: the margins are impossibly small.
The rounds are noisy. The Leclerc–Hamilton row has a median of −0.047 %, a gap of about 0.04 s, but its rounds range from −0.5 % to +0.3 % plus one clipped outlier. Single sessions are dominated by the noise term $\varepsilon$: a yellow flag, a lock-up, a tow.
Two drivers can look different by H2H and by median. Hülkenberg–Bortoleto and Antonelli–Russell have the same 12–9 head-to-head, but median gaps of −0.250 % and −0.241 % with very different spreads. Bearman–Ocon (13–4) has a similar median to both. The H2H is a coarse, robust summary; the median gap is a finer one. Report both, with n.
⚠️ Common pitfall: averaging teammate gaps. The mean is fragile. Over 2014–2026 there are 63 team-rounds (of 2,700) where the gap exceeds 3 %: a crash, a mechanical failure, a deleted lap that left only a Q1 banker. The 2023 Albon–Sargeant season has a median of −0.606 % but a mean of −2.324 %; Verstappen–Tsunoda 2025 has −0.740 % against −1.875 %. Across the 133 teammate-seasons with at least ten rounds, the mean and median differ by a median of 0.106 percentage points, but by more than 0.6 points in one season in ten. Fix: summarise with the median (the canonical choice), and if you must average, trim gaps beyond a stated threshold first.
How many rounds before a head-to-head means anything?
🧩 Productive struggle. Before reading on, guess. A pair's true season gap is 0.2 %. After five qualifying sessions, how often does the five-round median have the right sign? 60 %? 80 %? 95 %? Now do the same for a pair whose true gap is 0.05 %. Write your guesses down.
We can answer this with the data instead of a formula. Take every teammate-season from 2014–2026 with at least 18 timed rounds (106 of them). Treat the full-season median as the "truth". Then draw $k$ rounds at random from that season, without replacement, 300 times, and check how often the $k$-round median has the same sign as the season's. Group the pairs by how big their season gap was:
full pair-seasons used (n >= 18 rounds, 2014-2026): 106
|season median| < 0.10 % n= 28 k=3: 61% k=5: 63% k=8: 65% k=12: 72% k=16: 81%
0.10-0.30 % n= 44 k=3: 77% k=5: 82% k=8: 88% k=12: 93% k=16: 98%
> 0.30 % n= 34 k=3: 92% k=5: 96% k=8: 99% k=12: 99% k=16: 100%

📊 Figure (described): The x-axis is the number of rounds sampled, the y-axis the share of samples whose median has the season's sign. Pairs separated by more than 0.3 % are called correctly 96 % of the time after five rounds; pairs between 0.1 % and 0.3 % reach 82 %; pairs closer than 0.1 % stay near a coin flip (63 %) after five rounds and reach only 72 % after twelve. The takeaway: how fast a head-to-head becomes informative depends almost entirely on how close the pair really is.
So, for your guess: a 0.2 % pair (the middle band) gets the sign right about 82 % of the time after five rounds. A pair separated by less than 0.1 % is still a near coin flip after five rounds. One caution: at $k = 16$ we are sampling 16 of 18–24 rounds without replacement, so the sample is most of the season and agreement is partly built in. The left half of the chart is the informative part.
🔍 Why this works. The median of $k$ noisy values has a standard error of roughly $1.25\,\sigma/\sqrt{k}$, where $\sigma$ is the round-to-round spread. If the true gap $\theta$ is large relative to that standard error, the sign is settled quickly; if $|\theta|$ is small, it takes many rounds. The probability of the right sign is roughly $\Phi(|\theta|\sqrt{k}/1.25\sigma)$. Doubling the true gap has the same effect as quadrupling the number of rounds. That is why the three curves separate so cleanly.
📺 On the broadcast: When the graphic says "qualifying head-to-head: 3–2" after five races, the data say that number is almost uninformative for a close pair. When a commentator says a driver "has the measure of his teammate" by mid-season, check the median gap: if it is under 0.1 %, the season is still a coin flip in disguise.
21.3 Race pace, consistency and what qualifying misses
Qualifying measures one lap. Races are 50–70 laps of tyre management, fuel burn, traffic and strategy. A driver can be quick over one lap and ordinary over a stint, or the reverse. So we also want a race comparison, and it is much harder to make fair.
The fair version needs the two cars on the same compound, at similar fuel and similar tyre age, in clean air. Chapter 20 built the pieces: the canonical clean lap and the fuel correction. Here we use them in a teammate design:
📐 Definition: same-compound race-pace gap. For one race and one team, for each dry compound both drivers used, take their canonical clean laps, fuel-corrected with the toolkit's assumption defaults (100 kg start fuel, 0.03 s/kg), and keep only the lap window both drivers covered on that compound. Fit $t^{fc} = \beta_0 + \beta_1\,[\text{driver} = a] + \beta_2\,\text{tyre age}$ by OLS. $\beta_1$ is the gap at equal tyre age and similar fuel. Combine compounds weighted by $\min(n_a, n_b)$ laps. This is
ratings.teammate_race_pace(session).
Because both drivers are on the same compound in the same part of the race, most of the fuel correction cancels. The fuel assumption matters much less here than in absolute race pace, which is one advantage of the teammate design.
lp = metrics.fuel_corrected(f1data.laps(session, clean=True)) # canonical clean laps, ASSUMPTION fuel
w = gc[gc.lap_number.between(lo, hi)] # this compound, the common lap window
X = np.column_stack([np.ones(len(w)), (w.driver_ref == a), w.tyre_age])
beta, *_ = np.linalg.lstsq(X, w.lap_time_fc.to_numpy(float), rcond=None) # beta[1] = a minus b
Here is one race in full, the most recent in the data, the 2026 Las Vegas Grand Prix:
2026 Las Vegas GP: same-compound race-pace gap, a minus b (negative = a faster)
team_ref a b gap_s gap_pct n_laps compounds
alpine colapinto gasly +0.140 +0.146 40 MEDIUM+SOFT
aston_martin alonso stroll -0.396 -0.402 38 MEDIUM+SOFT
audi bortoleto hulkenberg +0.022 +0.023 40 MEDIUM+SOFT
cadillac bottas perez +0.817 +0.834 16 SOFT
ferrari hamilton leclerc -0.118 -0.122 40 MEDIUM+SOFT
haas bearman rafael_camara -0.631 -0.646 23 SOFT
mclaren norris piastri +0.203 +0.210 40 MEDIUM+SOFT
rb arvid_lindblad lawson -0.759 -0.784 14 SOFT
red_bull hadjar max_verstappen -0.075 -0.078 17 SOFT
Read the n_laps column before the gaps. Ferrari has 40 comparable laps across two compounds; Red Bull
has 17 on one. Mercedes and Williams are missing entirely: their drivers did not overlap for at least
five clean laps on the same dry compound, so the method declines to compare them rather than compare
unlike stints. Hadjar's −0.075 s against Verstappen at Las Vegas is a 17-lap estimate on softs; on its
own it is weak evidence.
📋 Try it: Analyze this session. Run
ratings.teammate_race_paceon the 2026 Mexico City GP (the race where Antonelli clinched the title) and on the 2026 São Paulo GP. For Mercedes in each race, which compounds supply the comparison, how many laps, and does the race-pace gap have the same sign as that weekend's qualifying gap (fromratings.teammate_gaps)? Expect a table of one row per team and a short written comparison.
Do qualifying and race pace agree?
Summarise each teammate-season by the median race-pace gap over its races, and set it against the same pair's median qualifying gap. With at least five races and five qualifying rounds, 2023–2026 gives 43 teammate-seasons:
teammate-seasons with >= 5 races and >= 5 qualifying rounds: 43
quali vs race gap: Pearson r = 0.68 (p = 5.2e-07); Spearman rho = 0.68; same sign in 81% ; OLS slope 0.76 (race % per quali %)

📊 Figure (described): Each marker is a teammate-season (shape = season, colour = team). Most sit near the diagonal: the driver faster on Saturday is usually faster on Sunday, and the fitted slope is 0.76. A handful of labelled points sit far off it, for example 2026 Bottas–Pérez (qualifying +0.12 %, race +0.80 %) and 2023 Ricciardo–Tsunoda (qualifying +0.01 %, race −0.51 %). The takeaway: one-lap and race pace are strongly related but not the same skill, and the race measure is noisier.
A correlation of 0.68 is strong for sports data. The two measures agree on who is faster 81 % of the time. The slope below 1 (0.76) is partly regression dilution: the race gap is the noisier measure (fewer comparable laps, traffic, strategy), and noise in either variable pulls the fitted slope towards zero. Some named pairs:
2025 mercedes antonelli russell 23 +0.405 20 +0.179
2026 mercedes antonelli russell 21 -0.241 18 -0.223
2025 ferrari hamilton leclerc 23 +0.277 20 +0.304
2026 ferrari hamilton leclerc 21 +0.047 18 +0.012
2023 red_bull max_verstappen perez 21 -0.602 20 -0.447
2024 red_bull max_verstappen perez 24 -0.543 17 -0.462
(Columns: year, team, a, b, qualifying rounds, qualifying gap, races, race gap; a/b alphabetical, so the first row means Antonelli was 0.405 % slower than Russell in qualifying and 0.179 % slower in race pace in 2025.) Antonelli's 2025 deficit was less than half as large on Sundays as on Saturdays, and his 2026 advantage held in both. Hamilton's 2025 deficit to Leclerc was the same size in both (+0.28 % and +0.30 %); in 2026 both shrank to almost nothing.
Consistency
Fans and commentators prize consistency: lap after lap within a tenth. Measuring it needs care. A raw standard deviation of lap times mostly measures tyre wear and fuel burn, which change the lap time systematically. So we measure the scatter around each stint's trend:
📐 Definition: lap-time consistency. For each stint, fit a straight line of fuel-corrected clean lap time against tyre age; take the residuals. Consistency is the robust SD of those residuals, 1.4826 × the median absolute deviation, which ignores the odd traffic lap. Lower is steadier.
ratings.lap_consistency(session).
consistency, driver-seasons with >= 8 races: 83; median robust SD 0.352 s, range 0.233-0.546 s; plain SD median 0.501 s
2025 most consistent: max_verstappen 0.241, russell 0.255, antonelli 0.286, lawson 0.304, piastri 0.308
2026 most consistent: max_verstappen 0.283, russell 0.288, antonelli 0.299, norris 0.324, lawson 0.327
teammate pairs with both measures: 40; the more consistent driver is also the faster in race pace in 60%; Spearman rho(d_sd, race gap) = 0.25 (p = 0.12)
year-to-year Spearman of driver consistency: 2023->2024: rho 0.46 (n=19); 2024->2025: rho 0.48 (n=15); 2025->2026: rho 0.72 (n=19)
Look at the top of the lists: Verstappen, Russell and Antonelli, all in front-running cars. That is the catch. A car at the front runs in clean air, and clean air makes lap times steadier. So consistency, as measured, is partly a car and track-position property. The within-team comparison removes the car, and there the link with pace is weak: the steadier teammate is also the faster one in only 60 % of the 40 pairs, and the rank correlation (0.25) is not distinguishable from zero (p = 0.12).

📊 Figure (described): Each point is a teammate-season; the x-axis is how much steadier driver a was than b (negative = steadier), the y-axis the race-pace gap. Points scatter across all four quadrants with only a mild lower-left/upper-right tilt. The takeaway: within a team, being steadier and being faster are only loosely related.
Consistency does look like a trait, though: driver rankings correlate from one year to the next (Spearman 0.46–0.72). Some of that persistence is the car again, since drivers mostly stay with their teams. Chapter 9 builds the driver noise model (lap-time σ) that the simulator uses; this chapter's measure feeds it a teammate-relative check.
⚠️ Common pitfall: crediting the driver for the car's clean air. A leading car's lap times are steadier because nothing is in front of it. Ranking drivers by raw lap-time spread rewards whoever had the best car. Fix: compare consistency within teams, or restrict to laps with a clear gap ahead (the
intervalcolumn, races only) before comparing across teams.🔄 Check your understanding 1. Why does the same-compound race-pace method fit tyre age inside the common lap window? 2. The fitted slope of race gap on qualifying gap is 0.76, not 1. Give one statistical reason.
Answer
- Within the window both drivers carry similar fuel, but they may have pitted on different laps, so their tyres differ in age; the tyre-age term compares them at equal age. 2. Regression dilution: measurement noise in the explanatory variable (and noise generally) attenuates the slope. It can also be real: race pace may separate drivers less than one-lap pace does.
21.4 Wet ability: the smallest samples in the book
Every fan has a list of "rain masters". The appeal of wet sessions as a test is obvious: grip is low, the line changes, and the car's aerodynamic advantage matters less at low speed, so driver skill should show through more. The natural test compares a driver's gap to the teammate in wet sessions with the same gap in dry sessions. Let's do exactly that and see how much the data can bear.
First, find the wet sessions. Jolpica has no weather, so we use OpenF1 (2023 onward): a qualifying session counts as wet when more than 20 % of its laps are on INTERMEDIATE or WET tyres or carry the rainfall flag.
qualifying sessions 2023-2026 R21: 90; wet by the > 20 % rule: 9
year round wet circuit_ref
2023 8 0.91 villeneuve
2023 12 0.62 spa
2023 13 0.84 zandvoort
2024 12 0.25 silverstone
2024 13 0.76 hungaroring
2024 14 1.00 spa
2024 21 1.00 interlagos
2025 22 1.00 vegas
2026 20 1.00 interlagos
Nine sessions in four seasons. Now the measure:
📐 Definition: wet delta. For a driver in one wet session, $\Delta_\text{wet} = \text{gap}_\text{wet} - \text{median}(\text{gap}_\text{dry})$, where the dry median is over the same teammate-season (at least five dry rounds). Negative means the driver gained on the teammate in the wet. Summarise a driver by the median wet delta, with a bootstrap interval.
spread of teammate gaps: median |gap| dry 0.349 % (n = 813) vs wet 0.984 % (n = 91)
drivers with >= 4 wet sessions: 20; 95 % interval excludes 0 for 3; two-sided sign test p < 0.05 for 1 (expected by chance alone at 5 %: 1.0)
split-half check (drivers with >= 6 wet sessions, n = 19): Spearman rho +0.27 (p = 0.26)
The first line is the most important number in this section. Wet teammate gaps are almost three times as large as dry ones (median 0.984 % against 0.349 %). Some of that is skill being revealed. Much of it is chaos: a session run on a drying track, where whoever crosses the line last on the right tyre wins; a red flag; a crash. Look at the 2026 São Paulo wet qualifying: Hülkenberg's gap to Bortoleto was −10.215 % and Lawson's to Lindblad −5.190 %. Those are not skill differences.

📊 Figure (described): Each row is a driver with at least four wet qualifying sessions; the dot is the median wet delta and the bar its bootstrap 95 % interval; blue rows have intervals excluding zero. Verstappen (median −0.77 %, gained on his teammate in 8 of 9) is at the "gains in the wet" end; Stroll and Pérez are at the other. Most intervals span several percent. The takeaway: with nine wet sessions, almost nobody's wet ability is distinguishable from zero.
Three intervals of 20 exclude zero. Verstappen's is the most striking: he gained on his teammate in 8 of 9 wet sessions (sign test p = 0.039). Should we print "Verstappen is the best wet-weather qualifier of 2023–2026"? Three reasons say no.
- Multiple comparisons. We tested 20 drivers. At the 5 % level, about one false positive is expected from chance alone, and the sign test found exactly one.
- Pairs are zero-sum. Norris and Piastri were teammates in all nine sessions, so Norris's −0.921 and Piastri's +0.921 are the same data. The 20 rows are closer to a dozen independent comparisons.
- It doesn't replicate within the sample. Split each driver's wet sessions into the earlier half and the later half. If wet ability were a stable trait, the halves would agree. The rank correlation is 0.27 with p = 0.26: not distinguishable from no relationship.
The honest conclusion: four seasons of wet qualifying cannot measure wet ability. Verstappen's record is consistent with a real wet-weather edge, and also consistent with luck plus a teammate who struggled. A longer history would help, but Jolpica has no weather flag before 2023, so earlier wet sessions would have to be identified by hand from lap-time anomalies (the toolkit's history detector was tuned to exclude wet laps, not to find wet qualifying sessions).
⚠️ Common pitfall: the rain-master narrative. One spectacular wet drive is remembered for years; ordinary wet sessions are forgotten. With nine sessions and huge noise, a driver can lead this table by luck. Fix: report the n, the interval and a split-half or out-of-sample check before calling anything a skill.
21.5 An Elo rating from teammate duels
So far every number compares a driver with one teammate. To put drivers on a common scale we need to connect the pairs. The oldest tool for that is Elo, the chess rating system. The idea is transitive: Verstappen beat Ricciardo, who beat Vettel, who beat Räikkönen, so ratings can flow along the chain.
📐 Definition: teammate Elo. Every team-round with a timed pair is one duel; the driver with the faster best-common-session time scores $S = 1$, the other $S = 0$. Before the duel, driver $a$'s expected score is $$E_a = \frac{1}{1 + 10^{(R_b - R_a)/400}}.$$ After it, $R_a \leftarrow R_a + K(S_a - E_a)$ and $R_b$ moves by the same amount in the opposite direction. New drivers start at 1,500.
ratings.elo_from_duels(gaps, k).
In plain English: a driver who beats a teammate they were expected to beat gains a little; one who beats a teammate rated well above them gains a lot. Worked number. If $R_a = 1{,}700$ and $R_b = 1{,}500$, then $E_a = 1/(1+10^{-0.5}) = 0.76$. If $a$ wins with $K = 32$, $a$ gains $32 \times (1 - 0.76) = 7.7$ points. If $a$ loses, $a$ drops $32 \times 0.76 = 24.3$.
Choosing K honestly
$K$ sets how fast ratings move. Too small and they never catch up with a driver's real level; too large and they chase noise. Elo has a built-in validation: each duel is predicted before it happens, using only earlier results. So we can score the predictions with log loss, which punishes confident wrong predictions heavily, and pick the $K$ that predicts best. We let the ratings warm up on 1994–2005 and score every duel from 2006:
duels 1994-2026: 5,542; scored from 2006: 4,310; coin-flip log loss = 0.6931
K = 2: log loss 0.6653
K = 8: log loss 0.6371
K = 16: log loss 0.6239
K = 24: log loss 0.6189
K = 32: log loss 0.6176
K = 48: log loss 0.6201
K = 64: log loss 0.6261
best K = 32
pre-duel favourite out-qualified the teammate in 66.1% of 4,310 duels from 2006

📊 Figure (described): Log loss of the pre-duel predictions (lower is better) against the K factor on a log scale, with a dotted line at the coin-flip value ln 2 = 0.693. Every K beats the coin flip; the curve bottoms out at K = 32 (0.6176) and rises on either side. The takeaway: past duels predict future duels, but only modestly: the favourite wins two times in three.
Is it calibrated, meaning do favourites given a 75 % chance win about 75 % of the time?
calibration (favourite's predicted vs observed win share):
n predicted observed
(0.5, 0.6] 1308 0.550 0.543
(0.6, 0.7] 1204 0.651 0.646
(0.7, 0.8] 1126 0.747 0.718
(0.8, 1.0] 667 0.857 0.826
Close, with a mild overconfidence at the top: big favourites win 3 points less often than predicted. That is typical of ratings that carry a driver's form across a team change. A new car, a new teammate's car being better suited, a mid-season upgrade: none of those are in the rating.
What Elo says, and why Hamilton is 15th
final Elo (K = 32), drivers with >= 40 duels: top 15 of 77
elo duels last_season
max_verstappen 1931 243 2026
sainz 1788 248 2026
alonso 1769 417 2026
leclerc 1765 192 2026
norris 1733 171 2026
michael_schumacher 1727 185 2012
russell 1726 170 2026
rosberg 1722 202 2016
hakkinen 1718 60 2001
gasly 1711 191 2026
antonelli 1703 44 2026
barrichello 1666 220 2011
massa 1652 245 2017
bearman 1651 45 2026
hamilton 1644 397 2026
Verstappen - Hamilton = +287 Elo points -> implied P(Verstappen out-qualifies Hamilton in the same car) = 0.84
V - H by K: K=8: +201; K=16: +258; K=32: +287; K=64: +327
Hamilton, with more duels than anyone except Alonso, ranks 15th. That is not a bug. With $K = 32$, Elo is a current-form rating: recent results dominate. Hamilton lost the qualifying head-to-head to Russell 5–19 in 2024 and to Leclerc 5–18 in 2025 (case study 1), and each loss to a highly rated teammate cost him rating points. His dominant Mercedes seasons against Bottas are long ago in Elo terms. Smaller $K$ gives him back some ground (the Verstappen–Hamilton difference falls from +287 to +201 at $K = 8$), but the ranking stays similar.

📊 Figure (described): Rating after each duel for six drivers. Hamilton climbs steadily through the 2010s and declines after 2022. Verstappen rises sharply from 2019 and stays highest. Alonso's line is long and high. The takeaway: an Elo line tracks wins against whoever was in the other car, so it rises fastest for drivers paired with teammates they beat often.
Elo has two structural weaknesses as a driver rating.
- It only sees win or loss. Beating a teammate by 0.01 % and by 0.6 % count the same. Verstappen's 23–1 over Pérez in 2024 earned rating points; the size of the margin did not.
- Teammate quality drives the rating. Points flow only between teammates. A driver paired with a weak teammate for years accumulates rating; a driver beside a strong one stays put. Ratings connect across teams only when drivers move, which they do slowly.
How well does Elo agree with the margin-based methods that follow? Its rank correlation with the teammate-chain rating of 21.7 is only 0.53 (77 drivers with at least 40 duels). The two methods answer different questions: Elo asks "who is beating their teammate lately", the chain asks "how much faster, on average, over a career".
🔄 Check your understanding 1. Why is Elo's pre-duel log loss an out-of-sample score even though we never split the data? 2. Give one reason Elo can rank a driver below a teammate they beat by a large margin on average.
Answer
- Each prediction uses only duels that happened before it, so every scored duel is unseen when predicted. 2. Elo ignores margins and weights recent results; a driver who beat a teammate by large margins years ago but lost narrowly recently can sit lower. (Other good answers: different teammates over time; rating inflation from weak teammates.)
21.6 Driver effects and car effects in one model
Elo throws away margins and treats each pair in isolation. A regression does neither. The idea goes back at least to Bell, Smith, Sabel and Jones (2016), who fitted multilevel models with driver and constructor effects to 1950–2014 results, and van Kesteren and Bergkamp (2023), who did it in a Bayesian framework and reported how much of the variation in results the constructor explains. We build a simpler version on qualifying pace, which is less contaminated by strategy and reliability than race results.
The model
Use the one session every car runs: Q1 (from 2006; we fit 2014–2026). For driver $i$ in team $j$ at round $r$ of season $s$,
$$ y_{irs} = 100\left(\frac{t^{Q1}_{irs}}{\min_k t^{Q1}_{krs}} - 1\right) = \mu + d_i + c_{js} + \varepsilon_{irs} $$
where $y$ is the % deficit to the fastest Q1 time that day, $d_i$ is a driver effect (constant over the career), $c_{js}$ is a car-season effect (one per team per season) and $\varepsilon$ is the noise. In plain English: a car's deficit is part car, part driver, and the parts are separated by drivers who change teams. When Sainz moves from Ferrari to Williams, his $d$ travels with him and the two cars' $c$ values are measured against the same yardstick.
Two practical choices:
- Drop wrecked laps. Entries more than 5 % off the fastest (crashes, problems, a wet Q1 run on the wrong tyre) are removed: 99 of 5,474.
- Shrink. A driver with ten rounds has a poorly measured $d$. A ridge penalty $\alpha$ pulls every effect towards zero in proportion to how little data supports it, a simple stand-in for the Bayesian shrinkage in van Kesteren and Bergkamp. We use $\alpha = 1$ and test others.
X[np.arange(len(d)), d.driver_ref.map(di)] = 1 # one indicator per driver
X[np.arange(len(d)), d.car.map(ci)] = 1 # one indicator per (season, team)
m = Ridge(alpha=alpha, fit_intercept=True).fit(X, d.y) # driver + car-season effects
entries (driver-rounds) 2014-2026 R21 with a Q1 time within 5 % of the fastest: 5,375; drivers 65, car-seasons 133
residual SD 0.609 % of lap; R^2 = 0.564
regression driver effect vs teammate-chain theta, drivers with >= 40 Q1 rounds since 2014 (n = 36): Spearman rho 0.89
Verstappen - Hamilton: regression -0.166 %, teammate chain (1994-2026) -0.230 %
The model explains 56 % of the variance in Q1 deficits. The other 44 % is round-to-round noise: traffic, track evolution within Q1 (an early runner sets a time on a dirtier track), and the fact that front-running teams often do the minimum in Q1. That last point is a real limitation of using Q1: it is the only session everyone runs, but it is not everyone's best effort.
The driver effects agree well with the teammate chain of 21.7 (rank correlation 0.89 over 36 drivers), which is reassuring: two different designs, the same ordering. The regression puts Verstappen 0.166 % ahead of Hamilton over 2014–2026, a little less than the chain's career-long figure.
How much is the car?
Now the question everyone asks. Theme 6 says the car explains most of the performance spread, and this book has promised never to print "80 %" as a fact. Here is what the regression gives. For each season, take the driver–team entries with at least five rounds, and split the spread of predicted pace $d_i + c_{js}$:
$$ \operatorname{Var}(d + c) = \operatorname{Var}(c) + \operatorname{Var}(d) + 2\operatorname{Cov}(c, d) $$
The covariance term matters. Good drivers tend to sit in good cars, so $c$ and $d$ are positively correlated, and that shared part cannot be assigned to either.
share of the spread in predicted Q1 pace (var(car + driver)) by season, alpha = 1:
year entries var_pred car_share driver_share cov_share
2014 22 0.846 0.616 0.096 0.288
2018 20 0.391 0.696 0.121 0.183
2019 22 0.535 0.701 0.092 0.207
2021 20 0.444 0.328 0.277 0.395
2023 22 0.089 0.327 0.624 0.049
2024 22 0.106 0.327 0.487 0.186
2025 21 0.060 0.280 0.599 0.121
2026 22 0.724 0.801 0.051 0.148
median over 2014-2026: car 0.57, driver 0.15, covariance 0.21
(Selected seasons; code/05_output.txt has every year.)

📊 Figure (described): For each season, the blue bar is the car-season share, the yellow the driver share and the green the covariance (good drivers in good cars). The car share is 48–70 % in 2014–2020, falls to 28–33 % in 2023–2025 and jumps to 80 % in 2026. The takeaway: the car's share is not a constant; it is largest when the cars are far apart.
The pattern has a clean physical reading. The share is a ratio, and its denominator is the total
spread. In 2023–2025 the field was compressed: the variance of predicted pace (var_pred) fell to
0.06–0.11, against 0.39–0.85 in the 2014–2019 seasons. The book's reference tables show the same
compression from the other side: the like-for-like team spread in qualifying was 1.29 % in 2022–2025
against 2.49 % in 2017–2020. When the cars converge, the drivers' differences, which did not shrink,
become a larger share of a smaller total. Then 2026 brought new regulations, the cars spread out again
(team spread 2.94 %), and the car share returned to 80 %.
So "how much is the car?" has an answer only for a given season, and even then it depends on the method:
sensitivity of the median car share (2014-2026 seasons unless stated):
variant car driver cov car_2023 car_2026 ver_minus_ham
alpha = 0.1 +0.718 +0.100 +0.136 +0.339 +0.829 -0.222
alpha = 1 (main) +0.572 +0.153 +0.207 +0.327 +0.801 -0.166
alpha = 10 +0.381 +0.291 +0.272 +0.267 +0.701 -0.054
alpha = 30 +0.252 +0.376 +0.298 +0.165 +0.597 -0.011
fit 2006-2026 +0.516 +0.163 +0.242 +0.271 +0.841 -0.183
drop > 3 % (not 5 %) +0.599 +0.166 +0.181 +0.335 +0.721 -0.081
The median car share runs from 25 % to 72 % across reasonable penalty choices. Stronger shrinkage pulls the many thinly-observed car-seasons towards the average and hands variance to the drivers (and to the covariance). There is no "correct" $\alpha$ handed down from physics. You can choose it by cross-validation, but the point stands: the car's share is a model output with a wide method range, not a constant of nature. The Verstappen–Hamilton difference moves too, from −0.222 % to −0.011 %.
🧪 Illustrative model: the ridge penalty $\alpha$ is an assumption, not a measured quantity; the shares above are conditional on it, and on treating each driver's ability as constant over a career.

📊 Figure (described): For every 2026 driver, the solid bar (team colour) is the car-season effect and the hatched bar the driver effect, relative to the average entry since 2014; the black tick is the sum. Cadillac and Aston Martin cars sit about 1.5–1.7 % behind on car alone, dwarfing any driver effect; at the front, Verstappen's driver part (−0.42 %) is as large as his car part (−0.45 %). The takeaway: in 2026 the car decides which third of the grid you are in; the driver decides the order within it.
Ines: So when someone says "it's 80 % car", they're just wrong?
Ray: They're quoting a number without a season or a method. In 2025 this model says about 30 %. In 2026, 80 %. Same sport, one year apart.
Ines: Then why do people say it with such confidence?
Ray: Because a single number is easier to remember than a range. I've been watching since the eighties. The years when the car mattered most were the years nobody needed a model to tell them.
Ines: And the years when the cars were close?
Ray: That's when you finally get to see who can drive.
🔄 Check your understanding 1. Why does the car share fall in 2023–2025 even if the drivers did not change? 2. Which drivers make the driver and car effects separable in this model?
Answer
- The share is a ratio; the cars converged, so the total spread shrank while driver differences did not, and drivers became a larger fraction. 2. Drivers who change teams (and, more weakly, teams that change drivers): they link car-seasons to a common driver yardstick. Without movers, a team's car effect and the average of its two drivers cannot be told apart.
21.7 The teammate chain: Hamilton vs Verstappen
Now the comparison the whole chapter has been building towards. Lewis Hamilton and Max Verstappen have never been teammates:
team-rounds 5,542; teammate-seasons (n >= 3) 386; drivers connected to Hamilton 140
direct Hamilton-Verstappen teammate-seasons: 0
So any comparison of their one-lap pace has to travel through other drivers. Think of every driver as a node and every teammate-season as an edge labelled with the median gap. Since 1994, 386 teammate-seasons with at least three timed rounds link 140 drivers into one connected network that contains both of them.
Three chains, three answers
The shortest routes from Hamilton to Verstappen have three links. A breadth-first search
(ratings.shortest_chains) finds three of them. Add up the gaps along each one and you get that chain's
own verdict:
shortest chains Hamilton -> Verstappen: 3 of length 3
hamilton -> bottas -> perez -> max_verstappen: implied Verstappen - Hamilton = -0.451 %
hamilton -> button -> perez -> max_verstappen: implied Verstappen - Hamilton = -0.257 %
hamilton -> leclerc -> sainz -> max_verstappen: implied Verstappen - Hamilton = -0.178 %

📊 Figure (described): Three rows, each a chain of four drivers joined by three links. Each link carries the left driver's median gap to the right driver, the rounds behind it and the seasons. The Bottas chain implies Verstappen is 0.45 % faster; the Button chain 0.26 %; the Leclerc–Sainz chain 0.18 %. The takeaway: individual chains disagree by a factor of 2.5, so no single chain is the answer.
Look at why they disagree. The Bottas chain runs through Bottas and Pérez as Cadillac teammates in 2026 (+0.123 % for Bottas over 21 rounds), years after Bottas's Mercedes seasons with Hamilton (2017–2021) and Pérez's Red Bull seasons with Verstappen (2021–2024). The Leclerc chain uses Verstappen's rookie season against Sainz at Toro Rosso (2015, plus four rounds in 2016) and Hamilton's Ferrari seasons at 40-plus. Every link is a snapshot of two drivers at one stage of their careers, and chaining snapshots from different decades assumes nobody changed in between. Case study 1 and the Antonelli hook have already shown how false that can be.
Using every chain at once
The fix is to use all the links simultaneously and let them vote. For every teammate-season $k$ between drivers $a$ and $b$, write
$$ y_k = \theta_a - \theta_b + \varepsilon_k, \qquad \theta_\text{Hamilton} = 0 $$
where $y_k$ is the season's median gap (a minus b) and $\theta$ is each driver's one-lap pace in % of a lap relative to Hamilton. Solve for every $\theta$ by weighted least squares, with weights $\sqrt{n_k}$ so that a 22-round season counts more than a 3-round one. In plain English: find the set of driver ratings that best reproduces every teammate gap ever recorded, trusting long seasons more than short ones. With 386 equations and 139 unknowns, every driver's rating is pinned down by many paths at once, and the chains that disagree average out.
ps = ratings.pair_seasons(gaps) # median gap per teammate-season, n >= 3
theta = ratings.chain_fit(ps, ref="hamilton") # sqrt(n)-weighted least squares on the network
B = ratings.bootstrap_chain(gaps, ref="hamilton", n_boot=1000, seed=42) # resample races
For uncertainty we bootstrap races: draw the 1994–2026 rounds with replacement, recompute every teammate-season median and refit, 1,000 times. Resampling races (not teammate-seasons) keeps the two cars of a team in the same round together, and each replicate is fitted on its own network, since resampling can add or remove links.
main fit: Verstappen - Hamilton = -0.230 % (95 % CI -0.408 to -0.069); bootstrap median -0.235; Verstappen faster in 100.0 % of 1000 resamples
in seconds on a 90 s lap: -0.207 s (CI -0.367 to -0.062)
ratings relative to Hamilton (% of lap; negative = faster):
theta ci_low ci_high p_faster rounds
max_verstappen -0.230 -0.408 -0.069 +1.000 241
norris -0.195 -0.395 +0.029 +0.956 171
michael_schumacher -0.098 -0.245 +0.120 +0.745 180
leclerc -0.082 -0.200 +0.019 +0.939 191
piastri -0.072 -0.287 +0.159 +0.657 90
russell -0.055 -0.161 +0.089 +0.699 169
sainz -0.010 -0.142 +0.126 +0.523 246
hamilton +0.000 +0.000 +0.000 NaN 397
rosberg +0.001 -0.113 +0.161 +0.398 201
antonelli +0.042 -0.125 +0.326 +0.243 44
ricciardo +0.049 -0.114 +0.205 +0.271 251
alonso +0.075 -0.046 +0.197 +0.106 416
vettel +0.145 -0.073 +0.272 +0.067 291
bottas +0.212 +0.113 +0.307 +0.000 265
perez +0.214 +0.106 +0.368 +0.000 299
button +0.266 +0.150 +0.390 +0.000 247
raikkonen +0.320 -0.071 +0.467 +0.037 301
The point estimate, −0.230 %, is the same value the book's reference tables report. On a 90 s lap it is 0.21 s. The bootstrap says Verstappen is faster in every one of 1,000 resamples, with a 95 % interval from −0.408 % to −0.069 %.

📊 Figure (described): Each row is a driver's rating relative to Hamilton (dotted line at zero), with a 95 % bootstrap interval and the number of teammate rounds behind it. Verstappen (blue) is furthest left with an interval that stops short of zero; Norris, Leclerc and Schumacher sit left of zero with intervals that just cross it; Bottas, Pérez and Button are clearly to the right. The takeaway: most drivers' intervals overlap Hamilton's; Verstappen's is the clearest exception.
⚠️ Common pitfall: a bootstrap that pins outsiders to the reference. An earlier, buggy version of this exact calculation reported the same −0.230 % but a much wider and skewed interval (−0.528 to −0.019; bootstrap median −0.324; Verstappen faster in 98.1 % of resamples). The bug was a subtle coding choice. When rounds are resampled with replacement, a stand-in driver who did only one or two rounds can appear three times and suddenly qualify as a "teammate-season". If the code fixes the list of drivers in advance, that newcomer has no rating column, and the row linking them to their teammate silently treats them as equal to Hamilton. Fitting each replicate on its own network removes the artefact: the bootstrap median moves back to −0.235, next to the point estimate, as it should, and the interval becomes the −0.408 to −0.069 used throughout this book. Fix: when you resample a network, rebuild the network. A bootstrap median far from your point estimate is the warning sign.
How sure should we be? Sensitivity
One interval from one specification is not enough. The model makes choices: median or mean per season, weights or none, which years. Change each and refit:
mean per teammate-season (|gap| <= 5 %) -0.275 (-0.444 to -0.118) P(V faster) 1.000
unweighted least squares -0.181 (-0.417 to +0.023) P(V faster) 0.953
without 2025-2026 -0.150 (-0.349 to -0.009) P(V faster) 0.980
without 2024-2026 -0.127 (-0.352 to +0.029) P(V faster) 0.940
2006+ only (knockout qualifying) -0.292 (-0.487 to -0.143) P(V faster) 1.000
teammate-seasons with n >= 8 -0.247 (-0.451 to -0.110) P(V faster) 1.000
range of estimates -0.292 to -0.127 %; CI excludes 0 in 5 of 7

📊 Figure (described): One row per specification, with the estimate and its 95 % interval; blue rows exclude zero. All seven estimates are negative, between −0.29 % and −0.13 %. The unweighted fit and the fit that drops 2024–2026 have intervals that reach just past zero. The takeaway: the direction is robust; the size depends on the method.
The book's reference tables add one more variant, a Bradley–Terry model on round-by-round wins and losses (a margin-free cousin of Elo, on a log-odds scale): it puts Verstappen at −0.982 log-odds relative to Hamilton, again in Verstappen's favour, with no interval reported.
The most instructive rows are the "without recent years" ones. Drop 2025–2026 and the estimate shrinks from −0.230 % to −0.150 %; drop 2024–2026 and it falls to −0.127 %. Hamilton's recent seasons, in which he trailed Russell and then Leclerc, pull his career rating down and Verstappen's relative advantage up. That is not an error; it is the model doing exactly what it was told: one rating per career.

📊 Figure (described): Two lines, one per driver, of the median gap to the teammate each season (negative = faster), with teammate names above the points. Hamilton's line runs between −0.42 % and +0.09 % from 2007 to 2021, then climbs to +0.28 % in 2025. Verstappen's falls from around zero in 2015–2017 to between −0.45 % and −0.74 % from 2019 to 2025, then rises to −0.19 % in 2026. The takeaway: both careers have phases, and a single θ per career averages across them.
The honest conclusion
Here is what the data support, stated as carefully as the intervals allow.
- Direction. On one-lap qualifying pace, measured through the teammate network from 1994 to 2026, Verstappen rates ahead of Hamilton. Every specification we tried puts him ahead, and in the main fit he is ahead in all 1,000 bootstrap resamples.
- Size. The estimate is about 0.1–0.3 % of a lap (roughly 0.1–0.27 s on a 90 s lap): −0.230 % in the main fit, −0.127 % to −0.292 % across variants. The size is a modelling result, not a measurement.
- Robustness. Five of seven specifications exclude zero; two (the unweighted fit and the fit that stops at 2023) do not. "Statistically indistinguishable" is not what the main fit says, but it cannot be ruled out under every reasonable choice. The answer is not fully settled; it leans clearly towards Verstappen.
- Scope. This is a rating of qualifying pace averaged over a career. It says nothing about racecraft, tyre management, consistency or wet-weather skill, and it treats the 2007 Hamilton and the 2026 Hamilton as one driver.
📋 Try it: Compare these drivers. Use
ratings.chain_fitandratings.bootstrap_chainto compare Leclerc and Norris through the network (setref="leclerc"). Then refit using only 2019 onward (gaps[gaps.year >= 2019]). Report both estimates with 95 % intervals and the shortest chains between them. Does restricting to the years both have actually raced change the conclusion? Expect two rows of output and a one-paragraph verdict in the style of the four points above.🔄 Check your understanding 1. Why does the weighted least-squares fit give a different answer from any single chain? 2. Dropping 2024–2026 shrinks Verstappen's advantage. Explain why, using Figure 14.
Answer
- It uses all 386 teammate-seasons at once, so the many paths between the two drivers vote, weighted by sample size; a single chain uses three links and inherits their noise. 2. Hamilton's 2024–2025 seasons were his weakest against teammates (+0.22 % and +0.28 %); removing them raises his career rating, which narrows the gap to Verstappen.
21.8 What the numbers cannot tell you
Every method in this chapter rests on assumptions that are wrong in known ways. A good analyst lists them before the reader does.
The car share is unknown, and probably unknowable as a single number. Section 21.6 gave car shares from 25 % to 72 % (median over seasons) depending only on a penalty parameter, and from 28 % to 80 % by season at a fixed penalty. Case study 2 adds a model-free estimate that puts the between-team share near 90 % in most seasons, because it counts each team's drivers as part of its car. The question "how much is the car?" has a defensible answer only with a season, a session type and a method attached.
Small samples are the rule. A season gives about 20–24 teammate duels. Section 21.2 showed that a pair separated by less than 0.1 % is still close to a coin flip after twelve rounds. Wet sessions give nine in four years. Every interval in this chapter is wide because the sport produces little data per pair, and nothing can fix that except time.
Teammate quality matters. Beating Logan Sargeant 20–0 (Albon, 2023) and beating Russell 12–9 (Antonelli, 2026) are not the same achievement. Elo partly adjusts for opponent strength; the chain and the regression adjust fully, but only through the network, so a driver whose teammates are poorly connected inherits their uncertainty.
Team orders and run plans contaminate the comparison. A tow in qualifying, a sacrificed lap to help the lead driver, a different out-lap order, a strategy split in the race: these change times and are not skill. They also tend to favour the team's preferred driver, which makes the data flatter the driver the team already rates. We cannot see any of it in timing data. Race-control messages record penalties and deleted laps, not instructions.
Careers have phases. One θ per career is the simplest model and the most wrong. Rookies improve (Antonelli's sign flip), experienced drivers eventually decline, and new regulations reshuffle who suits the car. A time-varying rating (a θ that drifts slowly from season to season) is the natural extension; exercise E1 asks you to build one.
📋 Try it: Predict the race. Before the 2026 Qatar Grand Prix (R22, not in our data), use this chapter's tools to predict the qualifying head-to-head winner for each team. Use the 2026 median gap alone, then Elo's pre-duel probability (
1 / (1 + 10**((R_b - R_a)/400))with $K = 32$ ratings). Write down both predictions per team with the probability Elo gives. When the result is public, score both by log loss. Which teams did Elo call with more than 75 % confidence?🔄 Check your understanding 1. Name two sources of teammate-gap variation that are team decisions, not driver skill. 2. Why can't the car's share of performance be stated as one number for "F1"?
Answer
- Any two of: qualifying tow or run order, different setups or parts, strategy splits, sacrificed laps, team orders in the race. 2. It is a ratio that depends on how spread out the cars are in that season (it moved from about 30 % in 2025 to 80 % in 2026 in our model) and on modelling choices such as the shrinkage penalty.
Spaced Review
From Chapter 16 (qualifying strategy): why does the canonical teammate gap use the best common session rather than each driver's best lap of the day? Try to answer before reading on. Because track evolution makes later sessions faster: Chapter 16 measures the Q1 → Q3 improvement, and comparing a Q3 lap with a Q2 lap would credit one driver with the track's grip gain.
From Chapter 20 (race pace and fuel correction): our race-pace comparison uses the fuel-correction assumption defaults. Why does that matter less here than in Chapter 20's absolute race pace? Think first. Because both drivers are compared on the same compound inside the same lap window, so they carry nearly the same fuel; the fuel term largely cancels in the difference. It would matter if the two drivers were compared in different parts of the race.
From Chapter 9 (the driver): Chapter 9 modelled driver noise as a lap-time standard deviation. What did this chapter find about using raw lap-time spread to compare drivers across teams? Answer it, then check: the steadiest drivers in 2025–2026 (Verstappen, Russell, Antonelli) all drove front-running cars, so cross-team consistency is contaminated by clean air; within teams, steadiness and pace agreed only 60 % of the time.
Project Checkpoint: ratings.py
Aisha: The simulator has a base pace for each car from Chapter 20. What it doesn't have is the driver. If I put Verstappen in a midfield car, it can't tell me what happens.
Tom: And if you just use each driver's lap times, you're measuring the car again.
Aisha: Right. So this module rates drivers only through teammates, and hands the simulator an offset in seconds.
This chapter adds project/boxbox/ratings.py to Box Box. Its public functions:
| function | what it does |
|---|---|
clean_qualifying(max_ratio=1.25) |
Jolpica qualifying with corrupt times removed |
teammate_gaps(q=None, years=None) |
canonical teammate gap for every team-round (one row per driver) |
pair_seasons(gaps, stat, min_n, trim) / head_to_head(gaps, years, min_n) |
season summaries with H2H and Wilson intervals |
chain_fit(ps, ref, weighted) / bootstrap_chain(gaps, ref, n_boot, seed, …) / shortest_chains(ps, a, b) |
the teammate-chain rating and its race bootstrap |
elo_from_duels(gaps, k, init, scale) / elo_log_loss(log, from_year) |
teammate Elo and its out-of-sample score |
driver_car_regression(q, years, session, alpha, max_pct) / variance_shares(reg) |
driver + car-season ridge regression and the car/driver/covariance split |
teammate_race_pace(session) / lap_consistency(session) |
same-compound race-pace gap and residual consistency (OpenF1, 2023+) |
pct_to_seconds(pct, lap_s) |
converts a rating to seconds for a given lap |
The demo code/project_checkpoint.py runs every function on real data. The last step builds the table
the simulator will read, the drivers of the 2026 grid with their chain rating relative to the grid
median, in seconds at a 95 s lap:
grid = sorted(set(h26.driver_ref) & set(theta.index))
off = pd.DataFrame({"theta_pct": theta[grid]})
off["vs_field_pct"] = off.theta_pct - off.theta_pct.median()
off["offset_s_at_95s"] = [ratings.pct_to_seconds(p, 95.0) for p in off.vs_field_pct]
6) driver offsets for the simulator (teammate chain, relative to the 2026 grid median, 95 s lap):
theta_pct vs_field_pct offset_s_at_95s
max_verstappen -0.230 -0.288 -0.274
norris -0.195 -0.253 -0.241
leclerc -0.082 -0.140 -0.133
piastri -0.072 -0.130 -0.124
russell -0.055 -0.113 -0.108
...
colapinto +0.395 +0.337 +0.320
stroll +0.525 +0.467 +0.443
The spread from the best-rated to the worst-rated driver on the 2026 grid is about 0.72 s at a 95 s lap. Compare that with the car effects of Figure 10, where the slowest 2026 cars sit 1.5–1.7 % (1.4–1.6 s at 95 s) behind the average entry on car alone. Those two numbers together are the chapter's answer to "how much is the car?" for 2026, expressed in the units the simulator uses.
Two cautions travel with the table. The offsets are one-lap qualifying ratings, and Section 21.3 found race-pace gaps run at about three-quarters of the qualifying gap (slope 0.76), so for race simulation Aisha scales them down. And the offsets are career averages; for the current season, the teammate gap of that season is often a better guide.
Where it plugs in: Chapter 26 uses the Elo and chain ratings as features in race and qualifying prediction; Chapter 27 adds the offset to each car's base pace in the Monte Carlo engine; and Chapter 32 extends the teammate chain across eras.
Chapter Summary
The teammate method is the only comparison in F1 that removes the car, and it removes it only partly. Every rating in this chapter is built on it.
| Metric | Definition | Typical value (this chapter) |
|---|---|---|
| Teammate qualifying gap | best common session, $100(t - t_m)/\bar t$; median per season | median |gap| 0.355 % (2026); 0.661 % (1994–2005) vs 0.359 % (2014–2026) |
| Head-to-head share | sessions won / sessions, Wilson 95 % CI | 12–9 → 57 % (37–76 %) |
| Same-compound race-pace gap | OLS on driver + tyre age, same compound and lap window | r = 0.68 with qualifying gap, slope 0.76 (n = 43 pair-seasons) |
| Consistency | robust SD of residuals around each stint's trend | median 0.352 s (83 driver-seasons) |
| Wet delta | wet gap − same pair's dry median | wet |gap| 0.984 % vs dry 0.349 %; split-half ρ = 0.27 |
| Teammate Elo | $E_a = 1/(1+10^{(R_b-R_a)/400})$, $R \mathrel{+}= K(S-E)$ | best K = 32; log loss 0.6176 vs 0.6931 coin flip |
| Driver + car-season regression | $y = \mu + d_i + c_{js} + \varepsilon$, ridge | car share median 57 % (α = 1), 25–72 % across α |
| Teammate chain | WLS $y_k = \theta_a - \theta_b$, $\sqrt{n}$ weights, race bootstrap | Verstappen − Hamilton −0.230 % (−0.408 to −0.069) |
Decision checklist before you claim driver A is better than driver B:
- [ ] Did you use the best common session and the median, with n?
- [ ] Is the interval reported, and is the pair's gap large enough for the number of rounds (21.2)?
- [ ] Did you check race pace on the same compound, not just qualifying?
- [ ] If the drivers were never teammates, did you show the chains and a network fit with a bootstrap?
- [ ] Did you report at least one sensitivity check that could change the verdict?
- [ ] Did you say which career phases the rating averages over?
- [ ] Did you avoid stating the car's share as a constant?
What's Next
Ratings tell the simulator how fast each driver is on a fresh set of tyres. The next question is how fast that pace decays as the tyres wear. Chapter 22 builds the degradation model that drives every strategy call in Box Box, and uses it to call a real pit stop.