The identification challenge
Fuel load, tyre degradation, rubber build-up, ambient temperature, constructor pace, and dirty-air exposure are all embedded in the same single number: the lap time. A driver who looks slow on lap 40 might be managing a tyre cliff, running in dirty air, carrying heavy fuel, or some combination of all three. No single lap, viewed in isolation, can tell you which. The only way to separate these signals is to use the structure of the data: fuel varies predictably with lap count, rubber accumulation is always monotone-increasing, temperature can move in either direction, and constructor pace is identified across drivers within the same team. Sequential residualisation exploits each of these structural features in turn.Estimation order
Tyre cliff: Kaplan-Meier survival analysis
The lap at which a compound’s grip deteriorates sharply is not a fixed number. It varies by circuit, compound, ambient temperature, driver weight, and stint history. A Hard compound at Suzuka cliffs far later than a Soft at Bahrain. Off The Pace estimates cliff onset using Kaplan-Meier survival analysis on stint populations. Each stint is one observation that either reaches the cliff (an event) or ends before it (a censored observation, because the team pitted before the cliff arrived). The KM estimator produces a survival function the probability that a tyre survives to each lap and the cliff onset estimate is the median survival time. This is the same estimator used in clinical drug trials for time-to-event outcomes. The critical property: it handles censoring correctly. A stint that pits on lap 18 is not a missed cliff at lap 18 it is a censored observation at lap 17. Treating it as an event would systematically underestimate cliff onset across every circuit-compound group. Cliff parameters are stored indim_compounds_season, one row per (circuit, compound, season), covering 401 groups in the current seeds.
Clean lap filter
Not all laps are usable for coefficient estimation. Theclean_lap_filter macro excludes:
- Pit-in and pit-out laps (tyre age jumps, outlap grip anomalies)
- Safety car laps (artificial pace reduction)
- Virtual safety car laps
- Laps with rain
- Lap 1 (grid effects, multi-car incidents)
- Laps with race-control interference (crashes, FCY, etc.)
correction_weight column in fct_lap_residuals reflects how clean each lap is. A value of 1.0 means fully clean. Partial weights indicate laps with some interference that were included but down-weighted.
Of the total 162,729 raw ingested laps in the staging layer (stg_laps), about 85% (~137,447 laps) are retained in the fct_lap_residuals mart. The soft-outlier threshold (configured to 1.40x of the fastest lap) successfully salvages over 5,300 laps (giving them a weight of 0.6) instead of completely discarding them.
Teammate baseline
The purest way to isolate driver skill is within-team comparison: two drivers in the same car, in the same race, under the same conditions. A synthetic teammate residual is computed by comparing each driver’s residual to their teammate’s on equivalent laps same lap number, same compound, same correction weight. This approach strips away any remaining car-quality signal and exposes the human contribution more cleanly than the full-panel estimate. The synthetic teammate signal feeds into the downstream ML models.What the model does not claim
The decomposition is attributive, not causal in the strict do-calculus sense. When the model says a car lost 0.4 s to dirty air on lap 32, it means 0.4 s of that lap’s pace deficit is attributable to aerodynamic disruption not that the car would have been exactly 0.4 s faster in clean air. That counterfactual claim requires additional assumptions about race dynamics, tyre response, and driver behaviour that the model does not make. Attribution is more defensible than counterfactual prediction, and it is sufficient for the stated purpose: ranking the causes of a pace deficit by magnitude and communicating them clearly.Seven-Term Identity
The full additive equation and the CI invariant that enforces it
Tyre Cliff
How Kaplan-Meier cliff detection feeds into per-lap ML prediction
Pace Baselines
Where the compound, rubber, and ambient identification described here is computed