PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Statistics & Math/Uber

Compute A/B sample size under clustering

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competency in experimental design and statistical inference for A/B testing, specifically sample size calculation for two-sample proportions with unequal allocation, clustering effects (ICC and design effect), and adjustments for bot removal and data-quality attrition.

  • hard
  • Uber
  • Statistics & Math
  • Data Scientist

Compute A/B sample size under clustering

Company: Uber

Role: Data Scientist

Category: Statistics & Math

Difficulty: hard

Interview Round: Technical Screen

Compute the required sample size per variant for a two-arm signup A/B test with the following: baseline conversion p0 = 6%, target relative uplift = +5% (MDE = 0.05 × p0), two-sided α = 0.05, power = 0.80, traffic split 2:1 (control:treatment), 15% of sessions are bots removed post-hoc, sessions cluster by user (mean 1.4 sessions/user, ICC = 0.03), and 8% expected attrition from data quality filters. Provide formulas for proportions tests, apply the design effect for clustering, adjust for attrition and allocation ratio, and convert the result to test duration given 120,000 sessions/day. State any additional assumptions and how violations (variance mis-specification, sequential peeking) would change the plan.

Quick Answer: This question evaluates competency in experimental design and statistical inference for A/B testing, specifically sample size calculation for two-sample proportions with unequal allocation, clustering effects (ICC and design effect), and adjustments for bot removal and data-quality attrition.

Related Interview Questions

  • Should Uber double member discounts? - Uber (medium)
  • Compare Two Coin Proportions - Uber (medium)
  • Analyze the Accident-Rate Spike - Uber (easy)
  • How do you derive CDF from a PDF? - Uber (easy)
  • Derive a CDF from a PDF - Uber (medium)
Uber logo
Uber
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Statistics & Math
12
0

A/B Test Sample Size With Unequal Allocation, Clustering, and Attrition

Context

You are planning a two-arm signup A/B test (binary outcome: convert vs. not) with a 2:1 traffic split (control:treatment). You need the analyzable and gross (pre-filter) sample size per variant and the expected test duration, accounting for clustering by user, bot removal, and data-quality attrition.

Given

  • Baseline conversion (control) p0 = 6% = 0.06
  • Target relative uplift = +5% ⇒ MDE (absolute) Δ = 0.05 × p0 = 0.003 ⇒ treatment p1 = 0.063
  • Two-sided α = 0.05, power = 0.80
  • Allocation: control:treatment = 2:1 ⇒ λ = n_T / n_C = 0.5
  • Sessions cluster by user: mean sessions/user m = 1.4, ICC ρ = 0.03
  • 15% sessions are bots removed post-hoc
  • 8% expected attrition from data-quality filters
  • Traffic capacity: 120,000 sessions/day (total)

Task

  • Provide the formulas for two-sample tests of proportions with unequal allocation.
  • Compute the required analyzable sample size per variant (control, treatment).
  • Apply the design effect for clustering.
  • Inflate to gross (pre-filter) sessions accounting for 15% bots and 8% attrition.
  • Convert the result to an estimated test duration given 120,000 sessions/day under a 2:1 split.
  • State assumptions and how violations (variance mis-specification, sequential peeking) would change the plan.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More Uber•More Data Scientist•Uber Data Scientist•Uber Statistics & Math•Data Scientist Statistics & Math
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.