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

# int_pit_loss_circuit

> Empirical circuit-specific pit-lane loss prior, read by int_pit_strategy_value in place of the largely-imputed circuit_reference constant.

<Note>Part of the [Strategy](/transform/families/strategy) family.</Note>

Empirical circuit-specific pit-lane loss prior, read by int\_pit\_strategy\_value in place of the largely-imputed circuit\_reference constant. Per stop, loss = (in\_lap − ref) + (out\_lap − ref) where ref is the driver's median green lap that race; the value is the median across stops within a sane \[pit\_loss\_min\_s, pit\_loss\_max\_s] window, EB-shrunk toward the global median. Stops whose in-lap or out-lap ran under SC, VSC or a red flag are excluded — under a neutralisation the lap the stop is measured against is not the lap the driver would otherwise have run. Estimated per physical venue (circuit\_id) so a renamed event or double-header shares one pit lane and one sample, then emitted per event slug so the consumer's race\_to\_track join is unchanged. Scoped to races with a venue slug available.

## Lineage

```mermaid theme={null}
flowchart LR
  dim_circuits --> int_pit_loss_circuit
  stg_laps --> int_pit_loss_circuit
  stg_pits --> int_pit_loss_circuit
  stg_results --> int_pit_loss_circuit
  stg_track_status --> int_pit_loss_circuit
  int_pit_loss_circuit --> int_pit_strategy_cost_curve
  int_pit_loss_circuit --> int_pit_strategy_value
  style int_pit_loss_circuit fill:#e40404,stroke:#e40404,color:#fff
```

## Overview

| Property          | Value                                                                                                                                                                                   |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Layer             | `intermediate`                                                                                                                                                                          |
| Family            | [Strategy](/transform/families/strategy)                                                                                                                                                |
| Contract enforced | No                                                                                                                                                                                      |
| Upstream          | [`stg_track_status`](../stg/stg_track_status), [`stg_results`](../stg/stg_results), [`dim_circuits`](../dim/dim_circuits), [`stg_laps`](../stg/stg_laps), [`stg_pits`](../stg/stg_pits) |

**9 tests** [guard](/transform/ci/overview) this model  -  8 generic, 1 singular.

## Columns

| Column                 | Type | Nullable | Tests                                                                                                          | Description                                                                                                                                                                                                                                           |
| ---------------------- | ---- | -------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `circuit_slug`         |      | Yes      | [`not_null`](/transform/ci/structural), [`unique`](/transform/ci/structural)                                   | Event identifier (race name slug); recurs across seasons. PK.                                                                                                                                                                                         |
| `circuit_id`           |      | Yes      | [`not_null`](/transform/ci/structural)                                                                         | Physical-venue identifier the estimate is pooled on. Several event slugs can share one circuit\_id (british / 70th\_anniversary, brazilian / são\_paulo, mexican / mexico\_city, austrian / styrian) and then carry identical values by construction. |
| `n_stops`              |      | Yes      | [`not_null`](/transform/ci/structural)                                                                         | Number of clean green-flag pit stops observed at this physical venue.                                                                                                                                                                                 |
| `pit_loss_s_empirical` |      | Yes      | [`not_null`](/transform/ci/structural), [`expect_column_values_to_be_between`](/transform/ci/range-and-domain) | Median empirical pit-lane loss (seconds) across observed stops.                                                                                                                                                                                       |
| `pit_loss_s_shrunk`    |      | Yes      | [`not_null`](/transform/ci/structural), [`expect_column_values_to_be_between`](/transform/ci/range-and-domain) | Pit-lane loss EB-shrunk toward the global median (pseudo-count pit\_loss\_prior\_stops).                                                                                                                                                              |
