A/B testing interview questions and answers

A/B testing interview questions check whether you can design an experiment that answers a product question and then read the result without fooling yourself. Expect hypotheses and metric choice, the unit of randomization, power and sample size, p-values and confidence intervals, sample ratio mismatch, peeking, novelty effects and network interference, and a launch decision when the metrics disagree.

By Published 7 min read

Where experimentation questions come up

Experiment design is a core round for product data scientists and analysts at consumer tech companies, and it appears in growth, marketing analytics and product manager loops too. The format is usually a product case ("we changed the checkout button, did it work?") followed by statistics follow-ups. Interviewers listen for structure: what you measure, who you randomize, how long you run, and what would make you distrust the result. Formulas matter less than knowing which one applies and why.

  1. Product framingTurn a vague idea into a hypothesis with a primary metric, guardrail metrics and an expected direction of effect.
  2. Design detailsRandomization unit, traffic split, sample size, duration and any reasons the standard setup will not work.
  3. AnalysisRead a results table: lift, confidence interval, p-value, segment cuts. Then spot the reason the result may be invalid.
  4. DecisionRecommend ship, iterate or stop, with the trade-offs stated for a product leader who will not read the statistics.

A/B testing fundamentals questions

Fundamentals for analysts and first screens
QuestionWhat it testsWhat a strong answer shows
What is an A/B test and why randomize?Core ideaUsers are randomly assigned to control or treatment so that, on average, the groups differ only in the change. Any difference in outcomes beyond chance can then be attributed to the change.
How do you write a good hypothesis?FramingName the change, the user behavior it should move, the metric and the direction: "showing delivery dates on the product page will raise checkout conversion". It should be falsifiable with the data you will collect.
Primary metric versus guardrail metrics?Metric designThe primary metric decides success and is fixed before launch. Guardrails such as latency, refunds, unsubscribes or revenue per user must not get worse, even if the primary metric improves.
What does a p-value mean?InferenceThe probability of a difference at least this large if there were truly no effect. It is not the probability that the treatment works, and it says nothing about the size of the effect.
What are type I and type II errors?Error typesType I is declaring an effect that is not there, controlled by alpha. Type II is missing a real effect, controlled by power. Raising power for a fixed effect needs more users or less noise.
What is statistical power?PowerThe chance of detecting an effect of a given size if it exists. A common target is 80 percent, but it is a choice that depends on the cost of missing a real win.
What is the minimum detectable effect?SizingThe smallest effect the test can reliably detect with the chosen alpha, power and sample size. Pick it from what would be worth shipping, not from what the traffic happens to allow.
Why should you not stop a test early when it looks significant?PeekingChecking repeatedly and stopping at the first p below 0.05 inflates the false positive rate well above 5 percent. Fix the duration in advance or use a sequential method designed for interim looks.
Why run a test for whole weeks?DurationBehavior differs by weekday, so partial weeks bias the sample toward some days. Most teams run at least one or two full weekly cycles.
What is an A/A test for?ValidationBoth groups get the same experience. It checks that the assignment, logging and analysis produce no difference when none should exist.
Fundamentals for analysts and first screens. Scroll sideways on a small screen.
from math import ceil, sqrt
from scipy.stats import norm

def sample_size_per_group(p1, mde, alpha=0.05, power=0.8):
    """Users per arm to detect an absolute lift of mde over baseline rate p1 (two-sided)."""
    p2 = p1 + mde
    z_a = norm.ppf(1 - alpha / 2)
    z_b = norm.ppf(power)
    var = p1 * (1 - p1) + p2 * (1 - p2)
    return ceil((z_a + z_b) ** 2 * var / mde ** 2)

print(sample_size_per_group(0.10, 0.01))    # 14749 users per arm for 10% -> 11%
print(sample_size_per_group(0.10, 0.005))   # 57760: halve the effect, about 4x the users

