
Winsorization is a technique for reducing noise in experiment results caused by outliers.

Winsorization measures the percentile Px of a metric and sets all values above Px to Px.

Statsig computes the Px value using all non-zero and non-null unit-level values of the metric. Metrics are aggregated from rows or events, and the Px'th unit's value is used as the threshold to adjust other units' values.

{% tabs %}
{% tab title="Statsig Cloud" %}
At Statsig, the default percentile for winsorization is 99.9%. This reduces the influence of extreme outliers caused by factors such as logging errors or bad actors.

Statsig applies winsorization to sum, event count, mean, ratio, and funnel metrics, including imported metrics. Winsorization doesn't apply to Participation or User Accounting metrics.
{% /tab %}

{% tab title="Warehouse Native" %}
Statsig Warehouse Native lets you configure winsorization per metric, and choose the upper and/or lower bounds to apply.

{% figure %}
![Winsorization configuration interface](/images/snippets/stats-methods/winsorization/6d058842-27f7-4b6b-9bd8-245a5f894f90.png)
{% /figure %}

Statsig applies winsorization to sum, event count, mean, and ratio metrics.
{% /tab %}
{% /tabs %}

## Metric capping

Metric capping is a technique for handling outliers. You can define maximum values for a metric for any unit types configured for that metric. Statsig automatically adjusts any value that exceeds the cap downward to match the cap.

For example, if purchases greater than $10,000 per day shouldn't skew analysis, Statsig adjusts any transaction exceeding that threshold downward to $10,000. Capped metrics are available for Event Count and Aggregation (sum) metric types.
