How do you build sample size calculation into the experiment design process?

Quick Overview

Asks how to make sample size calculation part of designing an A/B test, from choosing the metric and minimum detectable effect to checking runtime against traffic. Tests power analysis, feasibility trade-offs and adjustments such as multiple variants and variance reduction.

How do you build sample size calculation into the experiment design process?

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: medium

Interview Round: Other

How do you build sample size calculation into the experiment design process? ```hint Work backward Start from the decision the experiment is meant to support, and ask what size of effect would change that decision. ``` ```hint Check feasibility early Turn the required sample into calendar time using the traffic that is actually eligible, and decide before launch what you will change if the answer is too long. ``` ### What a Strong Answer Covers - The inputs to the calculation and where each one comes from: baseline, variance, minimum detectable effect, significance level and power. - The calculation itself, at least the form of the formula and how the required sample scales with the effect size and the variance. - Turning the sample size into a runtime with eligible traffic and whole weekly cycles, and what to do when the test is not feasible. - Adjustments for several variants, ratio or clustered metrics, and variance reduction. - Fixing the sample size and stopping rule before launch, and why stopping early on a peek breaks the error rates. ### Follow-up Questions - Your calculation says the test needs ten weeks of traffic. What would you change, and in what order? - How does the calculation change when you randomize by user but the metric is measured per session? - How much can CUPED reduce the required sample size, and what does the reduction depend on? - Stakeholders want to check results every day. How would you design the test so that this is allowed?

Overview: Asks how to make sample size calculation part of designing an A/B test, from choosing the metric and minimum detectable effect to checking runtime against traffic. Tests power analysis, feasibility trade-offs and adjustments such as multiple variants and variance reduction.

General logo
General
Nov 25, 2026
mediumData ScientistOtherAnalytics & Experimentation
0
0

How do you build sample size calculation into the experiment design process?

What a Strong Answer Covers Guidance

  • The inputs to the calculation and where each one comes from: baseline, variance, minimum detectable effect, significance level and power.
  • The calculation itself, at least the form of the formula and how the required sample scales with the effect size and the variance.
  • Turning the sample size into a runtime with eligible traffic and whole weekly cycles, and what to do when the test is not feasible.
  • Adjustments for several variants, ratio or clustered metrics, and variance reduction.
  • Fixing the sample size and stopping rule before launch, and why stopping early on a peek breaks the error rates.

Follow-up Questions Guidance

  • Your calculation says the test needs ten weeks of traffic. What would you change, and in what order?
  • How does the calculation change when you randomize by user but the metric is measured per session?
  • How much can CUPED reduce the required sample size, and what does the reduction depend on?
  • Stakeholders want to check results every day. How would you design the test so that this is allowed?