def two_proportion_z(conv_a, n_a, conv_b, n_b):
    p_a, p_b = conv_a / n_a, conv_b / n_b
    pooled = (conv_a + conv_b) / (n_a + n_b)
    se = sqrt(pooled * (1 - pooled) * (1 / n_a + 1 / n_b))
    z = (p_b - p_a) / se
    return round(p_b - p_a, 4), round(z, 2), round(float(2 * norm.sf(abs(z))), 4)

print(two_proportion_z(1500, 15000, 1650, 15000))  # (0.01, 2.83, 0.0047)
Sample size for a conversion test and a two-proportion z-test, using the normal approximation.

Experiment design questions

  • How do you choose the randomization unit? Match it to how the change is experienced and to where outcomes are measured. Users are the default; sessions or page views risk one person seeing both versions; clusters such as cities or teams are needed when users affect each other.
  • Your analysis unit differs from your randomization unit. What goes wrong? If you randomize users but analyze page views, views from the same user are correlated, so the naive standard error is too small. Use the delta method or bootstrap by user.
  • How would you test a new pricing page when traffic is low? Pick a metric closer to the change (clicks to plan selection rather than paid conversions), accept a larger detectable effect, run longer, or reduce variance with pre-period covariates such as CUPED.
  • What is CUPED? A variance reduction method that adjusts each user's metric using a pre-experiment covariate, often the same metric before the test. Less noise means the same power with fewer users.
  • How do you test five variants at once? Plan for it: correct for multiple comparisons (Bonferroni or a false discovery rate method), or run a first round to narrow the options and a second confirmatory test on the winner.
  • When should you not run an A/B test? When the change is a legal or security fix, when the sample is far too small to learn anything, when the effect takes months to appear, or when a test would harm users. Then use qualitative research, staged rollouts or quasi-experiments.
  • What is a holdout group? A small set of users kept on the old experience for a long period, so you can measure the combined long-run effect of many launches that each looked positive on their own.

Validity and analysis questions

Intermediate questions on trusting a result
QuestionWhat it testsWhat a strong answer shows
What is sample ratio mismatch?Data qualityThe observed split differs from the planned one more than chance allows, for example 50.6 to 49.4 on a large test. It signals broken assignment, bot filtering or logging loss, and it invalidates the comparison until fixed.
What are novelty and primacy effects?Time effectsUsers may click a new feature because it is new (novelty) or resist change at first (primacy). Plot the effect by day since exposure and look at new versus returning users.
Conversion is up, but revenue per user is flat. How do you read it?Metric conflictCheck whether new conversions are smaller orders, whether discounts moved, and whether revenue is simply noisier and underpowered. Report both with intervals rather than picking the flattering one.
A segment shows a large effect. Do you ship to that segment?Multiple comparisonsSlicing many segments will find a winner by chance. Treat it as a new hypothesis and confirm it in a test designed for that segment.
How do you analyze a revenue metric with extreme values?Heavy tailsMeans are driven by a few large buyers. Consider capping (winsorizing) at a pre-chosen percentile, a log transform, or bootstrap intervals, and say which you will use before the test starts.
What is the difference between a confidence interval and a p-value in a readout?CommunicationThe interval shows the plausible size of the effect, which matters for the decision; the p-value only says whether zero is plausible. Lead with the interval.
Bayesian or frequentist testing?MethodsBoth can work. Bayesian readouts give a probability that treatment is better and an expected loss, which some teams find easier to act on, but priors and stopping rules still need discipline.
Intermediate questions on trusting a result. Scroll sideways on a small screen.
from scipy.stats import chisquare

# Sample ratio mismatch: a 50/50 test that logged 50,000 vs 48,800 users
observed = [50_000, 48_800]
expected = [sum(observed) / 2] * 2
stat, p = chisquare(observed, expected)
print(round(stat, 1), p < 0.001)  # 14.6 True: the split itself is broken
A sample ratio mismatch check with a chi-square test, worth running before reading any lift.

Senior and scenario questions

Senior rounds hand you situations where the textbook setup breaks. When randomization is impossible, interviewers expect you to reach for regression with controls, covered in linear regression interview questions, or before-and-after comparisons that respect trends, covered in time series interview questions.

