Skip to content

A/B Testing Fundamentals

How to run a trustworthy A/B test: hypotheses, randomisation, sample size, metrics and the mistakes that invalidate results.

Editorial team 2 min read

An A/B test randomly assigns users to a control (A) and a variant (B) to measure the effect of a change.

Before You Start

  • State a hypothesis: "The shorter checkout will increase completed purchases."
  • Choose a primary metric and a few guardrail metrics (refunds, page load time).
  • Calculate the sample size needed to detect the smallest effect worth acting on.
  • Fix the duration — typically whole weeks, to cover weekly cycles.

Randomise Properly

Assign at the right unit — usually the user, not the page view — so the same person always sees the same version. Check the split is as intended (a sample ratio mismatch signals a bug).

Common Mistakes

  • Peeking: stopping as soon as results look significant inflates false positives. Decide the end in advance or use methods designed for continuous monitoring.
  • Too many metrics: some will look significant by chance.
  • Novelty effects: users react to anything new; longer tests help.
  • Interference: users in different groups affecting each other, as in marketplaces or social features.
  • Changing the test mid-way.

Analysing Results

Report the effect size with a confidence interval, check guardrail metrics, and look at important segments without over-interpreting small ones.

Making the Decision

Combine statistical results with cost, risk and strategy. A tiny, statistically significant gain may not be worth maintaining a complex feature.

More in Data science & analytics

All Data science & analytics guides →
Data science & analytics Guide · 2 min

Descriptive Statistics Essentials

Mean, median, mode, spread and shape: the summary numbers every analysis starts with, and when each one misleads.

Data science & analytics 2 min read 6 Mar 2026

Data science & analytics Guide · 2 min

Probability Basics for Data Work

The probability ideas analysts use every day: events, conditional probability, independence and Bayes' theorem.

Data science & analytics 2 min read 5 Mar 2026

Data science & analytics Guide · 2 min

Common Probability Distributions

Normal, binomial, Poisson, exponential and more: recognising the shapes data takes and what they imply.

Data science & analytics 2 min read 4 Mar 2026

Data science & analytics Guide · 2 min

Hypothesis Testing Explained

Null hypotheses, p-values and significance: what a hypothesis test tells you, and the misunderstandings to avoid.

Data science & analytics 2 min read 3 Mar 2026