Chapter 21 Instructor Notes — Driver Comparison

Chapter: Driver Comparison: Separating Driver Skill from Car Performance — The Hardest Problem in F1 Analytics · Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Discussion guide

Chapter 21 tackles the question every fan argues about and every analyst gets wrong at least once: how good is the driver, once you take the car away? The chapter's answer is methodological before it is numerical. The teammate is the only control group; a season is a small sample; race pace, wet pace and consistency each need their own care; and a rating that links drivers who were never teammates must carry a bootstrap interval. The chapter ends on the Hamilton vs Verstappen question with a verdict that is deliberately hedged. Students build the ratings.py module of Box Box, which hands the simulator a driver offset in seconds.

Learning objectives

By the end of the session, students should be able to:

  1. Explain why the teammate gap cancels the car term in $t = T_j(1+\delta_i)(1+\varepsilon)$, and list what it does not cancel (setup, parts, run plans, team orders, reliability).
  2. Compute a season's teammate gap in percent on the best common session, summarise it with the median, and attach a head-to-head share with a Wilson interval.
  3. Judge whether a gap is large enough for the number of rounds behind it.
  4. Compare race pace on the same compound and lap window, and say why consistency and wet skill are so hard to measure.
  5. Fit and score a teammate Elo rating, choosing K by out-of-sample log loss.
  6. Explain why "the car's share" of performance is a model output with a wide range, not a constant.
  7. Fit a teammate chain across the whole driver network, bootstrap it by race, and state a hedged verdict with its sensitivity range.

Threshold concept

This chapter has no formal threshold concept. Its key idea is that a driver comparison is a claim about a model, not a fact about a driver: the same data give different answers under different summaries, eras and specifications, and the honest output is a direction, a range and a list of what could overturn it. Students who have this stop asking "who is faster?" and start asking "faster by which measure, on how many rounds, with what interval?"

Suggested 75-minute session plan

Time Segment What happens
0–8 min Hook Mercedes, two seasons. Russell over Antonelli in 2025: median 0.405 %, 21 of 23 rounds, interval +0.271 to +0.520 %. Antonelli over Russell in 2026: −0.241 %, 12–9, interval including zero. Ask: "Which season tells you who is better?"
8–25 min Concept The teammate as control group; percent gaps on the best common session; median not mean. Work a Wilson interval at the board: 12–9 is 57 % (37–76 %). Show how many rounds a close pair needs: under 0.1 %, five rounds give 63 % sign agreement and twelve give only 72 %.
25–42 min Live demo Run code/01_teammate_gaps.py for the 2026 pairs, then code/04_elo_ratings.py to show log loss by K. Pause on Hamilton at 15th of 77 in the final Elo, and ask what Elo measures (current form in duels, ignoring margins).
42–62 min Activity Small groups take one claim each: "the car is 80 %", "X is the rain master", "Y is the most consistent". Each group finds the section of 21.4–21.6 that tests it and reports the range or sample size that undercuts it.
62–75 min Wrap-up The chain verdict: −0.230 % (95 % CI −0.408 to −0.069), seven specifications from −0.127 to −0.292 %, CI excluding zero in 5 of 7. Exit ticket: "Write the one-sentence verdict a careful analyst would publish."

Key numbers students should leave with

  • Teammate gaps, 2026 (faster first): from Gasly–Colapinto −0.380 % (16–5) to Leclerc–Hamilton −0.047 % (13–8). Median |gap| 0.661 % in 1994–2005 and 0.359 % in 2014–2026.
  • Sample size: sign agreement after five rounds is 63 % for pairs under 0.1 %, 82 % at 0.1–0.3 % and 96 % above 0.3 %; after twelve rounds, 72 / 93 / 99 %.
  • Race pace vs qualifying: r = 0.68 across 43 teammate-seasons, same sign 81 %, slope 0.76 (race gaps are diluted versions of qualifying gaps).
  • Consistency: median robust SD of stint residuals 0.352 s; within teams, the steadier driver is faster in only 60 % of 40 pairs.
  • Wet: median |gap| 0.984 % wet (n = 91 team-rounds) vs 0.349 % dry (n = 813); nine wet qualifying sessions in 2023–26; split-half Spearman 0.27 (p = 0.26).
  • Elo: K = 32 is best (log loss 0.6176 vs 0.6931 for a coin flip); the favourite wins 66.1 % of duels.
  • Car share: 28–80 % by season and 25–72 % (median) across ridge penalties; the model-free between-team share is near 90 % because it counts each team's drivers as part of the car.
  • Anchor D: Verstappen − Hamilton = −0.230 % (95 % CI −0.408 to −0.069; 1,000 race resamples, seed 42), about 0.21 s on a 90 s lap. Verdict: leans Verstappen by about 0.1–0.3 % of a qualifying lap; the direction is robust, the size depends on the method; not fully settled. The three shortest chains give −0.451, −0.257 and −0.178 %.

