
Computing Confidence Intervals
Confidence intervals in Statsig are calculated using a two-sample z-test. This test requires knowledge of the variance in the metric delta we’re measuring, which is derived differently depending on the type of metric (details here). Once we’ve established the variance of the delta, it’s straightforward to compute the confidence intervals.Two-Sided Tests
For the absolute metric delta, the confidence interval is given by: where:- is the z-critical value for the desired significance level (1.96 for the standard and 95% confidence interval) and we run a two-sided test
- is the variance of the absolute delta (details here)
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:- is the z-critical value for the desired significance level (1.645 for the standard and 95% confidence interval) and we run a one-sided test
- 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