Week 2: What a Lap Time Is Made Of

One car, alone on track

The question

What is a lap time actually made of, and how much of it can you measure from lap times alone?

The answer to the second half is: less than you would like, and the shortfall is not a data problem. It survives more laps and a better fit.

The words we need

  • stint — a run of laps on one set of tyres, from the lap you leave the pits to the lap you come back in
  • compound — one of the tyre specifications a car is allowed to run, each with its own grip and its own rate of decay
  • clean air — no car close enough in front to cost you lap time
  • out-lap — the lap that starts in the pit lane, so part of it was driven at the pit-lane speed limit
  • in-lap — the lap that ends in the pit lane, for the same reason in reverse

A lap time is a sum

One lap, six contributions:

  • base pace — this car, this track, this driver, a fresh tyre and no fuel penalty
  • fuel load — the car is heavier at the start of the race than at the end
  • tyre degradation — the set loses grip as it ages
  • track evolution — rubber goes down and the surface gets faster through a session
  • pace management — the driver deciding not to push
  • noise — everything else, lap to lap

We want the third one. We observe the sum.

Two of them pull opposite ways

Fuel burns off, so the car gets faster as the race goes on.

The tyre ages, so the car gets slower as the stint goes on.

Every lap time you see is the two of them already added together. Neither is labelled.

Which way a stint goes

Compare the two rates directly. In this week’s archive scenario, burning a lap’s fuel is worth 0.035 s/lap.

  • a compound wearing at less than 0.035 s/lap gives a stint whose lap times fall
  • a compound wearing at more gives a stint whose lap times rise
  • a compound whose wear rate grows with age crosses 0.035 somewhere, and the stint falls and then rises — one curve, two effects, and the turning point is where they cancel

Which laps are measurements

Not all of them.

  • the out-lap and the in-lap include pit-lane running, so they measure the pit lane
  • a lap spent managing pace measures the driver’s restraint
  • a lap run behind another car measures the car in front, which is why this week’s stint is clean air from end to end

Exclusions are declared with their reasons, lap by lap. A lap quietly dropped because it spoiled the fit is the fit choosing its own evidence.

One stint from the archive

Scenario arch-2027-03, car 14, stint 2, clean air. Tyre age is lap number minus twelve; laps 13 and 26 are the out-lap and the in-lap, and both are out.

LapTime (s)LapTime (s)
1492.1452092.512
1592.1852192.525
1692.3002292.551
1792.2802392.685
1892.3312492.672
1992.4462592.750

Scenario values from a generated archive, so every figure here closes exactly.

The naive fit

Regress lap time on lap number across the twelve clean laps:

0.055 s/lap, with residual scatter of 0.032 s and a 95% interval of 0.049 to 0.061 s/lap.

The first and last rows on the previous slide give the same slope, which is a check rather than the method — twelve laps are what buy the interval.

The stint loses 55 thousandths of a second per lap, and we know that to about 6 thousandths. It is a good fit. It answers the wrong question.

The turn

0.055 s/lap is fuel and wear together. These three splits fit the twelve laps identically:

Fuel gainWear costNet
0.0000.0550.055
0.0350.0900.055
0.0800.1350.055

Only the middle row is the archive’s. The other two are splits the same twelve laps would allow just as well.

A tyre losing 0.055 s/lap and a tyre losing 0.135 s/lap are not the same tyre. The data cannot tell you which one you have.

The same picture

01020lapslap numbertyre age12 lapslap 14lap 25

Inside one stint, tyre age is lap number minus a constant — twelve, in this stint. Two regressors, one line. There is nothing for a fit to separate.

What breaks the tie

Not more laps of the same stint. Only new information:

  • several stints with different start laps — lap 14 on a two-lap-old tyre in one stint, lap 14 on a nine-lap-old tyre in another, and the two stop moving together. This only works if you assume the fuel term is the same in every stint and the stints share one baseline. Give each stint its own free baseline and the confounding walks straight back in
  • different compounds on the same fuel curve — same assumption, doing the same work: the fuel term is shared across compounds, the wear terms are not
  • a fuel coefficient from outside the lap times — measured elsewhere, or given

Track evolution is a third term riding on lap number, and it is in the same trap. This scenario holds the track fixed, and the archive says so.

What this course supplies

Fuel: 0.035 s/lap. Taken from the generator that made the data, not fitted from it.

This week you are given ground truth. Later weeks withhold it, then reveal it, then withhold it again. Week 2 gets it because without it the lab’s question has no answer at all.

Correct, then refit

Express every lap as if it were run at lap 14’s fuel load: add 0.035 s for each lap since lap 14.

LapRawFuel creditCorrected
1492.1450.00092.145
2592.7500.38593.135

Refit on tyre age: 0.090 s/lap. The two rows above give the same number by hand — 0.990 s spread over 11 laps — which is how you check the fit.

The generator used 0.090. Nothing was fitted into existence; the tie was broken from outside the lap times.

Is it a straight line?

The residuals — what each lap did that the fitted line did not, in thousandths of a second.

+400-40age 2age 13

No curve, no run of one sign, nothing growing with age. The largest is 44 thousandths. A straight line is not contradicted here — which is a finding, not the absence of one.

The alternative, fitted and rejected

Add a tyre-age-squared column and refit, which lets the wear rate change as the tyre ages. The curvature term comes back at -0.0002 s/lap², with a 95% interval of ±0.0021.

That interval contains zero, so this stint does not ask for a curve. Report the straight line, and say you tried the curve and did not need it.

The squared term was not needed is a result you can defend. It is also your lab’s third task, and the reason the lab caps you at one alternative: a model you chose against on stated evidence teaches more than a third fit.

The interval is the answer

Wear: 0.090 s/lap, 95% interval 0.084 to 0.096, on 10 degrees of freedom.

The interval did not widen when we corrected for fuel, because the coefficient we subtracted was given as exact. A fuel coefficient you had to measure yourself would carry its own error, and that error would land here.

Report 0.090 alone and nobody can tell whether another stint disagrees with you or merely differs. Report the interval and disagreement becomes something two people can settle.

What this estimate cannot see

One car, alone, on a fixed track. No car ahead, and no lap spent waiting for a gap. Traffic is week 5’s, and it will move this number.

Your lab: select the clean laps and justify every exclusion, correct for fuel, fit linear wear against one named alternative, and report the coefficient with an interval.

Assignment 1 asks for this again. This is the smallest version of it.