Scenario questions for experienced candidates
QuestionWhat it testsWhat a strong answer shows
Test a new matching algorithm in a two-sided marketplace.InterferenceTreated riders compete with control riders for the same drivers, so a user-level split biases the result. Randomize by region or time slot (switchback tests) and accept fewer, noisier units.
Test a feature in a social app where users message each other.Network effectsEffects spill over through connections. Cluster the network and randomize clusters, or measure spillover directly by comparing control users with many versus few treated friends.
The test is significant, but the lift is far smaller than the product team expected. Ship?Decision makingCompare the lift's interval with the cost of maintaining the feature and any guardrail movement. A small, real gain on a cheap change can be worth shipping; a costly feature may not be.
You cannot randomize a change to the whole country's pricing. How do you measure impact?Quasi-experimentsDifference in differences against a comparable market, synthetic control, or an interrupted time series, each with its assumptions stated plainly.
Leadership wants results in three days. What do you say?StakeholdersExplain the trade-off in their terms: with this traffic, three days can only detect a large effect and misses weekly patterns. Offer a larger minimum effect, a proxy metric or a longer test, and let them choose.
How would you build an experimentation culture in a team that ships on intuition?LeadershipStart with a few high-traffic tests that matter, share wins and surprising nulls alike, write a short design template, and make pre-registration of the primary metric a habit.
Scenario questions for experienced candidates. Scroll sideways on a small screen.

Fictional example

"Free shipping threshold test"
Interviewer
We lowered the free shipping threshold for half of users. Orders rose by 3 percent with a p-value of 0.01. Should we roll it out?
Candidate
Before the lift, I would check the split for sample ratio mismatch and confirm the test ran for full weeks. If both are clean, the order count is up, but the decision depends on margin. A lower threshold means we pay shipping on more orders and may shrink basket sizes, since people no longer add items to qualify. So I want the confidence interval on contribution margin per user, average order value and shipping cost per order. If margin per user is flat or up, I would ship. If orders are up but margin is down, I would suggest testing a threshold between the old and new values.

A ten-day experimentation practice plan

  • Days 1 and 2: explain p-values, power, the minimum detectable effect and the two error types in plain language, recorded and trimmed to under a minute each.
  • Days 3 and 4: write sample size and two-proportion test functions, then check them against a simulation that runs thousands of fake A/A tests.
  • Day 5: simulate peeking: stop each fake test at the first p below 0.05 and watch the false positive rate climb.
  • Days 6 and 7: practise five product cases from design to decision, always naming the primary metric, guardrails and randomization unit first.
  • Days 8 and 9: work through the hard cases out loud: marketplaces, social networks, low traffic and no randomization.
  • Day 10: one full mock with a results table to interpret, finishing with a clear ship, iterate or stop recommendation.

Experiment cases are graded on structure, and structure is easy to lose under pressure. Natively, an AI interview assistant for Mac and Windows, transcribes your mock cases on your computer, so you can check afterwards whether you named the randomization unit before the metric or forgot the guardrails. While practising, it can draft suggested answers, read a results table from a screenshot and help you write a power calculation. With Pro or the free trial it also works from your résumé and the job description you add, and it keeps the transcript and notes for review.

Questions people ask

What A/B testing questions are asked in data science interviews?

How to design a test from a product idea, choosing primary and guardrail metrics, the randomization unit, sample size and power, p-values and confidence intervals, sample ratio mismatch, peeking and novelty effects, and tests where users affect each other.

How do I calculate sample size for an A/B test?

Pick the baseline rate, the minimum effect worth detecting, the significance level and the power, then apply the two-proportion formula or a power calculator. Halving the detectable effect needs roughly four times the users.

What is sample ratio mismatch?

A split between groups that differs from the planned one by more than chance allows. It points to a bug in assignment or logging, and the result should not be trusted until it is explained.

Why shouldn't you stop an A/B test as soon as it is significant?

Repeatedly checking and stopping at the first significant result raises the false positive rate well above the nominal level. Fix the duration in advance or use a sequential testing method.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP