← Tubi Interview Insights

Tubi·Data Scientist·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Tubi data scientist interview with a pretty deep A/B testing question that covers sample size derivation, sensitivity analysis across like six different scenarios, and overdispersed count data. Felt more like a stats exam than a conversation.

Questions Asked (3)

Q1

For an A/B test with baseline conversion of 8% and a relative MDE of 8% (so +0.64 percentage points), derive and compute the required per-arm sample size using a normal approximation. Show your z-score terms.

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

The derivation itself isn't bad if you've done it before.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly stating the normal approximation formula for per-arm sample size in a two-proportion z-test, then plug in the baseline conversion rate, absolute MDE, and standard z-scores for the desired significance level and power. Compute the result step-by-step, showing all arithmetic and the final sample size per arm.

Pro tip: Always clarify the assumptions: two-sided test at 5% significance and 80% power, and mention that this is a simplified calculation that ignores practical considerations like novelty effects or multiple testing. Also, note that the formula assumes equal variance under null and alternative, which is a common approximation.

1. State the formula

Write the standard sample size formula for comparing two proportions: n = ( (z_{α/2} + z_β)^2 * (p1(1-p1) + p2(1-p2)) ) / (p2 - p1)^2, where p1 is baseline and p2 is baseline + absolute MDE.

2. Define parameters

Identify p1 = 0.08, relative MDE = 8%, so absolute MDE = 0.08 * 0.08 = 0.0064, and p2 = 0.0864. Set α = 0.05 (two-sided) so z_{α/2} = 1.96, and power = 0.80 so z_β = 0.84.

3. Compute variances

Calculate p1(1-p1) = 0.08 * 0.92 = 0.0736 and p2(1-p2) = 0.0864 * 0.9136 ≈ 0.07894. Sum them to get 0.15254.

4. Plug into formula

Compute (1.96 + 0.84)^2 = 2.8^2 = 7.84. Multiply by sum of variances: 7.84 * 0.15254 ≈ 1.1959. Divide by (0.0064)^2 = 0.00004096 to get n ≈ 29192 per arm.

5. Round and interpret

Round up to the nearest whole number: approximately 29,192 per arm. Mention that this is a large sample, typical for detecting small relative effects.

Key Points to Mention

  • Use of z-scores: 1.96 for 95% confidence (two-sided) and 0.84 for 80% power.
  • Conversion of relative MDE to absolute MDE: 8% of 8% = 0.64 percentage points.
  • Variance calculation under the alternative hypothesis using p1 and p2 separately.
  • The formula assumes independent samples and normal approximation, which is valid for large n.
  • Sample size is per arm; total sample size would be double.
  • Practical considerations: this is a minimum; real-world tests may need more due to non-compliance or multiple metrics.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Holding everything else constant from the baseline setup, how does required sample size change qualitatively and quantitatively when: the MDE is halved, alpha tightens to 0.01, power increases to 90%, allocation shifts to 75/25, there is user-level clustering with ICC=0.02 and average cluster size 5, and you add group-sequential monitoring with two equally spaced looks using O'Brien-Fleming boundaries?

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Six sub-scenarios in one question is a lot.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, establish the baseline sample size formula for a two-sample proportion test and then systematically apply each change, explaining the qualitative direction and quantitative multiplier. For clustering and sequential monitoring, adjust the effective sample size using the design effect and the alpha-spending function, respectively.

Pro tip: Emphasize that these changes compound multiplicatively, so the total sample size increase can be dramatic—quantify the combined effect to show you understand the practical implications for experiment duration and traffic allocation.

1. Baseline sample size formula

Start with the standard formula for two-sample proportion test: n = (Z_{1-α/2} + Z_{1-β})^2 * (p1(1-p1) + p2(1-p2)) / (p1 - p2)^2, assuming equal allocation. This provides the reference point for all adjustments.

2. Apply MDE, alpha, and power changes

Halving MDE quadruples sample size (since n ∝ 1/MDE^2). Tightening alpha to 0.01 increases Z_{1-α/2} from 1.96 to 2.576, and increasing power to 90% increases Z_{1-β} from 0.84 to 1.28. Compute the combined multiplier for these three changes.