Common misconceptions and remedies

Misconception Remedy
"Average the teammate gaps for the season." One crash or red-flagged session dominates a mean. 63 of 2,700 team-rounds in 2014–26 have |gap| > 3 %. Use the median, and trim only with a stated rule.
"14–7 settles it." Give the Wilson interval and the median gap with n. Close pairs need far more rounds than a season provides.
"The car is 80 % of performance." The chapter's estimates run from 28 % to 80 % by season, and move with the ridge penalty. Ask for a season, a method and a range.
"Driver X is the rain master; look at that one race." Nine wet sessions, wet gaps three times as spread as dry, and no replication across halves. Report n and an interval, and correct for multiple comparisons.
"Pick the chain that links the two drivers." The three shortest chains disagree by a factor of 2.5. Fit the whole network with weights and bootstrap by race.
"A bootstrap interval is automatically right." The chapter's ⚠️ pitfall: an earlier, buggy version of the bootstrap with a fixed driver list pinned newcomers to Hamilton's level and gave a skewed, wider interval (−0.528 to −0.019); rebuilding the network per replicate gives the book's −0.408 to −0.069. Check the bootstrap median against the point estimate.
"A career rating is current form." Show season-by-season gaps; Antonelli vs Russell flips sign between 2025 and 2026.

Exercises to assign

  • Core (everyone): Part A — A1, A3, A4, A8, A10; Part B — B1 (percent to seconds), B2 (Wilson interval), B5 (standard error of a median).
  • Code lab: Part C — C1 (2024 McLaren season duel) and C3 (Elo vs median). Add C2 (race pace, 2026 Mexico City) for students on the Analytics track.
  • Judgment: Part D — D3 (the hiring decision) is the best written assignment; D4 (the broadcast "wet-weather" claim) suits fan-first students.
  • Stretch: Part C — C6 (the network) and C8 (a driver offset for the simulator); Part E — E1 (a time-varying chain rating).
  • Interleaving: Part M — M2 (Ch 20 + Ch 21: rerun race pace with the data-driven fuel effect) and M5 (Ch 17 + Ch 21: lap-1 gains within teams).

Lab tips

  • Run order: every script stands alone; none reads another's output. 02_race_pace_teammates.py writes code/race_pace_pairs_2023_2026.csv (760 team-race comparisons) for students who want to explore race-pace gaps in a spreadsheet.
  • Runtime: 06_anchor_d_teammate_chain.py takes about four minutes (1,000 bootstrap fits plus six sensitivity runs of 300). Start it before class or show the saved code/06_output.txt. Everything runs offline.
  • Saved outputs: each script's printed output is in code/*_output.txt. If a student's numbers differ, compare against those first.
  • Gotcha — corrupt qualifying times: some Jolpica qualifying times are wildly long. ratings.clean_qualifying sets any time above 1.25 × the round median to missing; metrics.teammate_quali_gap does not, so tell students to go through ratings.
  • Gotcha — seeds: sensitivity runs use 300 resamples with seed 7. A different seed moves the "excludes zero" count between 4 of 7 and 5 of 7, which is itself a lesson about borderline intervals.
  • Gotcha — line-ups: 2026 Red Bull and Racing Bulls line-ups in the snapshot include short stints (Lawson at Red Bull for three rounds). The min_n = 3 rule matters; ask students to check which pairings it keeps.

Connections

  • Backward: Chapter 9 (driver lap-time noise), Chapter 16 (track evolution between qualifying sessions), Chapter 20 (fuel-corrected race pace).
  • Forward: Chapter 26 uses driver and car ratings as prediction features; Chapter 27 feeds the driver offsets into the race simulator; Chapter 32 revisits dominant drivers and teams across eras.