Confidence Intervals
How Statsig Warehouse Native computes confidence intervals for experiment metrics, including formulas, assumptions, and how to interpret them.
Confidence intervals are an intuitive way to quantify the uncertainty in the observed metric deltas. A 95% confidence interval should contain the true effect 95% of the time: if you ran an experiment 100 times, the true value of the metric delta should fall inside the confidence interval 95 times.

Only 5% of the time would you expect to see the confidence interval exclude zero if the true effect was zero (a.k.a. a false positive). Larger confidence intervals imply less certainty in the exact size of the effect with a larger range of likely values.
Computing confidence intervals
Statsig calculates confidence intervals using a two-sample z-test. This test requires knowledge of the variance in the metric delta being measured, which Statsig derives differently depending on the type of metric (details here).After establishing the variance of the delta, Statsig computes the confidence intervals.
Two-sided tests
For the absolute metric delta, the confidence interval is given by:
where:
- $Z_{\alpha/2}$ is the z-critical value for the desired significance level (1.96 for the standard $\alpha=0.05$ and 95% confidence interval) for a two-sided test
- $var(\Delta \overline{X})$ is the variance of the absolute delta (details here)
When using Fieller Intervals, the relative metric delta CI can be computed using:
When using the Delta Method, the confidence interval is:
If using the Delta Method and the control mean isn't significantly away from zero, then it's simplified to:
One-sided tests
When running one-sided tests, the form of the confidence interval calculation changes slightly to account for a redistribution of desired false positive rate when looking for increases or decreases in the metric:
where:
- $Z_{\alpha}$ is the z-critical value for the desired significance level (1.645 for the standard $\alpha=0.05$ and 95% confidence interval) for a one-sided test
- $var(\Delta \overline{X})$ is the same as for two-sided tests
- the choice of confidence interval depends on if the one-sided test is looking for increases or decreases in the metric
Welch's t-test for small sample sizes
For small sample sizes, Statsig uses Welch's t-test instead of a standard z-test. Welch's t-test handles samples of unequal size or variance without increasing the false positive rate. The structure of the confidence interval calculation remains the same (depending on whether a 1- or 2-sided test is used), replacing the z-critical value with the t-critical value with degrees of freedom $\nu$.
For a two-sided test, the confidence interval is therefore:
Where $N_t$ and $N_c$ are the number of users in the test and control groups, respectively. For a large number of degrees of freedom, the t-statistic converges with the z-statistic. Therefore, Statsig uses Welch's t-test only when $\nu < 100$.
Comparing experiment data to a fixed baseline: one-sample t-test
Sometimes you want to answer questions like "Does my test variant lead to a click-through rate higher than 0.5?" You can define a fixed-baseline comparison when adding metrics to the experiment.
Statsig calculates the confidence interval as
Was this helpful?