Skip to content

Experiment statistics: split checks, peeking and corrections

Three checks that keep an A/B result honest: a split check that flags a biased split, a stopping rule that keeps daily peeks from inflating false wins, and a correction for reading many metrics at once.

On this page

What it is

An A/B test compares a metric between a treatment group and a control group of randomization units, usually users or devices. The comparison is a hypothesis test: a p-value says how often a difference this large would appear by chance if the versions were the same. Three common things make that number lie. The groups may not be comparable, because the assignment or the logging was broken. The test may have been read too often, so the first lucky day was taken as the result. And too many metrics may have been read, so some of them look significant by chance. A platform that reports a lift needs a check for each.

The split check. Before the experiment starts, the platform records the planned ratio of users between groups, often 1:1. While it runs, it counts the users actually exposed to each group and runs a chi-squared test of those counts against the plan. A statistically significant gap is a sample ratio mismatch. It is a signal that there may be bias somewhere upstream of the metric, and until the cause is known it is hard to say how much that bias moves the result. Statsig runs this check on all experiments as part of its health checks, and when it fires, it breaks the counts down by dimensions such as SDK version, browser, operating system, region and bot flag to show which slice drives the imbalance. Microsoft's experimentation platform alerts on the same test, and describes a case where duplicated device IDs put more users than expected into the treatment arm.

Peeking. Evan Miller's note on repeated significance testing shows why a daily look at the p-value is a problem. The usual significance calculation assumes the sample size was decided before the data came in. If you instead run until the dashboard turns green, the reported level no longer means what it says. In his worked example, with a 50% conversion rate, a check after each observation and a stop at the first 5% result or at 150 observations, a change that does nothing is called significant 26.1% of the time. Peeking ten times turns a reported 1% level into roughly 5%. Looking is fine; stopping because of what you saw is what inflates the rate.

Sequential tests are the fix when you do need to act during the run. A group sequential test takes an expected sample size up front and spends the overall false positive budget across the planned looks, giving each look a share that depends on how much of the expected data has arrived. An anytime-valid test needs no expected sample size and stays valid however often you look, because it corrects for an unbounded number of analyses; the price is usually lower power than the group sequential version. Both typically need more samples than a single read at a fixed horizon, and stopping the moment a metric turns significant tends to overstate the effect.

Many metrics. Run 100 tests at the 5% level on changes that do nothing and you expect five false positives; if the tests are independent, the chance of at least one is about 99.4%. Two ways to correct this. Controlling the family-wise error rate caps the chance of any false positive; the Bonferroni correction is the most conservative way to do it and makes no assumption about dependence between tests, and the Holm variant gives more power. Controlling the false discovery rate instead caps the expected share of false positives among the results you call significant, which is usually the better fit when an analysis is exploratory or a finding can be re-tested. Microsoft's platform uses Benjamini-Hochberg false discovery rate control for its alerting, because tests there run across many experiments on the same product, several analyses per experiment such as partial-day and one-day cuts, and hundreds or thousands of metrics.

Guardrails, as this page uses the word, are the metrics you watch for harm rather than for lift, such as crash rate, reliability or page-load time. In Microsoft's alerting, a watched metric gets an allowed range of movement set from domain knowledge, such as plus or minus 1%, and an alert fires when a two one-sided test shows the movement has left that range. The bounds are deliberately not just significance: a two millisecond page-load regression may be significant and still not worth an alert, while a key reliability metric may warrant one at a 0.1% change. Alerts carry a severity, and for some time-sensitive ones the platform can shut the experiment down automatically rather than wait for a human to read an email. Spotify's Confidence runs its deterioration checks with sequential tests even when the main result is read once at the end. Our reading: a degradation check is looked at repeatedly by design, so it needs a test that tolerates that.

When to use it

