A/B testing
A/B-тестирование
A randomized experiment that compares two versions of a product or feature. Different users get each version, and the team measures whether the change affects a chosen outcome.
Also known as: A/B-тест, сплит-тест
What an A/B test tells you
Suppose your team shortens its checkout form and purchases go up the following week. Was it the form or a weekend promotion? An A/B test gives you a better comparison: randomly assign eligible users to the existing form (A, the control) or the shorter form (B, the treatment) during the same period. Random assignment makes the groups comparable on average, so a well-run test can estimate the effect of the new form rather than just show that sales changed.
How to set one up
- Decide what success means. Pick a primary metric, such as the share of assigned users who place an order within seven days. Choose guardrail metrics, such as the cancellation rate, to catch changes that improve the main metric at an unacceptable cost elsewhere.
- Choose what to randomize. Assign by user ID if returning users should always see the same version. If coworkers share a workspace and can affect one another's outcomes, consider assigning whole workspaces and accounting for that grouping in the analysis.
- Plan how much data to collect and when to stop. A sample size calculation typically uses the baseline rate or variability, the smallest effect you want to detect, your significance level, and your target statistical power. Allow enough follow-up time to measure the outcome for users who enter near the end.
- Check the experiment before reading the result. Did the observed split match the intended allocation within normal random variation? Were purchases recorded consistently in both groups? If one version drops events, a difference in the dashboard may reflect tracking rather than behavior.
Reading the result
Say 1,000 of 10,000 users buy something in A, compared with 1,100 of 10,000 in B. Purchase conversion is 10% versus 11%: an estimated gain of 1 percentage point, or 10% relative to the control. Report a confidence interval alongside the estimate. A small p-value does not tell you whether the gain is big enough to justify a rollout; for that, consider the range of plausible effects, implementation costs, and guardrail results.
Where it fits and what can go wrong
Teams use A/B tests for checkout flows, onboarding, search rankings, and recommendation models. They answer a different question from software tests: a feature can work exactly as specified and still make the product worse. A common mistake is to rerun a fixed-horizon significance test every morning and stop as soon as it crosses the threshold. That raises the false-positive rate. If you need to make decisions before the planned end, choose a sequential method that supports interim checks.
In interviews
Expect to design a test from a short product brief. Be ready to name the eligible population, the unit of assignment, and the denominator of your metric. Interviewers may also ask what you would do if the primary metric improved but a guardrail worsened.