How do the baseline rate and metric variance feed into a sample-size calculation, and why do they matter?

Quick Overview

Asks how the baseline rate and the variance of a metric feed into the sample size needed for an A/B test. Tests whether you can relate the minimum detectable effect, variance, significance and power, and explain what happens to an experiment when those inputs are estimated badly.

How do the baseline rate and metric variance feed into a sample-size calculation, and why do they matter?

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: medium

Interview Round: Other

How do the baseline rate and metric variance feed into a sample-size calculation, and why do they matter? You are planning an A/B test and need to decide how many users each arm needs before it starts. ```hint Start from the formula Write down the per-arm sample size for a two-sample test and find where each of the two quantities appears. ``` ```hint Binary metrics For a conversion rate, ask what determines the per-user variance. ``` ### What a Strong Answer Covers - How the baseline rate turns a relative minimum detectable effect into an absolute one, and why the same lift means different things at different baselines - Where variance enters the sample-size formula, and how it is set for binary metrics versus continuous ones - How n scales with the variance and with the inverse square of the effect size, ideally with a worked number - What goes wrong when the baseline or variance estimate is off, and how to estimate them before the test - Variance reduction methods and their effect on the required sample ### Follow-up Questions - The metric is revenue per user with a heavy right tail. How would you estimate its variance and size the test? - How does the calculation change for a ratio metric such as click-through rate when you randomize by user? - If CUPED uses a pre-period covariate whose correlation with the metric is 0.6, how much does the required sample shrink? - Traffic only allows 20,000 users per arm. How would you report the smallest effect the test can detect?

Overview: Asks how the baseline rate and the variance of a metric feed into the sample size needed for an A/B test. Tests whether you can relate the minimum detectable effect, variance, significance and power, and explain what happens to an experiment when those inputs are estimated badly.

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

How do the baseline rate and metric variance feed into a sample-size calculation, and why do they matter?

You are planning an A/B test and need to decide how many users each arm needs before it starts.

What a Strong Answer Covers Guidance

  • How the baseline rate turns a relative minimum detectable effect into an absolute one, and why the same lift means different things at different baselines
  • Where variance enters the sample-size formula, and how it is set for binary metrics versus continuous ones
  • How n scales with the variance and with the inverse square of the effect size, ideally with a worked number
  • What goes wrong when the baseline or variance estimate is off, and how to estimate them before the test
  • Variance reduction methods and their effect on the required sample

Follow-up Questions Guidance

  • The metric is revenue per user with a heavy right tail. How would you estimate its variance and size the test?
  • How does the calculation change for a ratio metric such as click-through rate when you randomize by user?
  • If CUPED uses a pre-period covariate whose correlation with the metric is 0.6, how much does the required sample shrink?
  • Traffic only allows 20,000 users per arm. How would you report the smallest effect the test can detect?