← Flatiron Health Interview Insights

Flatiron Health·Data Scientist·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Technical screen at Flatiron Health for a DS role, pretty much entirely stats and experimentation. They went deep on A/B testing fundamentals, which I expected, but the CUPED piece and the mid-experiment analysis together made it a long session.

Questions Asked (3)

Q1

Walk through deriving the per-variant sample size for a two-proportion A/B test from scratch, showing intermediate values like z-scores and the pooled variance term. Baseline conversion is 4.5%, you want 80% power to detect a 10% relative lift at two-sided alpha 0.05.

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

I've done this derivation before but blanked on the pooled variance step mid-explanation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly stating the formula for sample size per variant in a two-proportion z-test, then plug in the given values step by step, computing the z-scores for alpha and power, the baseline and treatment proportions, and the pooled variance. Finally, calculate the required sample size and interpret it in the context of the experiment.

Pro tip: Always clarify whether the sample size is per variant or total, and mention that this calculation assumes a simple random sample and no peeking, which can inflate Type I error if not accounted for.

1. State the formula and assumptions

Present the standard formula for sample size per variant: n = ( (z_{1-α/2} * sqrt(2 * p̄ * (1-p̄)) + z_{1-β} * sqrt(p1*(1-p1) + p2*(1-p2)) )^2 ) / (p2 - p1)^2, where p̄ is the pooled proportion. Mention assumptions like independence and normality.

2. Compute the z-scores

For two-sided alpha=0.05, z_{1-α/2} = 1.96. For 80% power, z_{1-β} = 0.84. Explain that these correspond to the standard normal quantiles.

3. Determine the proportions

Baseline conversion p1 = 0.045. A 10% relative lift means p2 = p1 * 1.10 = 0.0495. Compute the pooled proportion p̄ = (p1 + p2)/2 = 0.04725.

4. Calculate the variance terms

Compute the pooled variance term: 2 * p̄ * (1-p̄) = 2 * 0.04725 * 0.95275 ≈ 0.0900. Compute the unpooled variance term: p1*(1-p1) + p2*(1-p2) = 0.045*0.955 + 0.0495*0.9505 ≈ 0.0900. Note they are similar but use the correct formula.

5. Plug into formula and solve

Substitute values: n = ( (1.96 * sqrt(0.0900) + 0.84 * sqrt(0.0900))^2 ) / (0.0045)^2 = ( (1.96+0.84) * 0.3 )^2 / 0.00002025 = (2.8 * 0.3)^2 / 0.00002025 = (0.84)^2 / 0.00002025 = 0.7056 / 0.00002025 ≈ 34,844 per variant. Round up to 34,845.

Key Points to Mention

  • The difference between one-sided and two-sided tests and why two-sided is used here.
  • The concept of power and how it relates to Type II error (beta).
  • The use of pooled vs unpooled variance in sample size calculation.
  • The interpretation of the result: number of users needed per variant to detect the specified effect with given confidence and power.
  • Assumptions: independent observations, no multiple testing, and that the test is run without peeking.
  • Potential adjustments for unequal allocation or continuity correction.

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

Q2

If CUPED reduces variance by 30%, how does that change your required per-variant sample size, and what's the absolute and relative reduction compared to the unadjusted calculation?

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

This one I actually liked.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by recalling that sample size is proportional to variance, so a 30% variance reduction means the required sample size is multiplied by 0.70. Then compute the absolute and relative reduction in sample size, and explain the practical implications for experiment duration and cost.

Pro tip: Mention that CUPED reduces variance without biasing the treatment effect, so you can achieve the same power with fewer users—but always validate the variance reduction on historical data before relying on it.

1. State the relationship between variance and sample size

Explain that for a fixed power and effect size, required sample size is directly proportional to the variance of the metric. Therefore, reducing variance by 30% reduces the required sample size by 30%.

2. Calculate the adjusted sample size

If the unadjusted sample size is N, the adjusted sample size becomes 0.70 * N. For example, if N = 100,000 per variant, the new size is 70,000 per variant.

3. Compute absolute and relative reduction

The absolute reduction is N - 0.70N = 0.30N (e.g., 30,000 fewer users per variant). The relative reduction is (N - 0.70N)/N = 30%.

4. Discuss practical implications

Highlight that this reduction can shorten experiment duration, lower costs, or allow detection of smaller effects with the same sample size. Also note that the variance reduction must be estimated accurately.

Key Points to Mention

  • Sample size formula: n ∝ σ² / Δ² (for fixed power and significance level)
  • CUPED reduces variance by using pre-experiment covariates to adjust the metric
  • 30% variance reduction leads to 30% reduction in required sample size
  • Absolute reduction: 0.30 * N per variant; relative reduction: 30%
  • Practical benefits: faster experiments, lower cost, or higher power
  • Caveat: variance reduction depends on correlation between covariate and metric; validate on historical data

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

Q3

You have 50,000 users per variant mid-experiment, with observed rates of 4.5% and 5.2%. Run a two-sided z-test for the difference, report the z-statistic, p-value, and a 95% confidence interval for the difference in percentage points. Is it significant at alpha 0.05, and what does it mean practically?

A/B Testing & ExperimentationProduct Analytics & MetricsRoot Cause Analysis
Author's notes

The math is straightforward but I fumbled the practical interpretation at the end.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, compute the pooled proportion and standard error, then calculate the z-statistic and p-value for the two-sided test. Next, construct the 95% confidence interval for the difference in proportions. Finally, interpret the results in terms of statistical significance and practical impact for the product.

Pro tip: Always consider the practical significance alongside statistical significance; with large samples, even tiny differences can be statistically significant but may not be worth implementing. Also, mention that the confidence interval provides a range of plausible effect sizes, which is more informative than the p-value alone.

1. Set up hypotheses and calculate pooled proportion

Define null hypothesis (no difference) and alternative (two-sided difference). Compute the pooled proportion: (x1 + x2) / (n1 + n2), where x1 and x2 are the number of successes in each group.

2. Compute standard error and z-statistic

Calculate the standard error using the pooled proportion: sqrt(p_pool * (1 - p_pool) * (1/n1 + 1/n2)). Then compute z = (p1 - p2) / SE.

3. Find p-value and compare to alpha

For a two-sided test, p-value = 2 * (1 - Φ(|z|)). Compare to alpha = 0.05 to determine statistical significance.

4. Construct 95% confidence interval

Use the unpooled standard error for the CI: SE_unpooled = sqrt(p1*(1-p1)/n1 + p2*(1-p2)/n2). The 95% CI is (p1 - p2) ± 1.96 * SE_unpooled. Convert to percentage points by multiplying by 100.

5. Interpret results practically

Discuss whether the difference is statistically significant and what the effect size means in context. Consider the width of the CI and whether the lower bound is practically meaningful.

Key Points to Mention

  • Pooled vs unpooled standard error: use pooled for hypothesis test, unpooled for confidence interval.
  • Z-statistic calculation and interpretation.
  • P-value and comparison to alpha=0.05.
  • 95% confidence interval for difference in proportions (in percentage points).
  • Statistical significance vs practical significance.
  • Effect size and business impact.

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