Chapter 34 Instructor Notes — Pit Stop Analytics

Chapter: Pit Stop Analytics: The 2-Second Ballet — Measuring Performance, Identifying Errors, and Optimizing the Fastest Operation in Sport · Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Discussion guide

Chapter 34 measures the fastest operation in sport with data that mostly cannot see it. Students learn to keep three clocks apart (stationary time, pit-lane time and pit loss), to strip non-crew causes out of "slow stops", and to separate a crew's typical stop (a stable trait) from its disasters (mostly not). The chapter opens with Antonelli's three-stop collapse at the 2026 British GP and ends by feeding each team's real stop distribution into the Chapter 13 undercut model. Students build the pitstops.py module of Box Box, which replaces a single pit-loss number with a sampled one.

Learning objectives

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

  1. Define stationary time, pit-lane time and pit loss, and say which clock any quoted number belongs to.
  2. Explain why event-relative pit-lane time (rel_s, stop minus race median) is a fair stand-in for the crew's clock, citing the 1.006 slope.
  3. Build the crew sample by removing no-change passages, wet, neutralised, lap-1 and penalty stops, and explain what each filter removes.
  4. Distinguish a crew's median (persistent) from its slow-stop share (noisy), and shrink a slow-stop rate before predicting with it.
  5. Estimate what a slow stop costs in time and in places, and why most slow stops cost time only.
  6. Describe when and why teams double-stack, and what it costs the second car.
  7. Sample team-specific stop times in a simulation and show how crew quality changes an undercut's odds.

Threshold concept

This chapter has no designated threshold concept. Its organising idea is three clocks, never mixed. Students who have absorbed it hear "a 23-second pit stop" and ask "pit loss or pit lane?" Signs they have not: comparing a DHL stationary time with an OpenF1 pit-lane time, or treating a penalty stop as a crew error.

Suggested 75-minute session plan

Time Segment What happens
0–8 min Hook 2026 British GP: Antonelli's routine lap-35 stop (2.4 s stationary, pit loss 19.584 s), then lap 41 (15.3 s stationary, rel_s +11.631, P2 → P6) and lap 43 (7.5 s, P6 → P10). Ask: "What can the timing data tell us about why?" (Nothing: no race-control message about his stops.)
8–22 min Concept The three clocks. OpenF1 stop_s covers 18.1% / 85.5% / 71.1% of race stops in 2024 / 2025 / 2026 and none in 2023, rounded to 0.1 s. DHL gives only each race's fastest stop. The record: 1.80 s, McLaren (Norris), Qatar 2023.
22–40 min Live demo Run code/02_three_clocks.py, then code/05_slow_stops.py. Show the circuit table (Spa loss 19.274 s vs Imola 28.164 s) and the slow-stop cascade: 15.1% of all stops → 8.4% in the crew sample. Ask which filter students expected to matter most.
40–58 min Activity Pairs work exercise D1 (Ferrari under the late safety car at Silverstone 2026) with the reveal closed, using the SC pit loss 12.722 s [11.02, 14.50]. Then B4 (shrinkage) at the board.
58–75 min Wrap-up Show code/09_output.txt: with crew draws, Ferrari undercutting Cadillac clears 1.0 s with probability 0.823, Cadillac undercutting Ferrari 0.149. Exit ticket: "Which is more predictable next season, a crew's median or its slow-stop rate? Why?"

