A/B Tests: The Design Elements Behind Trustworthy Results: Hypotheses, metrics, sample size, and stopping rules explained

An A/B test is a controlled experiment that randomly assigns eligible units to a control experience and a treatment experience, then estimates how the assigned change affected predeclared outcomes. Trustworthy results depend on a falsifiable hypothesis, a stable assignment unit, valid telemetry, primary and guardrail metrics, sufficient precision, and a stopping rule chosen before the result is inspected.

The two letters are the least important part. Variant A is usually the current experience and variant B the proposed change, but a random split does not rescue an ambiguous treatment, a broken assignment, an opportunistic metric, or a test that stops when the dashboard looks favorable.

For a binary outcome, the point estimate is straightforward:

control rate = control conversions ÷ control assigned units
treatment rate = treatment conversions ÷ treatment assigned units
absolute effect = treatment rate − control rate
relative lift = (treatment rate − control rate) ÷ control rate

Here is illustrative arithmetic, not a company result. If 10,000 assigned control users produce 800 conversions, the control rate is 8.0%. If 10,000 assigned treatment users produce 860, the treatment rate is 8.6%. The point estimate is +0.6 percentage points, or 7.5% relative lift.

That calculation is not a ship decision. It still needs the planned uncertainty interval, sample-size target, metric and telemetry checks, guardrails, and stopping rule.

A hypothesis is a decision contract

“Changing the page will increase conversion” is too loose. It does not name the eligible population, mechanism, treatment, primary outcome, time horizon, or action after the result.

A testable contract answers:

  • Population: Which units can enter, and when?
  • Assignment: What unit is randomized—person, account, device, session, geography, or time block?
  • Treatment: What exactly differs, and is that difference stable during exposure?
  • Mechanism: Why could the change move the outcome?
  • Primary metric: Which one result governs the decision?
  • Guardrails: Which harms can stop or block the change?
  • Minimum effect: What improvement is large enough to matter?
  • Decision rule: What will the team do for a positive, negative, inconclusive, or invalid result?

The mechanism matters because it predicts diagnostic movements. If a shorter form is expected to reduce friction, starts and completions may change in a particular sequence. If completion rises but qualified downstream outcomes fall, the mechanism did not produce the intended business result.

A hypothesis is not a prediction that treatment will win. It is a falsifiable explanation linked to a precommitted decision, including what the team will do when the evidence is inconclusive.

Randomize the unit that carries interference and memory

Random assignment supports causal interpretation when treatment and control groups are comparable except for the assigned change. The unit must match how exposure persists.

Session-level assignment can contaminate a test when the same person sees both variants and remembers the experience. User-level assignment can fail when several users in one account influence one another. Account-level assignment reduces that interference but also reduces the number of independent units. Geography or time-block assignment introduces different dependence and seasonality concerns.

Write the assignment key, allocation ratio, eligibility event, exposure event, exclusion rules, persistence window, and re-entry behavior before launch. Log assignment even when the experience fails to render, or treatment-dependent data loss can remove precisely the units most affected by the change.

Microsoft’s sample-ratio-mismatch research describes SRM as an unexpected difference between observed and configured assignment proportions. It can arise from assignment, triggering, redirects, telemetry loss, or filtering. The SRM test is a warning; investigation still has to find the cause.

Microsoft treats sample-ratio mismatch as a serious data-quality signal. A statistically favorable outcome is not trustworthy until the mismatch is explained and repaired or the test is declared invalid.

Metrics need different jobs

Microsoft’s during-experiment patterns separate overall outcome, feature and diagnostic, guardrail, and data-quality metrics. That taxonomy prevents one crowded dashboard from treating every movement as an equal reason to ship.

Metric jobQuestionExample form
Primary decisionDid the intended outcome improve enough?Qualified completion per assigned unit
GuardrailDid the change cause unacceptable harm?Error, latency, complaint, cancellation
DiagnosticDid the proposed mechanism occur?Start, step completion, feature use
Data qualityCan the other metrics be trusted?SRM, assignment loss, join rate, missingness

Use a denominator that treatment cannot silently redefine. “Purchases per checkout starter” can mislead if treatment changes who starts checkout. “Purchases per assigned eligible user” preserves the randomized population, while the starter rate can remain a diagnostic.

Declare how repeated events, bots, refunds, late conversions, missing data, outliers, currency, and account changes are handled. Archive the query or code version. A metric name is not a definition.

Sample size is planned from the decision, not copied from a rule of thumb

The A/B sample-size guide by Georgiev and colleagues explains that planning depends on baseline rate or variance, effect definition, significance, power, allocation, and the analysis. Correlated observations and absolute versus relative effects require additional care. NIST’s comparison reference likewise derives proportion-test requirements from the assumed rates and error probabilities.

Start with the minimum detectable effect, or MDE: the smallest change the experiment is designed to detect with the chosen error rates. The MDE should come from the decision. If a change smaller than 0.3 percentage points cannot repay implementation and operating cost, powering for 0.05 points wastes traffic. If a 0.3-point harm is unacceptable, the guardrail may need more precision than the primary upside metric.

No universal sample size or duration exists. Required independent units increase when the baseline is noisy, the worthwhile effect is smaller, higher power is required, the significance threshold is stricter, or allocation is uneven. Seasonality, novelty, learning, network effects, and conversion lag can require a longer calendar even after the numerical sample target is reached.