3. Adjust for unequal allocation

For 75/25 allocation, the sample size increases by a factor of 1/(4 * 0.75 * 0.25) = 1/0.75 ≈ 1.333 compared to equal allocation, assuming the same total sample size. Alternatively, use the formula with allocation ratio k = 0.25/0.75 = 1/3, which gives a multiplier of (1+k)^2 / (4k) = (4/3)^2 / (4/3) = 4/3 ≈ 1.333.

4. Incorporate clustering design effect

With ICC=0.02 and average cluster size m=5, the design effect (DEFF) = 1 + (m-1)*ICC = 1 + 4*0.02 = 1.08. Multiply the sample size by DEFF to account for user-level clustering.

5. Account for group-sequential monitoring

Using two equally spaced looks with O'Brien-Fleming boundaries, the maximum sample size increases by approximately 5-10% (e.g., 1.05-1.10 multiplier) to maintain power. The exact inflation factor depends on the number of looks and alpha-spending function; for two looks, it's about 1.05.

Key Points to Mention

  • Sample size is inversely proportional to the square of the MDE, so halving MDE quadruples the sample size.
  • Tightening alpha from 0.05 to 0.01 increases the critical Z-value, requiring more samples; increasing power from 80% to 90% also increases required sample size.
  • Unequal allocation (75/25) reduces efficiency, increasing total sample size by about 33% compared to equal allocation.
  • Clustering inflates variance by the design effect (1 + (m-1)*ICC), which must be multiplied into the sample size.
  • Group-sequential monitoring with O'Brien-Fleming boundaries requires a small sample size inflation (e.g., 5%) to account for multiple looks.
  • The combined effect is multiplicative: total multiplier = (MDE factor) * (alpha/power factor) * (allocation factor) * (DEFF) * (sequential factor).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

If the metric you're testing is overdispersed count data following a negative binomial distribution, how would you re-estimate the required sample size?

A/B Testing & ExperimentationData Modeling
Author's notes

Wasn't expecting this pivot at the end.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining that standard sample size formulas assume normally distributed data, so for overdispersed negative binomial counts you need to adjust for the variance-mean relationship. Then walk through the process: estimate the dispersion parameter from historical data, derive the variance under the negative binomial, and plug it into the sample size formula for count data (e.g., using the coefficient of variation or the negative binomial test).

Pro tip: Mention that you would validate the dispersion estimate using a holdout set or pilot data, and consider using simulation-based power analysis to account for uncertainty in the dispersion parameter—this shows practical maturity beyond textbook formulas.

1. Identify the metric and distribution

Confirm the metric is a count and check for overdispersion by comparing variance to mean. If variance >> mean, negative binomial is appropriate.

2. Estimate dispersion parameter

Use historical data or a pilot to estimate the dispersion parameter (often denoted as alpha or k) via maximum likelihood or method of moments.

3. Derive variance under negative binomial

For negative binomial, variance = mean + mean^2 / theta (or mean + alpha*mean^2). Use this to compute the standard error for the test statistic.

4. Adjust sample size formula

Use the negative binomial variance in the sample size formula for comparing two means (e.g., n = 2*(z_alpha/2 + z_beta)^2 * variance / effect_size^2). Alternatively, use simulation-based power analysis.

5. Validate and iterate

Check the calculated sample size via simulation or pilot data, and refine if the dispersion estimate is uncertain. Consider sensitivity analysis for different dispersion values.

Key Points to Mention

  • Overdispersion: variance > mean, so Poisson assumption fails.
  • Negative binomial distribution: variance = mean + mean^2/theta (or mean + alpha*mean^2).
  • Dispersion parameter estimation from historical or pilot data.
  • Sample size formula for count data: use variance from negative binomial instead of assuming constant variance.
  • Simulation-based power analysis to handle uncertainty in dispersion.
  • Impact of overdispersion: ignoring it leads to underpowered tests and inflated false positives.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.