A/B Testing
p-value, error types, power, MDE, confidence intervals, and choosing the right criterion.
19 questions
JuniorTheoryVery commonWhat are Type I and Type II errors, and what do they mean?
What are Type I and Type II errors, and what do they mean?
A Type I error is a false positive — rejecting a true null hypothesis (seeing an effect that is not there); its rate is the significance level alpha. A Type II error is a false negative — failing to reject a false null (missing a real effect); its rate is beta, and power equals 1 - beta.
Common mistakes
- ✗Swapping the definitions of false positive and false negative
- ✗Tying both error rates only to sample size with no trade-off
- ✗Confusing statistical errors with data-quality bugs
Follow-up questions
- →How does increasing the sample size affect Type II error and power?
- →Why does lowering alpha raise the Type II error rate, all else equal?
JuniorTheoryVery commonWhat is a p-value in hypothesis testing?
What is a p-value in hypothesis testing?
A p-value is the probability of data at least as extreme as observed, assuming the null is true. A small p-value means the data is unlikely under the null, so you reject it. It is not the probability that the null is true.
Common mistakes
- ✗Reading the p-value as the probability the null is true
- ✗Confusing the p-value with the effect size
- ✗Treating it as the chance the result will reproduce
Follow-up questions
- →What does a significance level alpha of 0.05 actually control?
- →Why does peeking at results early inflate the false-positive rate?
MiddleTheoryVery commonHow do you choose sample size and duration for an A/B test?
How do you choose sample size and duration for an A/B test?
Sample size comes from alpha, power (1 - beta), the baseline metric's variance, and the MDE — n grows with variance and falls with the square of the MDE. Duration must reach that n and also cover full business cycles (at least 1-2 weeks for weekday/weekend seasonality), avoid novelty effects, and never stop early, since peeking inflates false positives.
Common mistakes
- ✗Choosing a round sample size with no power calculation
- ✗Stopping the test the moment p first drops below 0.05
- ✗Ignoring weekly seasonality and running under one cycle
Follow-up questions
- →Why does halving the MDE roughly quadruple the required sample size?
- →How do sequential testing methods let you peek safely?
MiddleTheoryVery commonWhat is a confidence interval and how is it used in A/B tests?
What is a confidence interval and how is it used in A/B tests?
A confidence interval is a range that, under repeated sampling, contains the true parameter (1 - alpha)% of the time — not a 95% probability the true value lies in one fixed interval. In A/B tests you build the CI of the difference between groups: if it excludes 0 the effect is significant, and its width quantifies the precision.
Common mistakes
- ✗Reading 95% as the probability the parameter is in one fixed interval
- ✗Confusing the CI with the spread of raw data points
- ✗Thinking containing 0 means the effect is significant
Follow-up questions
- →How does the CI of the difference relate to a two-sample p-value?
- →What happens to interval width as the sample size quadruples?
JuniorTheoryCommonWhat is an A/A test for, and what does a significant A/A result tell you?
What is an A/A test for, and what does a significant A/A result tell you?
An A/A test runs two identical variants to validate the platform — randomization, bucketing, and metric logging. With no real difference it should read significant only about alpha of the time, so a genuinely significant A/A means a broken pipeline, not a real effect.
Common mistakes
- ✗Thinking a significant A/A confirms a feature works
- ✗Expecting every A/A to come back significant
- ✗Dismissing a failed A/A as noise, not a platform bug
Follow-up questions
- →How would a sample-ratio mismatch surface inside an A/A test?
- →Across many A/A runs, how often should significance appear?
JuniorTheoryCommonWhat is the minimum detectable effect (MDE) and what drives it?
What is the minimum detectable effect (MDE) and what drives it?
The MDE is the smallest true effect a test is powered to detect reliably at the chosen significance and power. It grows with metric variance and shrinks as sample size grows: for fixed alpha and power, a larger n lets you detect a smaller effect. It is set at design time to size the experiment.
Common mistakes
- ✗Confusing the MDE with the effect actually observed
- ✗Thinking the MDE is a ceiling rather than a sensitivity floor
- ✗Ignoring variance and sample size as the main drivers
Follow-up questions
- →How does the required sample size scale as the MDE is halved?
- →What happens to power if the real effect is below the MDE?
MiddleTheoryCommonWhich statistical criterion fits a CTR metric in an A/B test, and why?
Which statistical criterion fits a CTR metric in an A/B test, and why?
CTR is a proportion — each user contributes a Bernoulli 0/1 (clicked or not). Compare the two groups with a two-proportion z-test or a chi-square test of proportions. For large n a t-test on the per-user binary indicator also works. The key is using per-user binary data, not aggregated rates, and checking n for the normal approximation.
Common mistakes
- ✗Running a t-test on two aggregated rates with no per-user data
- ✗Treating a proportion metric as a continuous mean
- ✗Skipping the sample-size check for the normal approximation
Follow-up questions
- →When does the normal approximation for a proportion break down?
- →How would a ratio metric like clicks-per-session change the criterion?
MiddleTheoryCommonA test came back flat at p equals 0.4 — what can the confidence interval tell you that the p-value cannot?
A test came back flat at p equals 0.4 — what can the confidence interval tell you that the p-value cannot?
A non-significant p-value is not proof the feature is dead — absence of evidence is not evidence of absence. The confidence interval shows the range of effects still compatible with the data. A tight interval hugging 0 with adequate power means no meaningful effect; a wide one spanning large gains means the test was underpowered, not negative.
Common mistakes
- ✗Reading a high p-value as proof of exactly zero effect
- ✗Treating the CI as a mere restatement of the p-value
- ✗Ignoring interval width as a signal of low power
Follow-up questions
- →How would you decide between underpowered and truly flat?
- →How does a non-inferiority margin sharpen this call?
MiddleTheoryCommonMDE was 3% but the test showed a significant 1.5% — what do you trust?
MDE was 3% but the test showed a significant 1.5% — what do you trust?
A significant result below the MDE means the test was underpowered for that effect, so the finding is fragile: the false-negative risk was high, and a significant sub-MDE effect carries a higher chance of being a fluke or peeking artifact. Trust the significance for the decision but treat it skeptically — re-estimate variance and replicate.
Common mistakes
- ✗Calling a sub-MDE significant result impossible
- ✗Treating significance as proof the effect size is exact
- ✗Assuming MDE and observed effect must converge
Follow-up questions
- →What would re-estimating variance from the live test change here?
- →How does early stopping inflate the chance of a sub-MDE significant result?
MiddleDesignCommonHow would you justify and organize an A/B test for a proposed change? A product manager wants to ship a change and asks you to run a proper experiment. Walk through how you would justify the test, design and monitor it, coordinate with the teams it touches, account for its cost, and decide when an A/B test is the right tool versus an alternative.
How would you justify and organize an A/B test for a proposed change? A product manager wants to ship a change and asks you to run a proper experiment. Walk through how you would justify the test, design and monitor it, coordinate with the teams it touches, account for its cost, and decide when an A/B test is the right tool versus an alternative.
Start from a hypothesis, target metric, and MDE, then design the split and a monitoring plan with guardrail metrics. Coordinate with marketing, comms, and engineering the test touches. Estimate the cost including the opportunity cost of holding back the change, and justify the test even when costly. Know the alternatives (before/after, holdout) and why A/B beats them under limited time.
Common mistakes
- ✗Running the split without a hypothesis or target metric
- ✗Ignoring opportunity cost and adjacent-team coordination
- ✗Insisting A/B is the only option, ignoring alternatives
Follow-up questions
- →When would a geo holdout beat a user-level A/B split here?
- →How do you put a number on the opportunity cost of delaying the change?
MiddleDesignCommonA PM watches the dashboard every day and wants to call the test the moment p dips below 0.05. Explain what this repeated peeking does to the false-positive rate over a two-week run, and what you would put in place instead so the team can still monitor progress without corrupting the decision.
A PM watches the dashboard every day and wants to call the test the moment p dips below 0.05. Explain what this repeated peeking does to the false-positive rate over a two-week run, and what you would put in place instead so the team can still monitor progress without corrupting the decision.
Every look is another chance to cross 0.05 under the null, so daily peeking over two weeks lifts the Type I error far above the nominal 5% — often to 20-30%. The single threshold holds only for one pre-planned analysis. Instead fix the horizon up front or use a sequential alpha-spending method that holds the rate at alpha.
Common mistakes
- ✗Treating each daily look as an independent 5% test
- ✗Believing more looks make an early result more reliable
- ✗Thinking a stricter alpha alone cancels peeking inflation
Follow-up questions
- →How does an alpha-spending function allocate error across looks?
- →When is a Bayesian or always-valid approach preferable here?
SeniorTheoryCommonYour power calc needs far more users per arm than traffic can supply — what levers cut the requirement, and what does each cost?
Your power calc needs far more users per arm than traffic can supply — what levers cut the requirement, and what does each cost?
Cut variance with CUPED or stratification — it buys sensitivity with no extra traffic but needs a stable pre-period covariate. Analyze only the triggered population to remove dilution. Raise the MDE, accepting missed smaller wins. Run longer, paying opportunity cost. Loosen alpha or power, trading away error control.
Common mistakes
- ✗Believing only raw sample size can raise power
- ✗Treating a stricter alpha as a free sample-size cut
- ✗Thinking an unequal split maximizes two-arm power
Follow-up questions
- →How does the covariate-adjustment method CUPED cut variance without extra traffic?
- →Why does analyzing the triggered population raise sensitivity?
MiddleDesignOccasionalYou have two weeks, about 40,000 daily users, and a new checkout button to evaluate. Design the experiment end to end — hypothesis, unit of randomization, primary and guardrail metrics, sample size and duration, and the analysis. Then state clearly what you would refuse to do even under deadline pressure, and why those shortcuts would invalidate the result.
You have two weeks, about 40,000 daily users, and a new checkout button to evaluate. Design the experiment end to end — hypothesis, unit of randomization, primary and guardrail metrics, sample size and duration, and the analysis. Then state clearly what you would refuse to do even under deadline pressure, and why those shortcuts would invalidate the result.
Fix one hypothesis and a single primary metric — checkout conversion — randomize by user (not session), and power for a realistic MDE at alpha 0.05. Run the full two weeks to cover weekly seasonality, add guardrails like errors and revenue, and analyze once at the end. Refuse to peek-and-stop or re-bucket mid-test — each inflates the false-positive rate.
Common mistakes
- ✗Watching many metrics with no chosen primary or power calc
- ✗Randomizing by session so returning users switch buckets
- ✗Stopping the moment p first drops below 0.05
Follow-up questions
- →Why does user-level randomization beat session-level here?
- →How would you set the guardrail thresholds before launch?
MiddleDesignOccasionalWeb and app funnels show different conversion — can you call them equal? Two product funnels exist, web and mobile app. Their purchase conversions look close but not identical, and the average purchase frequency is 3.7 on web versus 4.3 on mobile. How would you decide whether the funnels are really the same or genuinely different, and what would you do to back the claim with statistics rather than eyeballing the numbers?
Web and app funnels show different conversion — can you call them equal? Two product funnels exist, web and mobile app. Their purchase conversions look close but not identical, and the average purchase frequency is 3.7 on web versus 4.3 on mobile. How would you decide whether the funnels are really the same or genuinely different, and what would you do to back the claim with statistics rather than eyeballing the numbers?
You cannot call them equal by eye — the difference must be tested for statistical significance, not just observed. For the two conversion rates (proportions) use a two-proportion z-test or chi-square; for the difference in average purchase frequency (means) use a t-test. Account for sample sizes and confounders like audience or device mix before concluding the funnels differ.
Common mistakes
- ✗Declaring a difference real from raw numbers without a test
- ✗Using a t-test on proportions instead of a proportions test
- ✗Ignoring sample size and confounders between platforms
Follow-up questions
- →Which confounders between web and app users could fake a difference?
- →How would you size the test to detect a 0.6 frequency gap reliably?
MiddleDesignOccasionalA test shows plus 18 percent on day 3 but only plus 2 percent by day 14. Is this a novelty effect fading out, or a real but smaller win settling in? Describe how you would tell the two apart, what data cuts you would make, and how the answer changes what you finally ship and how you power a follow-up.
A test shows plus 18 percent on day 3 but only plus 2 percent by day 14. Is this a novelty effect fading out, or a real but smaller win settling in? Describe how you would tell the two apart, what data cuts you would make, and how the answer changes what you finally ship and how you power a follow-up.
Split users by tenure and first-exposure date: novelty concentrates in existing users and decays as each cohort ages, while a real win holds steady in never-exposed new users. Pure novelty trends toward zero; a real effect plateaus above it. Ship on the stabilized late-window estimate, not the day-3 spike.
Common mistakes
- ✗Trusting the day-3 spike as the true effect size
- ✗Averaging early and late readings into one number
- ✗Assuming any decay proves the feature failed outright
Follow-up questions
- →How would cohorting by first-exposure date isolate novelty?
- →Why must the follow-up be powered for the smaller effect?
MiddleDesignOccasionalA variant won the test and was rolled out to 100 percent, but the metric then dropped instead of rising. Enumerate everything that could have gone wrong — from statistics to instrumentation to the wider system — and say how you would confirm which cause is actually behind the regression before rolling back.
A variant won the test and was rolled out to 100 percent, but the metric then dropped instead of rising. Enumerate everything that could have gone wrong — from statistics to instrumentation to the wider system — and say how you would confirm which cause is actually behind the regression before rolling back.
The win may have been a false positive, or the winner's curse inflated a sub-MDE effect that regresses to the mean. Novelty may have faded, the period may differ seasonally, or a sample-ratio mismatch skewed the arms. At 100 percent there is no holdback, and some effects appear only at full scale. Confirm with a small long-term holdout and a pipeline re-check.
Common mistakes
- ✗Calling a post-win drop mathematically impossible
- ✗Assuming a proven winner must recover on its own
- ✗Ignoring the winner's curse and regression to the mean
Follow-up questions
- →How does a long-term holdout let you measure post-rollout?
- →Why does selecting the winner bias its effect size upward?
MiddleDesignOccasionalThe variant wins overall but loses in every single platform segment — iOS, Android and web all favor control, yet the pooled number favors treatment. Name the paradox at work, explain the mechanism that produces it, and decide what you would actually ship and why.
The variant wins overall but loses in every single platform segment — iOS, Android and web all favor control, yet the pooled number favors treatment. Name the paradox at work, explain the mechanism that produces it, and decide what you would actually ship and why.
This is Simpson's paradox: an uneven mix of segments across arms reverses the pooled result. If treatment drew more traffic from a high-converting platform, its pooled rate rises even while it loses in every segment. The mix gap is usually a sample-ratio mismatch, so the aggregate is untrustworthy; ship the segment-consistent direction.
Common mistakes
- ✗Trusting the pooled number because it has the largest sample
- ✗Calling a segment-versus-aggregate reversal impossible
- ✗Ignoring the allocation mix and possible sample-ratio mismatch
Follow-up questions
- →How would you detect the sample-ratio mismatch behind this?
- →When could a stratified or weighted analysis rescue the test?
SeniorDesignOccasionalA recommendations test shows CTR up, revenue flat, and complaints up. Pick exactly ONE primary metric for the decision, defend that choice against the temptation to celebrate the CTR gain, and specify the guardrail metrics and tripwire thresholds that would stop the rollout even if the primary metric looks good.
A recommendations test shows CTR up, revenue flat, and complaints up. Pick exactly ONE primary metric for the decision, defend that choice against the temptation to celebrate the CTR gain, and specify the guardrail metrics and tripwire thresholds that would stop the rollout even if the primary metric looks good.
Make revenue-per-user the primary metric, not CTR. CTR is a proxy a clickbait variant can inflate while hurting the outcome you care about — the surrogate trap where optimizing the proxy degrades the goal. Set guardrails on complaints, unsubscribes, and retention, with tripwires that halt the rollout on any breach.
Common mistakes
- ✗Choosing CTR because it moved the most
- ✗Shipping on whichever metric happens to improve
- ✗Blending metrics into one score with no guardrails
Follow-up questions
- →How does Goodhart's law explain the CTR-versus-revenue split?
- →How would you calibrate a complaint-rate tripwire threshold?
SeniorDesignRareThe effect is real but tiny — plus 0.3 percent conversion, statistically significant on huge traffic. Is it worth shipping? Build the argument using the MDE you powered for, the engineering and maintenance cost, and the ratchet effect of many small compounding wins, and say what would flip your decision either way.
The effect is real but tiny — plus 0.3 percent conversion, statistically significant on huge traffic. Is it worth shipping? Build the argument using the MDE you powered for, the engineering and maintenance cost, and the ratchet effect of many small compounding wins, and say what would flip your decision either way.
Significance is not practical significance — on huge traffic a trivial effect clears p below 0.05 easily. If 0.3 percent sits below your MDE, the estimate is noisy and winner's-curse inflated. But tiny wins ratchet: many independent gains compound. Ship if maintenance cost is near zero and the lower bound stays positive; drop it if fragile.
Common mistakes
- ✗Equating statistical with practical significance
- ✗Discarding every sub-one-percent win as worthless
- ✗Expecting a tiny measured effect to grow at full scale
Follow-up questions
- →How does the winner's curse bias a barely-significant effect?
- →How would a portfolio view of many small wins change the call?