Chapter 37 Exercises — Reliability, Penalties, and Race Control
Difficulty: ⭐ concept check · ⭐⭐ calculation or short analysis · ⭐⭐⭐ multi-step analysis or judgment · ⭐⭐⭐⭐ open-ended project
Every data task runs offline on the book's snapshot (OpenF1 2023–2026 R21, Jolpica-F1 1950–2026 R21). Start from the chapter's scripts in code/ and the module project/boxbox/reliability.py. Where an answer is given as a number, it comes from running those scripts. Your output should match it exactly.
Part A — Concepts ⭐
A1. Define a DNF as this chapter uses it. Then say which of these count as DNFs: (a) a car classified 15th after retiring two laps from the end; (b) a car lapped twice that took the chequered flag; (c) a disqualified car; (d) a car that crashed on the formation lap and did not take the start.
Answer
A DNF is a starter whose result status is a retirement. (a) Yes: it retired, even though it was classified. (b) No: lapped finishers finished. (c) No: disqualification is its own category. (d) No: it never started, so it is not a starter.
A2. Why does the Jolpica status text stop separating mechanical failures from accidents in 2023, and what does that force you to do when you write about the 2026 rise in retirements?
Answer
From 2023 the source records every retirement as "Retired". We don't know why; the cause simply isn't in the data. You must describe the 2026 rise as a rise in retirements, report what race control said (no trace, incident named, lap 1), and avoid calling it "mechanical" unless a sourced reference says so for a specific car.
A3. Explain the difference between a hazard and a DNF rate. Which one should a lap-by-lap race simulator sample from, and why?
Answer
The DNF rate is the share of starters who fail to finish the whole race. The hazard is the chance that a car still running at the start of a lap retires during that lap. A lap-by-lap simulator needs the hazard, by phase, because when a car retires changes pit stops, safety cars and positions. The race-level rate cannot tell you that.
A4. What does "censored" mean in a Kaplan–Meier survival curve of race distance, and which cars are censored?
Answer
A censored observation is one where the event (a retirement) had not happened when observation stopped. Every finisher and every lapped car is censored at the flag: we know it survived the race, not that it would never have failed.
A5. A race-control message reads TURN 6 INCIDENT INVOLVING CAR 63 (RUS) NOTED - CAUSING A COLLISION. A second reads FIA STEWARDS: TURN 6 INCIDENT INVOLVING CAR 63 (RUS) UNDER INVESTIGATION - CAUSING A COLLISION. Using the 2023–26 funnel, how should each message change your estimate that Russell will be penalised during the race?
Answer
"Noted" is weak evidence. Over all incidents, about a third end in an in-race penalty (32.4%). "Under investigation" is strong: incidents that reach that stage end in a penalty 71.0% of the time (65.5–76.0%, n = 283). In the 2026 Mexico City GP this incident did end in a 10-second penalty.
A6. Give two reasons why served == False in penalty_table does not mean a penalty went unserved.
Answer
(1) A time penalty can be added to the race time after the flag, which produces no PENALTY SERVED message. (2) The served message may be missing or worded differently, and the matcher only looks within the same session. False means "no served message found".
A7. What is a "penalised-looking start", and why are grid drops of −1 or −2 places meaningless?
Answer
A start at least 3 places behind the driver's qualifying position, or from the pit lane. When one car is moved back, every car behind it moves up a place, so negative drops of 1–2 are a side effect of other drivers' penalties.
A8. Why are the 2026 race-control feeds about twice as long as the 2023–2025 feeds, and why does that not mean there were twice as many incidents?
Answer
Most of the growth is blue flags (61.9 per race against 15.5–28.4) and sector yellows and clears (51.3 against 14.8–19.5). The field spread more than doubled in 2026, so leaders lapped more cars, and the races were neutralised more often. Stewarding messages rose much less (25.2 against 14.3–18.5 per race), and penalties per race barely moved (2.38). Message counts measure reporting as well as events.
A9. In one sentence each, explain why the hazard of retiring is (a) highest on lap 1 and (b) roughly flat afterwards.
Answer
(a) Lap 1 has the whole field close together on cold tyres and full tanks, so the chance of contact per car-lap is at its peak. (b) After the field strings out, the remaining risks are mostly component failures and isolated errors, which do not depend on the lap number. A mature component under steady load fails at a roughly constant rate.
Part B — Calculations & Physics ⭐⭐
B1. Constant-hazard conversion. The 2014–21 turbo-hybrid DNF rate was 18.2%. (a) What constant per-lap hazard over 57 laps reproduces it? (b) The measured mid-race hazard in that era was 0.0025 per lap. Explain the difference.
Solution
(a) $h = -\ln(1 - 0.182)/57 = -\ln(0.818)/57 = 0.2009/57 = 0.00352$ per lap. (b) The constant hazard spreads lap-1 retirements over the whole race. The measured lap-1 hazard was 0.0299, twelve times the mid-race value, so the true mid-race hazard (0.0025) is lower than the constant estimate.
B2. Phase model. Use the 2022–25 phase hazards: lap 1 0.0208, laps 2–10 0.0022, middle 0.0018, final 10 0.0023. Compute P(DNF) for a 57-lap race (middle phase = laps 11–47).
Solution
$S = (1 - 0.0208)(1 - 0.0022)^9(1 - 0.0018)^{37}(1 - 0.0023)^{10}$.
$\ln S \approx -0.0210 - 0.0198 - 0.0667 - 0.0230 = -0.1305$, so $S = 0.8777$ and $P(\text{DNF}) = 12.2\%$. The module's hazard_to_p gives 12.3% with unrounded hazards. Observed: 12.8%.
B3. Shrinkage. In 2026 Williams retired in 9 of 40 starts and Cadillac in 16 of 41. With the 2026 prior $a = 1.78$, $b = 7.94$, compute both shrunk rates. Which moved more, and why?
Solution
Williams: $(9 + 1.78)/(40 + 9.72) = 10.78/49.72 = 21.7\%$ (raw 22.5%). Cadillac: $(16 + 1.78)/(41 + 9.72) = 17.78/50.72 = 35.1\%$ (raw 39.0%). Cadillac moved more (3.9 points against 0.8), because its raw rate is further from the prior mean $a/(a+b) = 18.3\%$. The prior weight is the same for both teams.
B4. Wilson interval by hand. Aston Martin retired in 21 of 42 starts. Compute the Wilson 95% interval ($z = 1.96$) and check it against 35.5–64.5%.
Solution
$\hat p = 0.5$, $n = 42$, $z^2 = 3.8416$. Centre $= (0.5 + 3.8416/84)/(1 + 3.8416/42) = 0.5457/1.0915 = 0.5$. Half-width $= 1.96\sqrt{0.25/42 + 3.8416/7056}/1.0915 = 1.96 \times \sqrt{0.005952 + 0.000544}/1.0915 = 1.96 \times 0.08060/1.0915 = 0.1447$. Interval: 35.5%–64.5%.
B5. Penalty arithmetic at the flag. You finish P4. The cars behind you finish +3.1 s, +6.4 s, +9.2 s and +14.0 s behind. How many places does a 5 s penalty cost, and how many does a 10 s penalty cost? In points (25-18-15-12-10-8…), what is each worth?
Solution
+5 s: only the car 3.1 s behind passes you, so you finish P5 (12 → 10 points, −2). +10 s: three cars (3.1, 6.4, 9.2) pass you, so you finish P7 (12 → 6, −6).
B6. Serving under a safety car. Using the book's pit-loss figures (green flag at Las Vegas 22.4 s, under SC 12.7 s, under VSC 15.7 s), compare the total time cost of a mandatory stop plus a 5-second penalty served at the stop under green, SC and VSC.
Solution
Green: 22.4 + 5 = 27.4 s. VSC: 15.7 + 5 = 20.7 s. SC: 12.7 + 5 = 17.7 s. The penalty is 5 s every time. What varies is the stop.
B7. Cornering radius and track limits. Using $v_{\max} = \sqrt{\mu g r}$ (no downforce, 🧪 $\mu = 1.6$), how much faster is the minimum speed in a corner of radius 60 m if the driver uses 2 m more radius by running beyond the line? Why does that matter more on a corner leading onto a long straight?
Solution
$v(60) = \sqrt{1.6 \times 9.81 \times 60} = \sqrt{941.8} = 30.69$ m/s (110.5 km/h). $v(62) = \sqrt{973.2} = 31.20$ m/s (112.3 km/h). The gain is 0.51 m/s, or 1.8 km/h. That extra exit speed is carried all the way down the following straight, so the time gained grows with the straight's length. That is why exit corners such as the Red Bull Ring's Turns 9–10 collect deletions.
🧪 Illustrative model: $\mu = 1.6$ and the no-downforce formula are assumptions for the calculation, not car data.
B8. Rate ratio. Big grid drops happened 0.52 times per race in 2018–22 (103 races) and 0.18 times per race in 2014–17 and 2023–25 (149 races). Reconstruct the approximate counts and the rate ratio, and explain why the confidence interval (1.82–4.59) is wide.
Solution
$0.52 \times 103 \approx 54$ and $0.18 \times 149 \approx 27$ events (the script's exact counts are 54 and 27). Rate ratio $= (54/103)/(27/149) = 0.524/0.181 = 2.89$. On the log scale, the standard error is $\sqrt{1/54 + 1/27} = 0.236$, so the 95% CI is $2.89 \times e^{\pm 1.96 \times 0.236}$, or 1.82–4.59. It is wide because the smaller count is only 27 events.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Analyze this session ⭐⭐. Take the 2024 São Paulo Grand Prix race (f1data.session(2024, 21, "R")). Run reliability.rc_events(session=…) and reliability.investigations(...). Report the number of incidents, the outcome counts, how many reached "under investigation", and the median minutes to decision. Compare with the 2023–26 averages (6.9 incidents per race, 32.4% penalties).
Expected output (from code/08_exercise_checks.py)
10 incidents: no further action 4, after session 3, penalty 2, no decision in feed 1. Three of ten reached "under investigation" (30%), and two of those ended in penalties. Median minutes to decision 5.4 (n = 6). Both penalties were 10 s for causing a collision (Bearman lap 9, Piastri lap 29). This wet race had more incidents than average but a lower penalty share, and decisions were a little slower than the 4.0-minute median.
C2. Compare these drivers ⭐⭐. For the 2023 Austrian GP, list every driver who received a track-limits penalty, with their total deletions, the deletion count when they were shown the black-and-white flag, and the count at each penalty. Does the Austria pattern match the 3/4 rule of §37.8?
Expected output (from code/08_exercise_checks.py)
Sargeant 4 deletions (flag at 3, 5 s at 4); Gasly 13 (flag 6, 5 s at 13); Magnussen 6 (flag 5, 5 s at 6); Tsunoda 13 (flag 4, 5 s at 6, 10 s at 11); Albon 10 (flag 4, 5 s at 8); Hamilton 9 (flag 5, 5 s at 7); Sainz 6 (flag 4, 5 s at 6). Only Sargeant follows the 3/4 pattern exactly. In a race with 89 deletions the decisions lagged the deletions, so counts at the moment of the message run high. The "rule" describes typical races; it is not a timestamped law.
C3. Build the strategy ⭐⭐⭐. Extend code/05_grid_penalties.py to estimate recovery separately for 2023–24 and 2025–26. Is the green-pass coefficient stable? With so few cars per period, what is the smallest effect you could hope to detect? Report each coefficient with its 95% CI and n.
Expected shape: two OLS tables, each with n of roughly 15–25 finishers, and confidence intervals much wider than the pooled ±0.53 places per 10 passes. Expect at least one interval to include zero.
C4. Analyze this session ⭐⭐. Write a function penalty_timeline(session) that returns, for each penalty in a race, the lap it was announced, the lap of the PENALTY SERVED message (if any), and the driver's pit in-laps between the two. Run it on the 2026 Mexico City GP. Which penalties were served at a stop, and on which laps?
Expected shape: four rows. Leclerc's 5 s (announced lap 12, served lap 30), Russell's 10 s (lap 13, served lap 37), Pérez's 5 s (lap 46, served lap 70) and Hülkenberg's 10 s (lap 51, served lap 70). Check each driver's pit in-laps from f1data.laps(s, driver=…) against the served laps.
C5. Predict the race ⭐⭐⭐. Use reliability.dnf_hazard with era="2022-25 ground effect" and reliability.sample_dnf to simulate 10,000 races of 20 cars over 57 laps. Report the mean number of DNFs per race and the share of races with zero DNFs. Compare with the observed 2.53 DNFs per race in 2022–25. Then repeat with 2026 hazards and compare with 3.95.
Expected shape: a simulated mean close to $20 \times P(\text{DNF})$, about 2.5 for 2022–25 and about 3.5 for 2026 (2026 fields had 22 cars). Zero-DNF races should come out somewhat more often than in the real data, because real retirements cluster (one crash can take out two cars). Explain why independent sampling misses that.
C6. Compare these drivers ⭐⭐. Using penalty_table for Grands Prix 2023–26, count in-race penalties per team per race entered. Which teams were penalised most and least often? Is the difference larger than you would expect from a Poisson process with a common rate? Use a chi-square test on the counts.
Expected shape: eleven or twelve teams (renames are separate refs), with counts between a handful and about 30, against roughly 0.11 penalties per car per race overall. Report the chi-square statistic and p-value, and say whether the evidence supports "some teams are penalised more" at all.
C7. Analyze this session ⭐⭐⭐. For qualifying sessions in 2025–26, find every deleted lap that was faster than the driver's best counted lap. Join to the session's final classification and estimate how many grid places the deletion cost, assuming the deleted time would otherwise have counted. Report the median and maximum places lost.
Expected shape: a few dozen rows (41 such deletions across all four seasons among the 551 messages with a printed time). The median places lost will be small (one or two), with a long tail. State the assumption explicitly: a deleted lap might not have been repeatable.
C8. Predict the race ⭐⭐⭐. For 2014–2021, compare Mercedes' phase hazards with the field's using dnf_hazard(df=…). Then build a team multiplier and say whether it should be a single number or differ by phase.
Expected output (from code/08_exercise_checks.py)
Mercedes: lap 1 0.0094 (3 events), laps 2–10 0.0007 (2), middle 0.0010 (12), final 10 0.0017 (5); race DNF share 6.9% (n = 320). Field: 0.0299 / 0.0038 / 0.0025 / 0.0036, 18.2%. The ratios differ by phase (0.31 on lap 1, 0.4 in the middle), but each phase rests on 2–12 events. A single multiplier (6.9/18.2 ≈ 0.38) is the defensible choice. Separate phase multipliers would fit the noise.
Part D — Strategy & Judgment ⭐⭐⭐
D1. Call the pit stop. 2026 Mexico City GP. Charles Leclerc (Ferrari) receives a 5-second penalty on lap 12 for leaving the track and gaining an advantage. He still has a mandatory stop to make. Decide: (a) is there any advantage in serving the penalty at the stop rather than having it added at the end? (b) If a VSC appeared while he was within a few laps of his planned stop, would you bring the stop forward? Use the book's pit-loss figures.
Reveal
(a) The penalty costs 5 s either way. Serving it at the stop holds the car stationary for 5 s, so it rejoins 5 s further back but carries no penalty to the flag. Having it added at the end keeps the track position until the flag but leaves the cost exposed to whatever the gaps are then. What matters is the gap structure: if he can build more than 5 s on the car behind by the end, an added penalty costs nothing. At the stop, the 5 s comes on top of the stop and may drop him into traffic. The data show the penalty was marked served on lap 30, at his stop. (b) Yes, in general. A VSC stop costs about 15.7 s instead of a green-flag stop's 22.5 s, a saving of about 6.8 s, larger than the penalty itself. This race's VSC came on lap 7, too early for a one-stop plan on most compounds. Whether to stop that early is the Chapter 13–14 question of tyre life against stop cost.
D2. Design the setup. A circuit's worst corner produces three-quarters of its race deletions (Yas Marina Turn 1: 75 of its race deletions, 76%). If you are the race engineer, how would you trade setup and driving for that corner? Consider: a car set up to rotate more on entry; a driver line that gives up exit width; and the cost of a black-and-white flag later in the race. Give a decision rule in terms of lap time and the 3/4 practice.
One good answer
Estimate the lap-time gain from using the extra width (for instance from qualifying laps that were deleted versus counted laps at the same corner). Then compare it with the expected cost of the penalty. Running wide every lap is not an option: four deletions bring a 5 s penalty, and a 5 s penalty costs a place about 57% of the time (§37.10). A driver can afford two "free" deletions over a race, so the gain is limited to the laps they choose. The rule: give up exit width unless the per-lap gain times the laps you actually use it on beats the expected penalty cost, and keep the count below three. Setup changes that improve rotation reduce the need to use the exit at all.
D3. Take the grid penalty. Your driver will need a new ICE before the end of 2026. The candidates are the Brazilian GP (Interlagos, 60.8 green on-track passes per race, 2023–26) and the Singapore GP (Marina Bay, 29.5). Using the §37.10 regression, how many more places would you expect to recover at Interlagos? Then list what else should enter the decision.
Reveal
$(60.8 - 29.5) \times 0.0749 = 2.3$ places (95% CI $31.3 \times 0.022 = 0.7$ to $31.3 \times 0.128 = 4.0$). Other factors: the reliability risk of the old ICE in the races before the change (🧪; no engine-age data exist); safety-car rates (a neutralisation can bring the field back to a car starting at the back); weather risk; and how many points your car would score at each circuit without the drop. The Interlagos sample includes four 2026 penalised starters who finished P2, P4, P8 and P9 from grid slots 7–21. Singapore has one (Russell 2026, 19th to 9th).
D4. Read the funnel. During a race your driver is named in UNDER INVESTIGATION - CAUSING A COLLISION. You are 4.5 s ahead of the car behind, with 15 laps to go. Should you change anything? Use the funnel and the penalty tariffs from this chapter.
Reveal
Incidents that reach "under investigation" end in a penalty 71% of the time, and 39 of 55 collision time penalties in 2023–26 were 10 s. A likely outcome is a 10-second penalty, decided within a few minutes (median 4.0). With a 4.5 s gap, a 10 s penalty costs at least one place, and more if the next cars are close. The response is to push to build the gap beyond 10 s if the tyres allow it, and to plan for losing the place if not. Do not change the plan for a "noted" message. Do change it for "under investigation".
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1 (with Chapter 14) ⭐⭐. In the 2026 Mexico City GP the red-flag window ran 39.0 minutes, from the RED FLAG message to SESSION STARTED. The press reported a "33-minute red flag". Using boxbox.neutralisation.windows and the raw race-control timestamps, find which pair of messages gives about 33 minutes, and explain why both numbers are defensible.
Hint: list every message between the red flag and the restart (RACE WILL RESUME AT…, SAFETY CAR LIGHTS ON, SESSION STARTED, STANDING START). Then decide which event you think "the end of the red flag" is.
M2 (with Chapter 17) ⭐⭐⭐. Chapter 17 found 2026 starts busier (more lap-1 position changes) but this chapter found few 2026 lap-1 retirements (lap-1 hazard 0.0066). Test whether the 2026 lap-1 retirement rate is statistically lower than 2022–25 (0.0208), using a two-proportion test on lap-1 retirements among starters. Discuss what could make busier starts produce fewer retirements.
M3 (with Chapter 27) ⭐⭐⭐. Add reliability.sample_dnf to a simple Monte Carlo of a 57-lap race with 20 cars of equal pace, with retirements removing cars from the classification. How does the expected points haul of a car with a team multiplier of 2.4 (Aston Martin 2026) compare with a car at 0.6, if both would otherwise finish P8? Report the expected points and the share of races in which each scores.
M4 (with Chapter 13 and Chapter 34) ⭐⭐. Penalties served at a stop show up in pit-lane times. Using the OpenF1 pit table, find every stop in 2023–26 within two laps before a PENALTY SERVED message for the same driver. Compare their pit-lane times with each race's median. Do 5 s and 10 s penalties appear as +5 s and +10 s? (The 2026 Las Vegas example: Hamilton 32.47 s against a race median of 22.6 s.)
M5 (with Chapter 28) ⭐⭐. regs.pu_allocation gives the ICE allowance by season. Regress big grid drops per race on the ICE allowance across 2014–2026 (13 seasons). Report the slope and its interval. Then explain why 13 points and many other changes between seasons (new teams, calendar length, the 2026 power units) make this weak evidence for a causal effect.
Part E — Research & Extension ⭐⭐⭐⭐
E1. A stewarding consistency audit. Using the incidents from reliability.investigations for 2023–26, build a model of the probability that an incident ends in a penalty, using offence group, number of cars named, lap phase, season and circuit. Use logistic regression with circuit random effects, or a regularised model. Report which factors matter, with intervals, and which don't. Be explicit about what the feed cannot show (post-race decisions, evidence the stewards saw) and why "inconsistency" cannot be proven from this data.
E2. A reliability forecast for 2027. Using team DNF rates 2014–2026 and the year-to-year persistence found in §37.4 (median Spearman +0.45), build a forecast of each team's 2027 DNF rate that shrinks toward the field and toward the team's own history. Back-test the method on 2015–2026 (forecast each year from the previous ones). Compare it with two baselines (field rate; last season's raw rate) on log-loss. Which wins, and by how much?
E3. Track limits from telemetry. Race control tells us that a lap was deleted and at which turn. OpenF1 qualifying location data (telemetry.location) give the car's x/y path. For one circuit with many qualifying deletions (Monaco Turn 10 or Las Vegas), overlay the paths of deleted and non-deleted laps through the named corner. Is the deleted line measurably wider? Discuss the resolution limits (≈ 4 Hz samples, and positions in decimetres) and whether they allow any conclusion.