Calculate probability for A/B test results

Last updated: May 2, 2026

Quick Overview

Given the following scenario about revenue per session, calculate the the sample size needed.

Vercel
Analytics & Experimentation
Data Scientist
Vercel
May 2, 2026
Data Scientist
Phone Screen
Analytics & Experimentation
Medium

5

4

658 solved


Given the following scenario about revenue per session, calculate the the sample size needed.

Vercel asks this during the Phone Screen to assess your experimentation skills. They want to see how you define success metrics, design controlled experiments, and interpret results with appropriate statistical rigor.

What the Interviewer Expects
  • Design a rigorous experiment with proper randomization and sample size calculation
  • Define primary and guardrail metrics with clear rationale
  • Address novelty effects, network effects, and interference
  • Segment results appropriately and identify heterogeneous treatment effects
  • Propose follow-up analyses when results are ambiguous
Key Topics to Cover
Long-term vs short-term metrics
Simpson's paradox and ecological fallacy
A/B testing methodology
Metric definition and success criteria
Segmentation and heterogeneous effects
Network effects and interference
How to Approach This
  1. Define success metrics carefully. A good metric is measurable, actionable, and aligned with business goals.
  2. Run experiments long enough to account for novelty effects and weekly seasonality.
  3. Use funnel analysis to identify where users drop off for maximum optimization impact.
  4. Segment results by key dimensions (platform, country, user cohort) to catch hidden patterns.
  5. Consider network effects and interference between treatment and control groups.
Possible Follow-up Questions
  • What if you discover a bug in the logging during the experiment?
  • How would you handle an experiment where the control and treatment groups are different sizes?
  • What would you do if a stakeholder wants to end the experiment early because initial results look good?
  • How would you handle seasonality in your experiment?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Analytics Questions
Sample Answer
Problem Setup

The analytical question is: What sample size is required to detect a statistically significant difference in revenue per session between the control and treatment groups in an A/B test? To do this, we...

Methodology

To calculate the sample size needed for the A/B test, we can use the formula for sample size calculation for comparing two means:

[ n = \frac{(Z_{\alpha/2} + Z_{\beta})^2 \cdot (\sigma_1^2 + \sigma_...


Submit Your Answer
Markdown supported

Related Questions