Pre-Experiment Bias

How Statsig detects and corrects for pre-experiment bias caused by uneven user distributions between treatment and control groups before exposure.

Pre-experiment bias happens when the test and control groups already differ on a metric before the experiment starts. Because the gap existed before exposure, the experiment didn't cause it, but your results can count it as part of the treatment effect. This can make a result look more or less significant than it is. To catch this, Statsig checks the scorecard metrics' data from before exposure and flags any metric where the groups already differed. Treat the flag as a caution when the metric is critical and you need an exact lift; proceed when the delta is small or CUPED absorbs it.

CUPED helps correct this bias but can't fully account for it. Some metrics, such as retention, aren't candidates for CUPED, and you can't easily adjust them.

How Statsig detects pre-experiment bias

Statsig measures the pre-experiment values of the scorecard metrics for every experiment group by running the standard results calculation on the pre-experiment period. The lookback covers the 7 days before each unit's exposure on Statsig Cloud, and your configured CUPED lookback window on Warehouse Native. Statsig compares each test group with control using a frequentist test at 99% confidence, and flags a metric when that confidence interval excludes zero, which means a p-value below 0.01. Statsig skips ratio metrics and switchback experiments.

When Statsig flags a metric, the metric's result shows a "Pre-experimental bias detected on this metric" warning, and the experiment's pre-experimental bias health check shows a warning that lists the affected metrics. For Statsig Cloud experiments in their first few days, Statsig also sends a notification.

A passing health check doesn't prove the groups were balanced. The check also passes when Statsig has no pre-exposure data to compare, for example for a metric with no history before the experiment started.

The Days Since Exposure view helps you identify novelty effects and pre-experiment effects. In the following example, the test group had a consistently higher mean than the control group in the 7 days before exposure.

In the 7 days before exposure, the test group's lift over control stays above 0% every day, between about 9% and 103%, before any treatment was applied.
Relative lift by days since exposure
Days since exposureLiftUpper 95% boundLower 95% bound
-724.681.2-31.7
-633.192.7-26.4
-588.4173.53.2
-4102.7180.924.6
-39.364.8-46.1
-240.891.6-9.8
-140.292.3-8.7
049.693.4-5.3

What to do when Statsig flags a metric

Pre-experiment bias can occur by chance and isn't always a problem:

  • If the total delta is small, it may not meaningfully change your interpretation of results.
  • If CUPED can account for the bias, the bias shouldn't affect your results.

In many cases, the warning is informational and you can proceed while treating the affected metrics with caution. Proceeding is appropriate when the metric isn't critical to the experiment or when you care more about the direction of movement than the exact number. When the bias has no systemic source, running longer also reduces it, because new users dilute the initial imbalance.

If the metric is critical to your analysis and you need the exact value, consider resalting and restarting the experiment.

Was this helpful?

For AI agents: a documentation index is available at /llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.

On this page