> ## Documentation Index
> Fetch the complete documentation index at: https://playbook.smedleygroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Live Deg Prediction

> The median measured degradation per compound, with its spread, summarising the stints in the Tyre Deg Table.

## Overview

Live Deg Prediction covers three widgets, one for soft, medium and hard. Each summarises the degradation actually being measured this race: the **median** across every valid stint of that compound, with the range those stints span and how many there are.

It is the measured counterpart to [Deg Prediction](/software/internal/watchparty/widgets/deg-prediction), which shows the pre-race figure the strategy engine is planning with. This one follows the playhead and tightens as the race runs.

> [!NOTE]
>
> These widgets summarise the exact rows the [Tyre Deg Table](/software/internal/watchparty/widgets/tyre-deg-table) is showing. If a median looks wrong, the stints behind it are on screen, which is the point of deriving it this way rather than re-reading the snapshots.

***

## What It Shows

![The soft-compound live median over three stints (Madrid 2026)](https://mintcdn.com/smedley_group/4HA54IXVT1XyKj8C/images/watchparty/live-deg-prediction.png?fit=max\&auto=format\&n=4HA54IXVT1XyKj8C\&q=85\&s=b8abd0cf3c84ae0c9e76926561461f2d)

| Element | Encoding |
| - | - |
| Median | The middle degradation rate across the qualifying stints, to three decimal places, followed by the unit |
| Range | The lowest and highest rate among the same stints |
| Stint count | How many stints the figure is over, beside the range |

The shape is the same at every count. A single qualifying stint reads as `0.052 - 0.052 (1 stint)`, which says plainly that there is no spread yet rather than hiding the fact behind a bare number.

### Which stints count

A stint is included when both of these hold:

* **It has a fit.** The wire's own `fit: null` is never turned into a fabricated slope, so a stint with no fitted gradient contributes nothing.
* **It clears the minimum stint length.** This is the same threshold the Tyre Deg Table mutes a row for. A muted row is visible in the table but is not a usable measurement, so it is not median material.

Negative gradients are excluded. A negative gradient is a tyre that got faster, which in the dry is an artefact rather than degradation, and the ranking charts drop it for the same reason.

> [!WARNING]
>
> That exclusion has a known limitation in the wet. On a drying track a negative gradient is real, and the ranking bar charts keep it for a session flagged as rain. The rain flag lives on a snapshot this summary does not read, so these widgets drop negatives in **every** session. In a wet race the median here can therefore differ from the ranking chart's.

A stint's compound reflects any manual compound override, so a re-badged stint is summarised under the compound the table shows it as.

***

## Data Behind It

`screens/liveDegSummary.ts`'s `buildLiveDegPredictions` is a pure derivation over the same `TyreDegTableData` the Tyre Deg Table renders, which itself reads the driver-scoped `insight:stint_deg` snapshots.

It is deliberately not a new metric. Because it summarises already-published outputs rather than computing new ones, it carries no `model_id` or `model_version` of its own, and changing how it aggregates does not need a version bump. The versioning rule applies to the metrics underneath, which are unchanged.

The median is the middle value, or the mean of the two middle values at an even count. It sorts a copy, so the table's own row order is never disturbed.

***

## States

| State | Behaviour |
| - | - |
| No stint of this compound qualifies yet | "No valid stints yet" |
| Exactly one qualifying stint | The full shape, with the range collapsed to a single value and "(1 stint)" |
| Session is not a race | The not-a-race notice: these are race-only widgets |
| Playhead moved back | Recomputed as of that lap, like every other as-of widget |
| Live vs replay | Identical rendering |

***

## FAQ

> **Why the median rather than the mean?**
>
> One driver's badly compromised stint would drag a mean a long way. The median describes what the typical stint on that compound is doing, and the range beside it is what tells you how varied the field is.

> **Why is a stint in the Tyre Deg Table not in this median?**
>
> Either it has no fit yet, it is short of the minimum stint length (the table mutes those rows), or its gradient is negative. See "Which stints count" above.

> **This disagrees with the pre-race Deg Prediction. Is something wrong?**
>
> No, and the gap is the useful part: it is the difference between what the strategy engine assumed and what the tyres are doing.

***

## Next Steps

> **[Deg Prediction](/software/internal/watchparty/widgets/deg-prediction)**
>
> The pre-race assumption this is measured against.

> **[Tyre Deg Table](/software/internal/watchparty/widgets/tyre-deg-table)**
>
> The stints this median is taken over.

> **[Tyre Deg Ranking](/software/internal/watchparty/widgets/tyre-deg-ranking)**
>
> The same degradation, ranked by driver.

> **[Deg Fit Plot](/software/internal/watchparty/widgets/deg-fit-plot)**
>
> How one stint's gradient was fitted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.