Run the split check on all experiments, as a health check that precedes the metrics. It is cheap, it needs nothing but the exposure counts and the planned split, and a mismatch tells you the rest of the dashboard is not worth reading until the cause is found. Keep the p-value over time, since a mismatch that appears on a particular day points to a deploy or a logging change on that day.

Reach for a sequential test when someone will act on the result before the planned end: guardrail and deterioration checks, gradual rollouts, and experiments where a big win should ship early. Use the group sequential form when you can estimate the sample size in advance, since a rough estimate is enough and it keeps more power; fall back to an anytime-valid test when you can't.

Correct for multiple comparisons whenever the number of things tested grows: many metrics per experiment, several variants against one control, several analysis cuts per day, or an alerting system that watches hundreds of metrics across concurrent experiments. Without a correction, that system raises so many false alerts that people stop reading them. Our advice for the lift itself: name one primary metric and its sample size before the experiment starts, and treat movement in the other metrics as leads to re-test, not as results.

When not to

Don't use a sequential test on the primary metric when nobody will act before the planned end. A fixed-horizon test read once usually has more power for the same traffic, so the sequential version makes you wait longer or miss a real effect. The simplest design, one primary metric, a sample size chosen in advance and one read at the end, removes the peeking problem without any special machinery.

Don't apply a Bonferroni correction across hundreds of exploratory metrics. It is the most conservative choice and, with that many tests, it turns the per-metric threshold so strict that real effects can be missed. Use false discovery rate control for the exploratory set, or skip the correction and label those numbers as leads rather than findings.

Don't wire an automatic shutdown to any statistically significant negative movement. With enough metrics and enough looks, that can trip often on noise and small, acceptable regressions. Reserve auto-shutdown for alerts where waiting carries real cost, and set the alert bound per metric so that a tiny but significant latency change does not trigger it. For an experiment with little traffic, the first hours may not hold enough data to tell noise from harm, whatever the bound.

Compared

ToolWhat it protectsWhat it costsWhen it is the right choice

Fixed sample size, one read

The 5% false positive rate, exactly as stated

You wait for the planned sample before deciding

The primary metric, when nobody will act early

Group sequential test

False positive rate across planned looks

Usually more samples than a fixed-horizon test; needs an expected sample size

Guardrails and rollouts where you can estimate traffic in advance

Anytime-valid test

False positive rate at any look, with no plan

Usually lower power than group sequential

Monitoring with no known end, or traffic you can't estimate

Bonferroni or Holm

Chance of any false positive across the family

Very strict thresholds as the family grows

A handful of pre-named metrics where one false win is costly

Benjamini-Hochberg

Expected share of false positives among the wins

Some false positives get through

Hundreds of metrics or alerts, where leads can be re-tested

Split check

Trust in the comparison itself

A chi-squared test on two counts

All experiments, before any metric is read

In a picture

mismatchokbreachokcrossedwaitExposure logsSplit checkDebugMetricsGuardrailsAlert, may stopLift metricStop ruleDecideKeep running
Each analysis pass runs the split check first, then the guardrail bounds, and reads the primary metric against a stopping rule chosen before the experiment began.

How to say it in an interview

The common mistake

Quiz

The split check reports a 48/52 split on a planned 50/50 with a very small p-value, and the treatment shows a 3% lift. What should the platform do?
A team runs a fixed-horizon test planned for two weeks, checks the dashboard each morning and will ship as soon as p < 0.05. What is true about their false positive rate?
An experiment tracks 200 secondary metrics and 12 of them move significantly at the 5% level. Which reading is sound?
Why does a group sequential test usually have more power than an anytime-valid test?

Questions that use this

Hear it in

Related

Sources

  1. Statsig documentation: SRM Checks
  2. Evan Miller: How Not To Run an A/B Test
  3. Confidence by Spotify documentation: Sequential Tests
  4. Microsoft Research: Alerting in Microsoft's Experimentation Platform (ExP)
  5. Wikipedia: Multiple comparisons problem
Sign in to report a mistake