Models / survival-model

Pit Window Survival

How much longer each driver's current stint is likely to run.

survival-modelanalytics.strategy

How it works

A survival model over stint length estimates the stint-length distribution for the driver's situation, then conditions it on the laps already run on the current tyres — so the window estimate tightens as the stint ages. It is a separate estimator from the per-lap pit probability; the two are published side by side and never share a field name.

When to use it

  • Show a pit window on screen: how many laps remain before a stop becomes likely.
  • Plan coverage or alerts around when a car's stint is expected to end.
  • Cross-check the per-lap pit probability with a stint-length view of the same question.

Inputs

  • compound
  • regulation era
  • stint number
  • tyre age at stint start
  • laps remaining at stint start
  • current tyre age

Output

drivers[].pit.window.medianStintLengthMedian total stint length (laps).
drivers[].pit.window.expectedResidualLapsExpected laps until the stop, given the stint has survived this far.
drivers[].pit.window.survivalPWithin3LapsP(pit within 3 laps | stint age), from the survival curve.
drivers[].pit.window.pWithin5LapsP(pit within 5 laps | stint age).

Example payload

An excerpt of one analytics.strategy delivery, trimmed to the fields this model produces. Values are illustrative. The full message shape is on the feed reference.

json
{
  "feed": "analytics.strategy",
  "lap": 35,
  "drivers": [
    {
      "number": "4",
      "tla": "NOR",
      "pit": {
        "window": {
          "medianStintLength": 24,
          "pWithin5Laps": 0.58,
          "expectedResidualLaps": 4.6,
          "survivalPWithin3Laps": 0.37
        }
      }
    }
  ]
}

Use it

Subscribe to analytics.strategy with a webhook and read this model's fields from each delivery:

bash
curl -X POST https://api.racehooks.io/v1/webhooks \
  -H "Authorization: Bearer $RACEHOOKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"webhookUrl":"https://your-app.com/f1","feedId":"analytics.strategy"}'

To try it without waiting for a race weekend, replay the recorded Canadian Grand Prix (2026-canada_r) from the quickstart.

How to read it

medianStintLength is the typical total length of a stint like this one; expectedResidualLaps is what is left of it given how long the tyres have already run. survivalPWithin3Laps and pWithin5Laps read the same curve over two horizons. survivalPWithin3Laps is deliberately named differently from pit.pWithin3Laps because the two come from different estimators and can disagree — the per-lap model reacts to the race lap by lap, while the survival view describes the stint as a whole.

Limitations

  • Weaker for stops triggered by a Safety Car or VSC, and for wet stints.
  • Less precise about exact timing in the middle of a stint than near its end.
  • The window block appears only when the model returns a usable result. The estimator behind it may change; the field names are the contract.

FAQ

How is survivalPWithin3Laps different from pWithin3Laps?

survivalPWithin3Laps comes from the stint-length survival model given current tyre age. pit.pWithin3Laps is derived from the per-lap pit probability. They are different estimators and are named differently on purpose.

Related models

  • Pit Stop Prediction — Probability of a green-flag pit stop on the next lap; stops under safety car, VSC or red flag are not counted.
  • Pit Stop Count — P(one / two / three+ total stops) for the race, per driver — re-estimated every lap.
  • Tyre Cliff — P(tyre performance cliff within the next few laps), per driver per lap, plus live tyre health.

Get the data

This model is delivered on analytics.strategy. Subscribe by webhook or stream it over SSE. The quickstart walks through registering an endpoint and replaying a past session against it.