PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Analytics & Experimentation/Twitch

Design an A/B test for pre-roll ads

Last updated: Mar 29, 2026

Quick Overview

This question evaluates experimental design and online-experimentation competencies, including randomization under interference, metric selection for business value, sample-size calculation, variance-reduction techniques (e.g., CUPED), sequential monitoring, and traffic-integrity controls in the Analytics & Experimentation domain.

  • hard
  • Twitch
  • Analytics & Experimentation
  • Data Scientist

Design an A/B test for pre-roll ads

Company: Twitch

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: hard

Interview Round: Technical Screen

Design and analyze an A/B test for reducing pre-roll ad frequency on mobile live streams by 20%. Answer all parts precisely. 1) Randomization: Choose the unit (viewer-level, creator-level, geo, or hybrid). Justify to minimize interference when viewers switch streams and creators share audiences. Define exposure and ensure stickiness across days. 2) Metrics: Pick a single primary metric that captures value (e.g., watch_time_per_viewer_day) and list at least three guardrails (e.g., crash_rate, rebuffer_ratio, ad_impressions_viewer, retention_day1). Explain heavy-tail handling (e.g., log-transform, winsorize at 99.5%, or quantile metrics) and how that affects inference. 3) Sample size: Assume baseline mean daily watch time = 36 minutes, standard deviation = 60 minutes per viewer-day, intra-user correlation induces a design effect of 1.3, total eligible daily mobile viewers = 5,000,000. For a two-sided α=0.05, 1−β=0.8, detect a +2% relative lift in the primary metric. Compute the required per-variant sample size in viewer-days after applying the design effect. Show formulas and a numeric answer. 4) Variance reduction: Describe how you would use CUPED with pre-experiment watch time and device to reduce variance, including the exact regression you would fit and how to apply theta. 5) Novelty and ramp: Propose a 2-week ramp with sequential monitoring that controls type I error (e.g., group sequential or alpha-spending). Specify decision boundaries or stopping rules at interim checks and how you’d adjust for peeking. 6) Integrity: Detect and mitigate bot/afk traffic and creator-led raids that could bias results. Include filters and post-stratification or cluster-robust SEs when clustering by creator/day. Explain how you’d check for spillovers and, if detected, switch to a cluster-randomized test by creator with power implications.

Quick Answer: This question evaluates experimental design and online-experimentation competencies, including randomization under interference, metric selection for business value, sample-size calculation, variance-reduction techniques (e.g., CUPED), sequential monitoring, and traffic-integrity controls in the Analytics & Experimentation domain.

Twitch logo
Twitch
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Analytics & Experimentation
1
0

A/B Test: Reduce Mobile Live‑Stream Pre‑Roll Ad Frequency by 20%

Context: You are designing an experiment on mobile live streams to evaluate reducing pre‑roll ad frequency by 20% and its effect on user experience and downstream value. Viewers frequently switch streams, and creators share overlapping audiences. Answer all parts precisely.

  1. Randomization
  • Choose the randomization unit (viewer‑level, creator‑level, geo, or hybrid).
  • Justify your choice to minimize interference when viewers switch streams and when creators share audiences.
  • Define exposure and how you will ensure assignment stickiness across days.
  1. Metrics
  • Pick a single primary metric that captures business value (e.g., watch_time_per_viewer_day).
  • List at least three guardrail metrics (e.g., crash_rate, rebuffer_ratio, ad_impressions_per_viewer, retention_day1) and explain their role.
  • Explain how you will handle heavy tails (e.g., log‑transform, winsorize at 99.5%, or quantile metrics) and how that affects inference.
  1. Sample Size Assumptions:
  • Baseline mean daily watch time = 36 minutes
  • Standard deviation = 60 minutes per viewer‑day
  • Intra‑user correlation induces a design effect of 1.3
  • Total eligible daily mobile viewers = 5,000,000
  • Two‑sided α = 0.05, power 1−β = 0.8
  • Detect a +2% relative lift in the primary metric

Compute the required per‑variant sample size in viewer‑days after applying the design effect. Show formulas and a numeric answer.

  1. Variance Reduction
  • Describe how to use CUPED with pre‑experiment watch time and device to reduce variance.
  • Provide the exact regression you would fit and how you would compute/apply θ (theta).
  1. Novelty and Ramp
  • Propose a 2‑week ramp with sequential monitoring that controls type I error (e.g., group sequential or alpha‑spending).
  • Specify decision boundaries or stopping rules at interim checks and how you would adjust for peeking.
  1. Integrity
  • Describe how you would detect and mitigate bot/AFK traffic and creator‑led raids that could bias results.
  • Include filters and either post‑stratification or cluster‑robust standard errors when clustering by creator/day.
  • Explain how you would check for spillovers and, if detected, how you would switch to a cluster‑randomized test by creator, including power implications.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Analytics & Experimentation•More Twitch•More Data Scientist•Twitch Data Scientist•Twitch Analytics & Experimentation•Data Scientist Analytics & Experimentation
PracHub

Master your tech interviews with 8,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.