Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Sample Size for Checkout A/B Test

Medium
Statistics & ProbabilityStatistical SignificanceSample SizeAsked 5 times

Problem

Business Context

CartJet is a large e-commerce marketplace (~8M weekly active users) optimizing its mobile checkout. A redesign reduces the number of form fields and adds Apple Pay earlier in the flow. Finance estimates that each additional completed order is worth $6.40 in contribution margin on average, so even small conversion lifts are meaningful.

The team wants to run a controlled A/B test (50/50 traffic split) and needs to decide how long to run the experiment to reliably detect a meaningful improvement.

Problem Statement

You are asked to determine the minimum sample size per group required to detect a lift in checkout conversion rate with adequate power, and then translate that into estimated test duration given expected traffic.

Given Data

ItemValue
Baseline checkout conversion rate (control)0.118 (11.8%)
Minimum detectable effect (absolute lift)0.006 (0.6 percentage points)
Significance levelα = 0.05
Desired power1 − β = 0.80
Allocation50% control / 50% treatment
Eligible checkout-start users per day320,000
Guardrail: you will not ship unless the 95% CI excludes 0Use two-sided test

Requirements

  1. State the null and alternative hypotheses for the primary metric (conversion rate).
  2. Compute the minimum required sample size per group using a normal approximation for a two-sample test of proportions.
  3. Convert the sample size into an estimated test duration in days given the daily eligible traffic and 50/50 split.
  4. Briefly explain what inputs most strongly drive sample size (and how product decisions like choosing a smaller MDE affect runtime).

Assumptions and Constraints

  • Users are randomly assigned and each user contributes at most one checkout attempt (independent Bernoulli outcomes).
  • Use a two-sided hypothesis test at α = 0.05.
  • Use the common planning approximation for two proportions:
    • Use p̄ = (p1 + p2)/2 in the variance term (planning value).
    • z-values from the standard normal distribution.
  • Ignore sequential testing/peeking adjustments (assume you will not stop early based on interim looks).
Practicing as: Data Scientist interview at DONE by NONE

Hi, I'll play your DONE by NONE interviewer for the Data Scientist role. Answer the question above like we're in the room, and I'll respond the way a real interviewer would.

You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.

Sign up freeI have an account
Sign up to unlock solutions
TaskRabbit Machine Learning Engineer Interview QuestionsVanguard Data Analyst Interview QuestionsNew Interview Questions: February 2026TaskRabbit Interview QuestionsDONE by NONE Data Scientist Interview Questions
Next questions
IntuitPower Analysis for Checkout A/B TestMediumphDataSample Size for Checkout TestMediumDONE by NONEPlan Sample Size for Checkout TestMedium