Skip to main content
This topic describes how to configure metric winsorization to limit the impact of extreme values in experiment and guarded rollout results.
Available for warehouse native metrics and LaunchDarkly hosted metricsYou can configure winsorization for warehouse native metrics, for use with warehouse native experiments, and for metrics created from LaunchDarkly hosted events, for use with guarded rollouts. To learn more, read Metric event sources.

Limiting the impact of extreme values on experiments

Winsorization is a statistical technique that replaces outlying values with values at a configured percentile. Using metric winsorization helps you limit the impact of extreme values in LaunchDarkly experiment and guarded rollout results, without introducing bias by selectively removing values. For example, consider a metric that generates the following (sorted) latency values for a single randomization unit during the course of an experiment:
The value 950 is an extreme outlier in this sample of data, and would significantly affect the mean latency value. The P90 value for the data is 170, so configuring winsorization for the metric at upper bound P90 percentile replaces all values higher than 170 with the value 170. This yields the modified data set:
LaunchDarkly supports configuring one-sided or two-sided winsorization as needed to limit the impact of extremely high values, extremely low values, or both. For example, winsorizing the example metric at both the lower bound P10 percentile and the upper bound P90 percentile mitigates the lower outlying 5 value, yielding the modified data set:

Common use cases

Winsorization is most commonly used with metrics that produce a long tail distribution of values. This generally corresponds to metrics that measure revenue, latency, or session duration. Using winsorization at the upper bound for P90 or higher percentiles limits the impact of extremely high values that would negatively skew experiment or guarded rollout results.

How LaunchDarkly computes winsorization percentiles

LaunchDarkly computes the percentile values for winsorization using all metrics collected for a randomization unit across all arms of an experiment, or across all variations of a guarded rollout. For metrics that use a metric measurement window, LaunchDarkly uses only those values collected within the configured window to determine the percentile values. If you do not configure a window, the measurement duration corresponds to the length of the experiment or guarded rollout. If you choose Include units and set the value to 0 for a numeric metric, LaunchDarkly does not include assigned zero values when it computes winsorization percentiles. To learn more, read Units without events.

Prerequisites and limitations

You can configure winsorization for these metrics:
  • Warehouse native metrics, for use with warehouse native experiments.
  • Metrics created from LaunchDarkly hosted events, for use with guarded rollouts.
Winsorization is available only for metrics that measure a count or a numeric value. You cannot configure winsorization for count distinct metrics or for metrics that measure occurrence.

Configuring winsorization

You configure optional winsorization properties after you specify the analysis method for a metric.
Configuring metric winsorization.

Configuring metric winsorization.

To configure winsorization:
  1. Open the Data section and navigate to the Metrics list.
  2. Click Create metric. The “Create metric” dialog appears.
  3. Choose an event source:
    • To use LaunchDarkly hosted events, select LaunchDarkly hosted, then select an event kind.
    • To use a warehouse, select Warehouse native, then select an available data source from the “Metric data source” menu, or create a new data source. To learn more, read Metric data sources.
  4. Search for or enter an Event key to use for the metric.
  5. Choose the metric aggregation from the “Metric definition” section. The window populates a full metric definition using default values.
  6. Change options in the “Metric definition” drop-down menus as needed to change the analysis units or other metric analysis options. To learn more, read Components of a metric.
  7. (Optional) Choose Enable custom measurement window if you want to configure a metric measurement window. To learn more, read Metric measurement window.
  8. Choose Enable winsorization.
  9. Enter percentile values in the Lower bound and Upper bound fields as needed to specify the percentile values used to winsorize extreme values. If you are configuring two-sided winsorization, the Upper bound value must be greater than the Lower bound value. Set Lower bound to zero, or Upper bound to 100, to disable winsorization for that bound.
  10. Enter a Metric name and an optional Description.
  11. Click Create.