mlprep
Hard12 min·1 round

How do you determine the sample size needed for an A/B test?

Written by the mlprep team · Updated

Interviewer Mode
Interviewer

Your PM asks: "How long do we need to run this A/B test?" Walk me through how you'd calculate the required sample size. What inputs do you need, and what happens if you get the inputs wrong?

Ready to compare your reasoning?

The key takeaway unlocks after you reveal an expert answer.

Follow-up Questions to Test Yourself

Interviewers often pivot here once you cover the core concept.

  • How does CUPED reduce variance, and why does it require pre-experiment data for the same users?
  • What is the difference between practical significance (MDE) and statistical significance, and why do both matter?
  • How would you calculate sample size for a metric like revenue per user, which has very high variance and a heavy tail?

How confident do you feel explaining this?

Track your understanding or flag it to revisit before your next loop.

Related Questions