Chapter 20 Exercises — Race Pace, Fuel Correction, Traffic and Dirty Air
Difficulty: ⭐ recall and concepts · ⭐⭐ calculation or a short script · ⭐⭐⭐ analysis and judgement · ⭐⭐⭐⭐ open-ended research
All data exercises run offline on the book's data snapshot through the toolkit and project/boxbox/pace.py.
Start from the chapter's scripts in code/; most exercises extend one of them. Where an answer is a number from
our own run, it is given; where it depends on choices you make, the expected shape of the output is given
instead.
Part A — Concepts ⭐
A1. Write the chapter's lap-time decomposition in words, naming its six terms. Which two terms can race data never separate, and why?
A2. Explain the difference between race pace (canonical) and base pace. Which one is observed, even approximately, and which is a model quantity?
A3. Why does the pit stop make the fuel slope identifiable at all? What would happen to the estimator in a season in which every driver made zero stops?
A4. A colleague says "the fuel effect is 0.033 s/kg". What two pieces of information are missing from that sentence, and which of them does the data never provide?
A5. Give two physical mechanisms by which a following car loses lap time, and two by which it gains. Which of the gains disappeared with the 2026 rules, and what replaced it?
A6. Why does pace.add_interval_start use the previous lap's interval as the traffic measure for the
current lap? What bias would the current lap's end-of-lap interval introduce, and in which direction?
A7. The race leader's OpenF1 interval is 0.0. Describe exactly what goes wrong if you filter
interval < 1.0 to find laps in traffic.
A8. The canonical race pace correlates better with the finishing order than the traffic-filtered race pace does (median ρ 0.837 against 0.799). Explain why that is expected, and say which one you'd use to estimate a car's speed.
A9. Why is an FP2 long-run gap a weaker guide to race pace than a qualifying gap, given that FP2 long runs are actually run at race-like pace? Name three things the long-run data can't see.
A10. In the chapter's synthetic race with saturating track evolution, MEDIUM wear came out 40% too low but HARD wear came out right. Explain why the bias lands on the compound that started the race.
Part B — Calculations & Physics ⭐⭐
B1. The cube-root estimate at Spa. At the 2024 Belgian GP the median clean race lap was 109.0245 s over 44 laps. Using the chapter's illustrative cube-root model with $m$ = 798 kg + 50 kg and an assumed 100 kg start load, predict the fuel slope in s/lap, and compare it with the measured −0.0930 s/lap.
Solution
$dT/dm = T/(3m) = 109.0245 / (3 \times 848) = 0.04286$ s/kg. Fuel per lap $= 100/44 = 2.273$ kg. Predicted slope $= -0.04286 \times 2.273 = -0.0974$ s/lap. Measured: −0.0930 s/lap, so the prediction is 4.7% steeper. (This is an illustrative model; its parameters are assumptions, not team data.)
B2. From seconds per lap to seconds per kilogram. The 76-race median slope is −0.056 s/lap and the median race is 57 laps. Convert to s/kg under a 100 kg and a 110 kg start load. Then explain why the chapter quotes 0.033 s/kg (the median of per-race conversions) rather than your number.
Solution
$0.056 \times 57 / 100 = 0.0319$ s/kg and $0.056 \times 57/110 = 0.0290$ s/kg. Script 02 prints 0.0321 at 100 kg from the unrounded median (−0.0563). The median of the per-race conversions, $-\beta_i N_i/100$, is 0.0331, because the median of a product is not the product of the medians: races with steep slopes tend to be short races, so $\beta_i N_i$ varies less than $\beta_i$ does. Both are legitimate; say which one you mean.
B3. What the fuel costs over a race. At the 2026 United States GP (56 laps) the pace model's lap slope was
−0.0581 s/lap. Using RaceModel's linear burn-off, $P\,(1 - (L - 0.5)/N)$ with $P = -\beta N$, compute $P$ and the
total time the fuel load costs over the race.
Solution
$P = 0.0581 \times 56 = 3.25$ s on lap 1 (falling linearly). The sum over $L = 1..N$ of $1 - (L-0.5)/N$ is
$N/2$, so the total is $3.25 \times 28 = 91.1$ s. The project checkpoint's breakdown prints fuel_s 91.1.
B4. Traffic against a pit stop. At the Hungaroring, starting a lap within one second of the car ahead cost 0.759 s/lap (pooled 2023–2026). The 2025 race's green-flag pit loss was 20.998 s. How many laps stuck within a second of a slower car cost as much as a pit stop?
Solution
$20.998 / 0.759 = 27.7$ laps. Over a 70-lap race that's 40% of the distance. If an undercut would leave you in that queue for 10 laps, the queue costs $10 \times 0.759 = 7.6$ s, more than a third of a stop.
B5. Degradation and the correction. The median raw HARD stint slope in 2023–2026 dry races is −0.002 s/lap. Add the toolkit's correction for a 57-lap race (100 kg × 0.03 s/kg), and then the data-driven median (0.056 s/lap). What are the two corrected values? Why does the chapter's table give 0.048 and 0.054 rather than your numbers?
Solution
$0.03 \times 100/57 = 0.0526$, giving $-0.002 + 0.0526 = 0.051$ s/lap; and $-0.002 + 0.056 = 0.054$ s/lap. The table applies each race's own correction ($3.0/N_i$ for the assumption, the race's own slope for the data method) to each stint and then takes the median. With a correction that differs by race, the median of the corrected values is not the median raw value plus a single constant. The data-median row (adding 0.056 to every stint) gives 0.054, matching your second number.
B6. Break-even with traffic. Chapter 12's break-even stint length is pit loss ÷ fresh-tyre advantage = 22.512 / 1.078 = 20.9 laps. Suppose the stop also drops you 0.8 s behind a slower car for 8 laps, at this chapter's pooled close-following cost. What's the new break-even?
Solution
Extra cost $= 8 \times 0.495 = 3.96$ s. Break-even $= (22.512 + 3.96)/1.078 = 24.6$ laps. Traffic after a stop adds nearly four laps to the case for stopping, which is why rejoining position is as important as the stop itself.
B7. Shrinking a Friday gap. In the chapter's FP2 regression, race-pace gap = 0.570 + 0.56 × FP2 gap. Two drivers are 0.80 s apart on Friday long runs. What race-pace difference does the regression predict between them, and why should you ignore the intercept for that question?
Solution
The difference is $0.56 \times 0.80 = 0.45$ s/lap; the intercept cancels when you subtract one driver's prediction from the other's. (The intercept exists because both gaps are measured from each session's fastest driver, who is usually not the same person: regression to the mean.)
B8. A matched-age pair by hand. Hypothetical inputs for practice: a driver's 7th lap on a set of HARDs is lap 12 of the race, at 81.420 s; his 7th lap on a second set of HARDs is lap 40, at 79.890 s. Compute the matched-age slope. Then say what you'd need before calling it "the fuel effect".
Solution
$(79.890 - 81.420)/(40 - 12) = -1.530/28 = -0.0546$ s/lap. It's a fuel + evolution slope; to call it fuel you'd need an independent estimate of track evolution, which race data can't provide (20.4), and to convert it to s/kg you'd need the start load.
B9. How many laps of traffic does the fuel correction hide? Over a 30-lap stint at the median fuel + evolution slope (−0.056 s/lap), how much faster does the car get from fuel and track alone? If the same driver starts 8 of those laps within one second of another car (+0.495 s/lap each), what is the net change over the stint, and what would the raw lap times "say" about the tyre if it wears at 0.05 s/lap?
Solution
Fuel + track: $0.056 \times 29 = 1.62$ s faster from the first to the last lap of the stint (29 lap-intervals). Wear: $0.05 \times 29 = 1.45$ s slower. Traffic: $8 \times 0.495 = 3.96$ s spread over 8 laps, which adds noise and, if the traffic laps cluster early in the stint (as they often do after a stop), tilts the raw slope downwards. The raw times would suggest a tyre that barely wears, or one that improves. Every component is plausible; only the decomposition separates them.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Analyze this session: 2024 Saudi Arabian GP, Race. ⭐⭐ It has the steepest fuel + evolution slope of
the 76 dry races (−0.1218 s/lap, 95% CI −0.1324 to −0.1112, 796 laps). (a) Reproduce it with
pace.fuel_effect(f1data.session(2024, "jeddah", "R")). (b) Refit on laps 20 onwards only (filter the laps frame
before passing it). (c) List the stints with strategy.actual_strategies. Expected shape: if early-race track
evolution is part of the steep slope, the late-race refit should be noticeably closer to the −0.056 median;
if it stays steep, look for another reason (for example the laps a neutralisation removed from the sample).
C2. Compare these drivers: 2026 Mexico City GP, Race. ⭐⭐ Hamilton was second on race pace (+0.191 s to
Verstappen) with 28.1% of his clean laps begun within one second of the car ahead; Verstappen 1.8%. Run
pace.race_pace_table with traffic="include" and "exclude" and compute the gap both ways. Then run
pace.pace_model and compare the two drivers' base paces with their standard errors. Expected shape: a table of
three gaps (include, exclude, model) with a sentence on whether the order is settled.
C3. Build the strategy: 2024 Bahrain GP. ⭐⭐⭐ Copy section 4 of 03_identification_limits.py and run it on
the 2024 Bahrain GP. For each fuel correction, print the best one-stop in-lap, its one-second window and the
two-stop penalty. Expected shape: the same four-row table as the chapter's Hungary example. Note whether the
correction changes the number of stops recommended, not just the lap.
C4. Predict the race. ⭐⭐⭐ Pick one 2026 conventional weekend from script 06's list (it prints every weekend's
ρ if you add print(R.to_string())). Before looking at the race, rank the drivers by (a) FP2 long runs, (b)
qualifying position and (c) the average of the two ranks. Then compute each ranking's Spearman ρ with the
race-pace table. Expected shape: three ρ values; across the 42 weekends the chapter found medians of 0.716,
0.747 and 0.791.
C5. Compare these eras: Suzuka. ⭐⭐ Case study 2 found that the cost of starting a lap within one second at
Suzuka fell from +0.366 s/lap (2023–2025) to −0.044 s/lap (2026). Run pace.traffic_cost on Suzuka for each
season separately (cluster by driver-race, as the case study does). Which season drives the change? Does any
single season's interval exclude zero?
C6. The outcome trap, done properly. ⭐⭐⭐ The chapter compared start-of-lap and end-of-lap intervals. Build a
third measure: the median of the OpenF1 intervals stream during the lap (use pd.merge_asof on the
intervals table against each lap's date_start). Re-estimate the 0–1, 1–2 and 2–3 s costs with it. Expected
shape: three coefficients next to the chapter's +0.495 / +0.204 / +0.081; explain the direction of any
difference.
C7. Teammates by base pace. ⭐⭐ For every dry 2025 race, run pace.pace_model and record the McLaren
teammates' base-pace difference (Norris − Piastri) with its standard error. Plot the 20 values with ±1.96 SE.
Expected shape: one point per race; the Hungary 2025 value is −0.002 s (NOR 78.551, PIA 78.553). How many races
have an interval that excludes zero?
C8. Where dirty air bites, by circuit. ⭐⭐⭐ Run the sector and speed-trap version of pace.traffic_cost
(script 04 section 2) separately for Monaco, the Hungaroring, Monza and the Red Bull Ring, pooled 2023–2026. Make
the Figure 20.9 chart for each. Expected shape: at Monaco the sector losses dominate and the trap gain is small;
at Monza the trap gain is large. Check against the circuit totals in code/dirty_air_by_circuit.csv.
Part D — Strategy & Judgement ⭐⭐⭐
D1. Call the pit stop: 2026 Italian GP, lap 28. Antonelli is second at the end of lap 27, about 0.6 s behind the leader, on MEDIUMs fitted during the lap-3 red flag (24 laps old). A VSC is deployed during lap 28. The book's pooled pit losses are 25.409 s green at Monza (n = 76 stops, 2023–2026) and 15.671 s under a VSC (near-field variant, all circuits, n = 106). The leader is running to the end without stopping. Stop under the VSC for a new set, or stay out? Write your decision and your reasoning first.
Reveal
Antonelli pitted on lap 28 under the VSC (MEDIUM to MEDIUM), rejoined sixth at the end of lap 29, was back to second by lap 37 and took the lead on lap 50, winning by 3.857 s. The arithmetic: the VSC saves about $25.4 - 15.7 = 9.7$ s against a green stop. On this race's model, following cost nothing at Monza 2026 (the pace model's close-following term was −0.085 s/lap, interval −0.263 to +0.093), so dropping into traffic was cheap, which is not true at most circuits. The timing data are consistent with the stop paying off; they say nothing about what the team's own model expected.
D2. Design the setup. You expect to spend 30% of a 57-lap race within one second of the car ahead, at a circuit where following costs 0.5 s/lap. An alternative wing level costs you 0.1 s/lap in clean air but, you believe, halves the following cost. Labelled assumptions: both effects are constant and independent. Which wing would you run, and what breaks the calculation?
Solution sketch
Following laps: $0.3 \times 57 = 17.1$. Standard wing: $17.1 \times 0.5 = 8.55$ s lost in traffic. Alternative: $57 \times 0.1 + 17.1 \times 0.25 = 5.70 + 4.28 = 9.98$ s. The standard wing wins by 1.4 s if you really spend 30% of laps in traffic. The break-even traffic share is $s$ with $57 \times 0.1 = 0.25 \times 57 s$, so $s = 40\%$. What breaks it: the share of traffic depends on the wing (a faster car escapes traffic sooner), on passing (Chapter 35), and on whether the "halves the cost" belief is true; the data in this chapter can't test it.
D3. Clean air or fresh tyres? At the Hungaroring your driver can stop now and rejoin 0.5 s behind a car that is 0.4 s/lap slower in clean air, or stay out three more laps and rejoin in clean air. Fresh tyres are worth 1.078 s/lap (Chapter 12 median). Using this chapter's numbers, set up the comparison over the next ten laps and say what you'd need to know about passing.
Solution sketch
Option A, stop now. Fresh tyres are worth about 1.08 s/lap against the old set, but behind a car 0.4 s/lap slower you can't use all of it: until you pass, your lap time is roughly the car ahead's, and the Hungaroring's close-following cost is 0.759 s/lap (pooled 2023–2026). If you pass after $k$ laps, you lose roughly $0.759k$ s on those laps and then gain the full fresh-tyre advantage for $10 - k$ laps. Option B, stop in three laps. You lose about three laps of tyre advantage (old tyres for three more laps, so roughly $3 \times 1.08 = 3.2$ s against option A's clean-air potential) but run the rest in clean air. Option A wins if $0.759k < 3.2$, i.e. if you pass within about four laps. The deciding number is the pass probability per lap at a 0.4 s/lap pace advantage on fresher tyres at the Hungaroring, which is Chapter 35's job. At a circuit where following costs 0.13 s/lap (the Red Bull Ring), option A wins almost regardless.
D4. A betting judgement. The best race pace won 61.8% of dry races, and the pole-sitter had the best race pace in 47.4%. A bookmaker offers the pole-sitter to win at an implied probability of 70%. Using only this chapter's numbers and the book's pole-to-win base rate (62.6% for 2023–2026), is that price long or short? What would you want to know about the race-pace gap before betting?
Solution sketch
The 70% price is shorter than the base rate: pole-sitters won 62.6% of 2023–2026 races (the book's prediction baseline table), and this chapter adds that the pole-sitter had the best race pace in only 47.4% of dry races. Both numbers argue against paying 70% without more information. What would change your mind is evidence that this pole-sitter also has the best race pace this weekend by a margin larger than the typical 0.16 s/lap: a big FP2 long-run gap (shrunk by half, per 20.7) or a car that has been a "Sunday car" all season (Figure 20.11). A circuit with a high close-following cost, where a pole-sitter's clean air is worth more, also argues for shortening the price.
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1. (Chapters 4 and 20) Chapter 4 fitted TyreModels with the toolkit's default fuel correction. Refit the
compound models for the 2025 Hungarian GP with pace.fuel_corrected_pace(..., "data") instead, then with
"none". Report each compound's rate under all three. Which compound is most sensitive, and why might it be the
opening-stint compound? Hint: boxbox.tyres.fit_compound_models(laps, y="lap_time_fc") takes any fuel-corrected
column; pass the output of pace.fuel_corrected_pace and compare the rate attribute of each model.
M2. (Chapters 12 and 20) Chapter 12's critical degradation for a second stop is $d^* = 2(k+1)(k+2)(P + w)/N^2$. For the 2025 Hungarian GP ($N = 70$, $P = 20.998$, $w = 0$, $k = 1$), compute $d^*$ and compare it with the race's MEDIUM and HARD wear under the raw, assumed and data corrections from 20.4. Under which corrections does the race sit "right of the line"? Hint: $d^* = 2 \cdot 2 \cdot 3 \cdot 20.998/4900 = 0.051$ s/lap. Compare with MEDIUM 0.029 and HARD 0.056 (data correction) and with the raw values; then compare with the pace model's pooled wear (MEDIUM 0.058, HARD 0.050) from 20.8, and explain why the answer to "should this race be a two-stopper?" depends on the summary.
M3. (Chapters 13 and 20) In the undercut study of Chapter 13, the median undercut gain was 0.755 s. Using this chapter's traffic curve, estimate how much an undercut gains if the attacker rejoins 0.8 s behind a third car for three laps. Is a "successful" undercut still successful?
M4. (Chapters 19 and 20) Chapter 19 treated telemetry mini-sector differences under 0.05 s as noise at 3.7 Hz.
What is the equivalent resolution for a race-pace median? Use the bootstrap intervals of pace.race_pace_table
for the top ten drivers of three races and report the median interval width.
M5. (Chapters 14 and 20) The project checkpoint found the 2026 United States GP model off by 72.7 s, all of it
on four VSC laps. Using Chapter 14's neutralisation.py, add a VSC to the model and recompute the error. How much
of the 72.7 s is explained?
M6. (Chapters 2 and 20) The 2025 Miami GP race is missing laps 2–24 in OpenF1 (Chapter 2). It's excluded from
this chapter's dry-race set as wet anyway. Suppose it weren't: what would pace.fuel_effect estimate from the
remaining laps, and why would the matched-age estimator struggle? Use Jolpica lap times
(history.laps(2025, round)) to fill the gap and compare.
Part E — Research & Extension ⭐⭐⭐⭐
E1. Separate fuel from evolution. Race data can't separate them, but some events might. Candidates: races with long safety-car periods (cars burn less fuel per lap but the track keeps evolving, or cools); red-flag restarts (no refuelling is allowed, but the track changes during the stoppage); sprint races (shorter distance, different fuel load, same track). Design a study using one of them, state the identifying assumption explicitly, run it on the snapshot and report whether it moves the bound on the pure fuel effect.
E2. A fair test of FP2. The chapter's FP2 test compared long runs on mixed compounds and tyre ages with race pace. Match FP2 runs to race stints by compound and tyre age, apply each team's (unknown) fuel load as a nuisance parameter with a prior, and see whether FP2 beats qualifying once the comparison is like-for-like. Report the posterior or bootstrap distribution of the improvement in ρ.
E3. A prior from physics. Treat the cube-root prediction $\hat\beta_{\text{race}}$ as a prior and the race's own fuel slope as the likelihood. Build a hierarchical model across the 76 races with a circuit-level evolution term. What does the posterior say about the share of the race slope that is fuel? Be explicit about which conclusions come from the prior.