- Introduced by
- Ron Kohavi, Diane Tang & Ya Xu (modern web experimentation practice)
- Year
- 2020
- Type
- Randomized-experiment pipeline for causal measurement of online changes
- Family
- Digital experimentation / causal inference
What does it do?
Online controlled experiments, commonly called A/B tests, randomly split live web or app traffic between a control and one or more treatment variants, so that differences in user behavior can be attributed causally to the change.
Ron Kohavi, Diane Tang, and Ya Xu set out the modern theory and practice in their 2020 book Trustworthy Online Controlled Experiments, building on the 2009 survey by Kohavi and colleagues. The method centres on a predefined Overall Evaluation Criterion, valid randomization, adequate statistical power, and checks that the experiment is trustworthy before its results are interpreted.
The intuition behind the method
Teams often disagree about whether a new headline, layout, price, or promotion will help, and expert opinion is frequently wrong. An online controlled experiment replaces the debate with a measurement: each incoming user is randomly assigned to the existing version (control) or the changed version (treatment), and their behavior is recorded. Because assignment is random, the two groups should differ only in the change itself, so a reliable difference in outcomes can be attributed to that change. Most of the difficulty lies in running the test trustworthily: choosing a metric that reflects real value, collecting enough users to separate a true effect from noise, and detecting faults such as uneven splits, logging errors, or stopping the test as soon as the result looks favorable.
History
Randomized experimentation is long established in other fields, but its use for evaluating online changes expanded as large internet companies gained the traffic and infrastructure to run many tests. Kohavi, Longbotham, Sommerfield, and Henne's 2009 Data Mining and Knowledge Discovery paper, 'Controlled experiments on the web: survey and practical guide', provided a practical guide to running such experiments, covering statistical power, sample size, variance reduction, experimentation system architectures, and randomization. Kohavi, Tang, and Xu's 2020 Cambridge book Trustworthy Online Controlled Experiments became a widely used practitioner reference on metrics, statistics, and the organisational side of experimentation.
When to use it
Use online controlled experiments when live users can be randomly assigned to variants and the question is the causal effect of a change to a website, app, email, advertisement, price, or ranking algorithm. They suit UI and copy changes, recommendation and search algorithms, pricing and promotion mechanics, onboarding flows, and feature launches, provided that enough traffic exists to detect a meaningful effect and that outcomes are logged reliably. Randomization removes the confounding that affects attribution and observational analysis, which is why the method is preferred when it is feasible. Avoid it when traffic or conversion volume is too low to reach adequate power, when randomization is infeasible or ethically unacceptable, when users interact so that one unit's treatment affects another's outcome (network effects, marketplace interference), or when the change cannot be applied per user. In these cases switchback designs, geo-experiments, or quasi-experimental methods may be more appropriate.
Limitations and considerations
- Detecting realistic effect sizes requires substantial traffic; low-volume products often lack the power to distinguish a small true effect from noise.
- When users affect one another, as in network or marketplace settings, simple user-level randomization can give biased estimates of the effect.
- Short experiments can reflect novelty or primacy effects that fade over time, so the measured effect may not persist.
- The OEC must be chosen carefully, because an experiment will optimize whatever metric is measured, including a proxy that does not track long-term value.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Randomization gives an unbiased estimate of the causal effect of a change, which observational attribution analysis cannot guarantee.
- Requiring a predefined Overall Evaluation Criterion ties the decision to a chosen measure of value and makes the success definition explicit before data are seen.
- Because assignment and measurement are automated, the same design can be applied repeatedly to many changes on live traffic.
- Validity checks such as the Sample Ratio Mismatch test can reveal instrumentation or assignment faults that would otherwise bias the reported lift.
Applications
- Testing website and landing-page changes such as headlines, layouts, and calls to action for their effect on conversion.
- Evaluating recommendation, search-ranking, and personalization algorithms before a full rollout.
- Measuring the effect of pricing, promotion, and checkout-flow changes on revenue and retention.
- Comparing email and advertising creatives to determine which drives the chosen success metric.
- Rolling out new features to a share of users with guardrail metrics to detect regressions.
How it works
How it works
Before any traffic is split, the team specifies the Overall Evaluation Criterion (OEC), a metric or weighted combination of metrics that represents the outcome the business cares about. The authors of the 2020 book treat the choice of OEC as a central design decision, since a poor proxy such as short-term clicks can be improved while revenue or retention decline. The team also states the hypothesis that the treatment changes the OEC, together with guardrail metrics that must not degrade, so that success is defined before the data are seen.
Formula
\text{OEC}=\sum_k w_k\,m_k;\quad H_0:\ \Delta\text{OEC}=0\ \text{vs}\ H_1:\ \Delta\text{OEC}\neq 0Users, or another consistent unit such as a session or account, are randomly and persistently assigned to control or treatment, typically by hashing a stable identifier so that each unit receives the same experience throughout. The required sample size is computed in advance from the chosen significance level, the desired power, the metric's variance, and the smallest effect worth detecting. The formula gives the number of users needed in each variant, so total traffic grows with the number of variants. Underpowered tests consume traffic without producing conclusive results, so power analysis and a planned duration that covers full weekly cycles are part of the design. The 2009 survey notes that hashing-based randomization is less straightforward in practice than it is often assumed to be.
Formula
n\approx \frac{2(z_{1-\alpha/2}+z_{1-\beta})^2\,\sigma^2}{\delta^2},\quad u\mapsto\text{variant by hash}(u)\bmod VWhile the experiment runs, its trustworthiness is checked before any metric movement is interpreted. The Sample Ratio Mismatch (SRM) test compares observed variant counts with the intended allocation using a chi-square statistic, and a significant deviation indicates a fault such as a broken redirect, asymmetric logging, or bot filtering. When an SRM is detected, the results are treated as invalid regardless of how favorable the apparent lift appears, and the cause must be found first. Passing such checks is a precondition for the estimation step.
Formula
\text{SRM check: } \chi^2=\sum_v \frac{(O_v-E_v)^2}{E_v}\ \Rightarrow\ \text{invalidate if } p<\alpha_{\text{SRM}}For a valid experiment, the treatment effect is estimated as the difference between the treatment and control means of the OEC and other metrics, reported with a confidence interval whose width depends on the two groups' variances and sample sizes. Variance-reduction techniques that adjust for pre-experiment covariates can narrow the interval without additional traffic. The interval is more informative for a business decision than a bare significance verdict, because it shows both whether the effect is distinguishable from zero and the range of effect sizes that are plausible.
Formula
\widehat{\Delta}=\bar{m}_T-\bar{m}_C,\quad \text{CI}=\widehat{\Delta}\pm z_{1-\alpha/2}\sqrt{\tfrac{s_T^2}{n_T}+\tfrac{s_C^2}{n_C}}The ship or no-ship decision rests on whether the effect is both statistically and practically significant and whether the guardrail metrics held. The p-value is the probability of observing a difference at least as large as the one measured if the true effect were zero. A small p-value indicates that the data are hard to reconcile with no effect, but it does not state how large the effect is. The confidence interval gives the range of effect sizes consistent with the data at the chosen confidence level. Statistical and practical significance differ: a change can be distinguishable from zero yet too small to justify the cost of shipping it. A common rule is to ship only when the entire interval lies above the smallest effect worth acting on. This smallest effect is the minimum detectable effect, the δ in the sample-size formula, so the power calculation and the decision threshold should be set from the same value. Repeatedly checking results and stopping at the first significant value inflates the false-positive rate unless sequential or always-valid methods are used. Testing many metrics or variants also requires controlling the false-discovery rate. For these reasons the analysis plan is usually fixed in advance, and a single significant metric among many is treated with caution.
Formula
\text{ship if } \text{CI}\subset(\text{practically significant region});\ \text{control FDR over many metrics/tests}Common pitfalls
- Checking results repeatedly and stopping at the first significant value sharply inflates the false-positive rate relative to a fixed-horizon analysis.
- Interpreting metric changes from an experiment that fails the Sample Ratio Mismatch check, where the randomization or logging is likely broken.
- Evaluating many metrics or variants without controlling the false-discovery rate, which can produce spurious wins among the results.
- Using a short-term proxy as the OEC, such as clicks, which may improve while revenue or retention decline.
Frequently asked questions
What is an Overall Evaluation Criterion and why does it matter so much?
The Overall Evaluation Criterion (OEC) is the metric, or weighted set of metrics, that defines success for an experiment. The authors of the 2020 book argue that it should reflect long-term business value rather than a short-term proxy, and that choosing it is one of the most difficult design decisions. Experimentation tends to optimize whatever is measured: if clicks are the OEC, a change may raise clicks while reducing trust, revenue, or retention. A useful OEC is sensitive enough to move within a reasonable test period, resistant to gaming, and aligned with strategic goals. Guardrail metrics that must not degrade are often used alongside it.
Why is peeking at results and stopping early a problem?
Fixed-horizon significance tests assume that the sample size is set in advance and that the result is analyzed once. If the p-value is watched continuously and the test is stopped as soon as it crosses the threshold, random fluctuation gets many chances to produce a false positive, and the actual error rate can be far above the nominal level. The remedies are to commit to a sample size and duration in advance, or to use sequential or always-valid methods designed for repeated monitoring. In either case, results should not be selected at the first favorable moment.
What is a Sample Ratio Mismatch and why check for it?
A Sample Ratio Mismatch (SRM) occurs when the observed share of users in each variant differs significantly from the intended allocation, for example when a 50/50 design yields a 52/48 split at large scale. Because assignment should be random, a significant deviation indicates a fault, such as a broken redirect, asymmetric logging, bot filtering, or a flawed randomization unit, which can bias the results and make a lift appear where none exists. A chi-square comparison of observed and expected counts is the usual test. When an SRM is detected, the experiment's metrics should not be trusted until the cause has been identified and fixed.
How should I read the p-value and confidence interval from an experiment?
A p-value is the probability of a difference at least as large as the one observed if the treatment had no effect. A small value suggests the observed change is unlikely to be pure noise, but it says nothing about how large the effect is. The confidence interval reports the range of effects consistent with the data. Base the decision on the interval: if its lower bound exceeds the smallest effect worth acting on, the change is both statistically and practically significant. If the interval includes effects too small to matter, the result is inconclusive, and a larger sample may be needed before deciding.
Related methods
Sources
Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing. Cambridge University Press.
ISBN: 9781108724265Kohavi, R., Longbotham, R., Sommerfield, D., & Henne, R. M. (2009). Controlled experiments on the web: survey and practical guide. Data Mining and Knowledge Discovery, 18(1), 140-181.
Open DOI reference