Plan both an information target and a calendar boundary. Reaching a user count in two hours does not observe a weekly retention outcome. Running for several weeks does not repair too few independent accounts.

Stopping rules determine whether repeated looks are valid

A fixed-horizon design selects its sample or duration and analysis before launch, monitors only for integrity and safety, and evaluates the primary result at the planned end. Repeatedly checking a conventional fixed-horizon p-value and stopping on the first favorable look changes its error behavior.

Sequential methods can allow continuous monitoring when the analysis is explicitly built for it. The always-valid inference paper develops one such statistical contract. Its existence does not make any real-time dashboard sequentially valid; the estimator, boundaries, and decision rule must implement the method actually claimed.

Safety stopping is different from success stopping. A severe reliability regression can end exposure early under a predeclared guardrail even if the primary analysis is fixed-horizon. Preserve the reason as “stopped for harm,” not “treatment lost under the primary metric.”

Write four end states before launch:

  1. Ship: primary benefit crosses the decision threshold and guardrails pass.
  2. Do not ship: evidence shows material harm or insufficient value under the rule.
  3. Inconclusive: the interval includes materially positive and negative outcomes.
  4. Invalid: assignment, exposure, telemetry, interference, or analysis failed.

Review trustworthiness before reading the winner

Verify assignment and exposure

Check configured versus observed allocation, persistence, contamination, eligibility, and whether exposure logs exist independently of the outcome.

Verify data quality

Inspect missingness, joins, event counts, bots, duplicates, late data, and metric observation units by variant.

Apply the planned analysis

Use the predeclared population, metrics, estimator, multiplicity treatment, horizon, and stopping rule.

Read effect and uncertainty

Report absolute and relative effects with intervals; compare them with the minimum worthwhile effect and harm boundary.

Check mechanism and guardrails

Use diagnostics to explain the effect and guardrails to block a locally positive but globally harmful change.

Record the decision and limits

Archive the hypothesis, configuration, code, exclusions, result, decision, and conditions under which the conclusion may not transfer.

External validity remains bounded. A result for eligible users during one period establishes an effect for that tested population and implementation under the design assumptions. It does not guarantee the same effect for new users, other countries, another season, a later product state, or a permanently scaled rollout.

The decision
A trustworthy A/B test is designed backward from a decision: define the smallest effect worth acting on, randomize the right unit, predeclare the metrics and stopping rule, and verify the data before reading the result. A small clean test can be inconclusive; a large broken test is still broken.

Sources

  1. Microsoft Research, “Experimentation and the North Star MetricSupports: An A/B test randomly separates a sample into control and treatment groups; Experiment interpretation must connect metrics to a decision rather than read one movement in isolation. Checked 2026-08-24.Limitation: This is Microsoft-authored practice guidance; its examples and platform conventions are not universal statistical rules.
  2. Microsoft Research, “Patterns of Trustworthy Experimentation: Pre-Experiment StageSupports: Pre-experiment design includes hypotheses, metrics, assignment, data quality, and safe rollout controls; A core metric set can include outcome, guardrail, feature, engagement, and data-quality measures. Checked 2026-08-24.Limitation: These are patterns from Microsoft's experimentation practice and must be adapted to the actual product, risk, and analysis.
  3. Microsoft Research, “Patterns of Trustworthy Experimentation: During-Experiment StageSupports: Metric sets include data-quality, overall evaluation, diagnostic, and guardrail metrics; Monitoring can protect users while the planned experiment duration remains preset; Sample-ratio mismatch is a serious trustworthiness signal requiring investigation. Checked 2026-08-24.Limitation: Examples such as typical durations are organization-specific and are not used as universal benchmarks here.
  4. Microsoft Research, “Diagnosing Sample Ratio Mismatch in Online Controlled ExperimentsSupports: Sample-ratio mismatch occurs when observed assignment counts differ unexpectedly from the configured ratio; SRM can signal selection, telemetry, or assignment problems that invalidate interpretation. Checked 2026-08-24.Limitation: SRM is a diagnostic symptom, not a complete test of randomization, telemetry, or causal validity.
  5. arXiv, “All about sample-size calculations for A/B testing: Novel extensions and practical guideSupports: A/B sample-size planning depends on effect definition, variance or baseline rate, power, significance, allocation, and analysis choices; Correlated data and absolute versus relative effects require care in planning. Checked 2026-08-24.Limitation: The paper provides statistical methods and a guide; the appropriate assumptions and risk levels remain decision-specific.
  6. arXiv, “Always Valid Inference: Bringing Sequential Analysis to A/B TestingSupports: Sequential methods can support continuous monitoring with inference designed for that stopping behavior; Fixed-horizon and always-valid approaches have different statistical contracts. Checked 2026-08-24.Limitation: The paper does not make every dashboard or adaptive stopping rule valid; implementation must match the method's assumptions.
  7. NIST/SEMATECH, “Product and Process ComparisonsSupports: Required sample size for comparing proportions is derived from baseline proportions, effect, significance, power, and test direction. Checked 2026-08-24.Limitation: This engineering-statistics reference does not cover every modern online-experiment dependency, clustered unit, or platform-specific estimator.

Continue the evidence path

Run your growth team from one screen.

Invite only