PracHub
QuestionsPremiumLearningGuidesInterview PrepCoaches
|Home/Statistics & Math/Roblox

Compute A/B test sample size and Bayes posterior

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of statistical power and sample size calculation for a two-sided A/B z-test as well as basic Bayesian posterior computation, with emphasis on estimating outcome variance and updating probabilities in the Statistics & Math domain.

  • easy
  • Roblox
  • Statistics & Math
  • Data Scientist

Compute A/B test sample size and Bayes posterior

Company: Roblox

Role: Data Scientist

Category: Statistics & Math

Difficulty: easy

Interview Round: Take-home Project

### Part A: Minimum sample size for a two-sided A/B z-test You are given: - `observed`: an array of numeric outcomes from historical data (use it to estimate the outcome standard deviation) - `alpha`: significance level for a **two-sided** z-test (e.g., 0.05) - `power`: desired power (e.g., 0.8) - `delta`: the minimum detectable absolute difference in means between treatment and control Assume: - Treatment and control groups are **equal size**. - The outcome variance is the same in both groups. - You may approximate using a **normal (z) test** and use `sigma = std(observed)` as the standard deviation estimate. **Task:** compute the **minimum total sample size** `N_total = N_control + N_treatment` required to detect a mean difference of `delta` with significance `alpha` and power `power`. Round **up** to the nearest integer. ### Part B: One-step Bayes’ rule Given probabilities: - `p_A = P(A)` - `p_B_given_A = P(B|A)` - `p_B_given_notA = P(B|¬A)` **Task:** compute and return `P(A|B)`. ## Output Return: 1. `N_total` (integer) 2. `p_A_given_B` (float)

Quick Answer: This question evaluates understanding of statistical power and sample size calculation for a two-sided A/B z-test as well as basic Bayesian posterior computation, with emphasis on estimating outcome variance and updating probabilities in the Statistics & Math domain.

Related Interview Questions

  • Apply Bayes' rule to compute posterior - Roblox (hard)
  • Compute sample size and Bayes posterior - Roblox (hard)
  • Derive variance and CTR confidence intervals - Roblox (medium)
  • Implement robust one/two-sided p-value function - Roblox (hard)
  • Compute GSP vs VCG payments with reserves - Roblox (medium)
Roblox logo
Roblox
Oct 3, 2025, 12:00 AM
Data Scientist
Take-home Project
Statistics & Math
6
0
Loading...

Part A: Minimum sample size for a two-sided A/B z-test

You are given:

  • observed : an array of numeric outcomes from historical data (use it to estimate the outcome standard deviation)
  • alpha : significance level for a two-sided z-test (e.g., 0.05)
  • power : desired power (e.g., 0.8)
  • delta : the minimum detectable absolute difference in means between treatment and control

Assume:

  • Treatment and control groups are equal size .
  • The outcome variance is the same in both groups.
  • You may approximate using a normal (z) test and use sigma = std(observed) as the standard deviation estimate.

Task: compute the minimum total sample size N_total = N_control + N_treatment required to detect a mean difference of delta with significance alpha and power power. Round up to the nearest integer.

Part B: One-step Bayes’ rule

Given probabilities:

  • p_A = P(A)
  • p_B_given_A = P(B|A)
  • p_B_given_notA = P(B|¬A)

Task: compute and return P(A|B).

Output

Return:

  1. N_total (integer)
  2. p_A_given_B (float)

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More Roblox•More Data Scientist•Roblox Data Scientist•Roblox 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.