PracHub
QuestionsPremiumLearningGuidesCheatsheetNEW
|Home/Analytics & Experimentation/Roblox

Compute minimum sample size for A/B test

Last updated: Mar 29, 2026

Quick Overview

Evaluates the ability to perform sample size and power calculations for a two-sample z-test—including estimating outcome standard deviation from historical continuous data—and is categorized under Analytics & Experimentation for a Data Scientist role at an implementation-level applied statistics abstraction.

  • hard
  • Roblox
  • Analytics & Experimentation
  • Data Scientist

Compute minimum sample size for A/B test

Company: Roblox

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: hard

Interview Round: Take-home Project

You are implementing a function to compute the **minimum total sample size** for an A/B test. You are given: - `observed`: a 1D array of historical/baseline metric values (continuous outcome) to estimate the outcome standard deviation. - `alpha`: significance level for a **two-sided** test (e.g., 0.05). - `power`: desired statistical power (e.g., 0.8). - `delta`: the minimum detectable absolute change in the mean (treatment mean − control mean) you want to be able to detect. Assumptions: - Two-sample **z-test** for difference in means. - Treatment and control groups are **equal-sized**. - Outcome variance is the same in both groups and is estimated from `observed`. - Use the normal approximation (z critical values). Task: 1) Estimate \(\sigma\) using the sample standard deviation of `observed`. 2) Compute the minimum required per-group sample size \(n\). 3) Return the **minimum total sample size** \(N=2n\) as an integer, **rounded up** to the next integer if needed. Clearly state the formula you use and any edge-case handling (e.g., `delta <= 0`, `sigma == 0`).

Quick Answer: Evaluates the ability to perform sample size and power calculations for a two-sample z-test—including estimating outcome standard deviation from historical continuous data—and is categorized under Analytics & Experimentation for a Data Scientist role at an implementation-level applied statistics abstraction.

Related Interview Questions

  • How to estimate feature impact on usage time - Roblox (easy)
  • How to estimate a feature’s causal impact on time spent - Roblox (medium)
  • Compute DID estimate and pretrend flag - Roblox (hard)
  • Compute DiD and validate parallel trends - Roblox (hard)
  • Determine if players prefer local creators without experiments - Roblox (Medium)
Roblox logo
Roblox
Nov 24, 2025, 12:00 AM
Data Scientist
Take-home Project
Analytics & Experimentation
1
0

You are implementing a function to compute the minimum total sample size for an A/B test.

You are given:

  • observed : a 1D array of historical/baseline metric values (continuous outcome) to estimate the outcome standard deviation.
  • alpha : significance level for a two-sided test (e.g., 0.05).
  • power : desired statistical power (e.g., 0.8).
  • delta : the minimum detectable absolute change in the mean (treatment mean − control mean) you want to be able to detect.

Assumptions:

  • Two-sample z-test for difference in means.
  • Treatment and control groups are equal-sized .
  • Outcome variance is the same in both groups and is estimated from observed .
  • Use the normal approximation (z critical values).

Task:

  1. Estimate σ\sigmaσ using the sample standard deviation of observed .
  2. Compute the minimum required per-group sample size nnn .
  3. Return the minimum total sample size N=2nN=2nN=2n as an integer, rounded up to the next integer if needed.

Clearly state the formula you use and any edge-case handling (e.g., delta <= 0, sigma == 0).

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Analytics & Experimentation•More Roblox•More Data Scientist•Roblox Data Scientist•Roblox Analytics & Experimentation•Data Scientist Analytics & Experimentation
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.