Key numbers students should leave with

  • Record: 1.80 s, McLaren (Norris), 2023 Qatar GP; previous 1.82 s, Red Bull (Verstappen), Brazil 2019. Quote DHL for records and OpenF1 stop_s for distributions, naming the source. At Qatar 2025 OpenF1 shows 1.8 s and DHL 2.08 s.
  • Stand-in: event-relative pit-lane time tracks stationary time with slope 1.006 [0.960, 1.053] (n = 1,369). Median transit 20.724 s; stationary is 11.8% of the median lane time.
  • Pit loss: green-flag pooled median 22.512 s (n = 1,921); under SC 12.722 s [11.02, 14.50].
  • Slow stops (rel_s > 2 s): 15.1% of all 3,161 OpenF1 stops; 8.4% [7.2, 9.7] in the crew sample (n = 1,852). Penalty stops are 84 of the 476 raw slow stops.
  • Persistence (n = 151 season pairs): median rel_s Spearman 0.763; slow share 0.252.
  • Cost: 0.075 places per second of delay (0.220 in the front six). Stops 3–10 s slow lose a place about 44% of the time. Expected tail cost 0.40 s per stop across the field.
  • Shrinkage (n0 = 40): Cadillac 2026 38.5% → 21.7%; Ferrari 0 of 29 slow → 6.29%.
  • Double stacks: 146 pairs, 84 under SC; second car +0.62 s [+0.36, +0.97]; median +1.67 s when arriving 4–8 s apart.
  • Race control: 80 race pit-lane incidents in 91 GPs; speeding 31, unsafe release 18 (5 penalised in the feed); 21 left for after the race.

Common misconceptions and remedies

Misconception Remedy
"A 23-second pit stop." Name the clock. Show Spa (19.274 s) vs Imola (28.164 s) pit losses to kill the idea of one universal number.
"Red Bull holds the record." McLaren, Norris, Qatar 2023, 1.80 s (records.csv). Red Bull held the previous one.
"OpenF1's 1.8 s at Qatar 2025 equals the record." OpenF1 stop_s is rounded and is not DHL's measurement; DHL had 2.08 s that race.
"Every slow stop is a crew error." Walk the cascade: penalties, no-change passages, wet and SC stops account for much of the 15.1%.
"A slow stop always costs a place." Most cost time only; check the gap behind (0.075 places/s on average).
"Rank crews by slow stops this season." Slow shares barely persist (0.252); rank on median and IQR, report Wilson intervals, shrink before predicting.
"We know why it was slow." The feed records duration, not cause. Without a team or stewards' statement, say "not in our data".

Exercises to assign

  • Core (everyone): Part A — A1, A2, A4, A6, A7; Part B — B1, B4, B5.
  • Code lab: Part C — C1 (2025 Italian GP stops) and C4 (2026 British GP stops with rel_s > 4 s). Add C5 (extend 09_stop_time_in_the_sim.py) for analytics students.
  • Judgment: Part D — D1 (Ferrari under the late safety car) and D4 (publishing a crew ranking).
  • Stretch: Part E — E2 (a better slow-stop model, since the mixture under-fits the P90) or E3 (do crews choke?).
  • Interleaving: Part M — M3 with Chapter 14 (do second cars in a stack lose more under SC?) and M5 with Chapter 21.

Lab tips

  • Runtime: every script runs offline from the chapter folder and finishes well under a minute. Printed outputs are saved as code/*_output.txt; compare a student's run with those first.
  • Run order: 02_three_clocks.py writes code/_pit_loss_stops.parquet (every per-stop pit loss, 2023–26). Run it first. 09_stop_time_in_the_sim.py imports the Chapter 13 undercut.py module, so that module must be in place.
  • Gotcha — 2025 Miami: laps 2–24 are missing in OpenF1, so most of that race's stops have no tyre-change flag and drop out of the crew sample. Expect lower counts for 2025.
  • Gotcha — DHL ties: dhl_pitstops.csv has two rows for two 2020 races. De-duplicate on season and round before any per-race statistic.
  • Gotcha — very close double stacks: stacks under 4 s apart (n = 11) show zero second-car cost, which is implausible for a real queue. The meaning of OpenF1's pit timestamp is undocumented; treat that bin as unexplained.
  • Gotcha — README coverage figures: the toolkit README's stop_s coverage numbers count all pit rows; use the race-stop coverage above.
  • Use crew_sample() before any crew comparison; forgetting it is the most common source of "wrong" slow-stop shares.

Connections

  • Backward: Chapter 12 (pit loss and break-even); Chapter 13 (the two-car undercut model used in Section 34.9); Chapter 14 (SC and VSC pit loss); Chapter 33 (what the places are worth).
  • Forward: Chapter 35 separates pit-cycle position changes from real passes; Chapter 37 returns to the race-control feed. The capstone, Chapter 40, samples stop times with pitstops.py.