← CVS Health Interview Insights

CVS Health·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

CVS Health data scientist interview that was basically a stats exam. Four-part A/B testing problem covering hypothesis testing, confidence intervals, sample size planning, and multiple comparisons correction. Felt more like a grad school problem set than a conversation.

Questions Asked (4)

Q1

Given an A/B test with 520 conversions out of 10,000 sessions for control and 630 conversions out of 11,500 sessions for variant, compute the pooled-proportion z-statistic and the two-sided p-value for a two-proportion z-test.

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

The pooled proportion part tripped me up slightly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, compute the pooled proportion and the standard error of the difference. Then calculate the z-statistic and find the two-sided p-value using the standard normal distribution. Clearly state the formulas and assumptions.

Pro tip: Always check the assumptions of the two-proportion z-test, such as independent samples and sufficient sample size (at least 10 successes and failures per group). Also, mention that the p-value alone doesn't indicate practical significance; consider the effect size and confidence interval.

1. Calculate conversion rates

Compute the conversion rate for control (520/10000 = 0.052) and variant (630/11500 ≈ 0.05478). Note the difference in rates.

2. Compute pooled proportion

Pool the successes and trials: (520+630)/(10000+11500) = 1150/21500 ≈ 0.05349. This is the pooled proportion under the null hypothesis.

3. Calculate standard error

Compute the standard error of the difference: sqrt( pooled_prop * (1 - pooled_prop) * (1/n1 + 1/n2) ). With n1=10000, n2=11500, SE ≈ sqrt(0.05349*0.94651*(1/10000+1/11500)) ≈ 0.00302.

4. Compute z-statistic

Calculate the z-statistic: (p1 - p2) / SE = (0.052 - 0.05478) / 0.00302 ≈ -0.92. The negative sign indicates control has lower rate, but for two-sided test we use absolute value.

5. Find p-value

For a two-sided test, p-value = 2 * P(Z < -|z|) = 2 * Φ(-0.92) ≈ 2 * 0.1788 = 0.3576. Since p > 0.05, we fail to reject the null hypothesis.

Key Points to Mention

  • State the null and alternative hypotheses: H0: p1 = p2, H1: p1 ≠ p2.
  • Use the pooled proportion because the null hypothesis assumes equal proportions.
  • Verify assumptions: independent observations, random sampling, and sufficient sample size (at least 10 successes and failures in each group).
  • Interpret the p-value in context: there is not enough evidence to conclude a significant difference in conversion rates.
  • Mention that the z-test is appropriate for large samples; for small samples, consider Fisher's exact test.
  • Discuss practical significance: even if significant, assess the magnitude of the difference (e.g., relative lift).

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

Q2

Using the same A/B test data, compute a 95% confidence interval for the difference in conversion rates (pB minus pA) using the unpooled standard error.

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

Switched from pooled to unpooled and had a brief moment of confusion about why you'd use unpooled for the CI but pooled for the test.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, recall the formula for the confidence interval for the difference in proportions using unpooled standard error: (pB - pA) ± z* * sqrt( pA(1-pA)/nA + pB(1-pB)/nB ). Then, plug in the given conversion rates and sample sizes, compute the standard error, and find the critical z-value for 95% confidence (1.96). Finally, calculate the lower and upper bounds and interpret the interval in the context of the business question.

Pro tip: Always state the assumptions (e.g., independent samples, large enough sample sizes for normal approximation) and clarify that the unpooled SE is appropriate for confidence intervals (unlike hypothesis tests where pooled SE is used). This shows you understand the nuance and avoids common mistakes.

1. Identify given values

Extract the conversion rates (pA, pB) and sample sizes (nA, nB) from the problem statement or data. Ensure you know which group is A and which is B.

2. Compute standard error

Calculate the unpooled standard error using the formula: SE = sqrt( pA(1-pA)/nA + pB(1-pB)/nB ).

3. Determine critical value

For a 95% confidence interval, use the z-score corresponding to 97.5% percentile (1.96 for large samples). If sample sizes are small, consider using t-distribution, but typically z is used for proportions.

4. Construct the interval

Compute the margin of error: ME = z * SE. Then the confidence interval is (pB - pA) ± ME. Report the lower and upper bounds.

5. Interpret the interval

Explain what the interval means in context: e.g., 'We are 95% confident that the true difference in conversion rates (B - A) lies between X and Y.' Also note if the interval includes zero, indicating no significant difference at 5% level.

Key Points to Mention

  • Formula for unpooled standard error for difference in proportions
  • Use of z-score 1.96 for 95% confidence
  • Assumptions: independent samples, random assignment, large sample sizes
  • Interpretation of confidence interval in business terms
  • Difference between pooled and unpooled standard error and when to use each
  • Potential need for continuity correction if sample sizes are small

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

Q3

Using the baseline conversion rate from the control group, what per-arm sample size is needed to detect an absolute lift of 0.7 percentage points at 80% power and two-sided alpha of 0.05? State the formula and round up.

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

Sample size planning is one of those things I've done a hundred times but always have to think through carefully under pressure.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify that the baseline conversion rate (p1) is needed; if not provided, state a reasonable assumption. Then, use the standard formula for sample size per arm for two proportions: n = (Z_{α/2} + Z_β)^2 * (p1(1-p1) + p2(1-p2)) / (p2 - p1)^2, where p2 = p1 + 0.007. Plug in Z_{0.025}=1.96 and Z_{0.20}=0.84, compute n, and round up to the next integer.

Pro tip: Always mention that this is an approximation assuming normal approximation and equal allocation; for small baseline rates or lifts, consider exact methods or simulations. Also, note that real-world sample sizes may need inflation for non-compliance or multiple comparisons.

1. Identify parameters

Confirm the baseline conversion rate (p1) and the absolute lift (0.007). If p1 is not given, state an assumption (e.g., 5% or 10%) and proceed.

2. State the formula

Write the sample size formula for two proportions: n = (Z_{α/2} + Z_β)^2 * [p1(1-p1) + p2(1-p2)] / (p2 - p1)^2.

3. Plug in values

Substitute Z_{α/2}=1.96, Z_β=0.84, p2 = p1 + 0.007, and compute the numerator and denominator.

4. Calculate and round up

Compute n and round up to the nearest whole number to ensure at least the required sample size per arm.

5. Interpret and caveat

State the final sample size per arm and mention assumptions (e.g., normal approximation, equal allocation) and potential need for adjustments.

Key Points to Mention

  • Baseline conversion rate (p1) is required; if unknown, state an assumption.
  • Use two-sided alpha 0.05, so Z_{α/2} = 1.96.
  • Power 80% corresponds to Z_β = 0.84.
  • Formula: n = (Z_{α/2} + Z_β)^2 * (p1(1-p1) + p2(1-p2)) / (p2 - p1)^2.
  • Absolute lift of 0.7 percentage points means p2 - p1 = 0.007.
  • Round up to the next integer to ensure sufficient sample size.

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

Q4

If you were simultaneously tracking 12 independent metrics in this experiment, what per-metric significance threshold would you apply to control the family-wise error rate at 0.05 using Bonferroni correction?

A/B Testing & Experimentation
Author's notes

Easiest part of the whole problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by stating the Bonferroni formula: adjusted alpha = target FWER / number of tests. Then compute 0.05 / 12 = 0.00417 (or approximately 0.0042). Finally, discuss the trade-off between controlling false positives and reducing power, and mention alternatives if appropriate.

Pro tip: Acknowledge that Bonferroni is conservative, especially with correlated metrics, and briefly mention that methods like Holm-Bonferroni or Benjamini-Hochberg might be more powerful while still controlling error rates. This shows depth beyond the basic calculation.

1. Identify the goal and inputs

Clarify that the goal is to control the family-wise error rate (FWER) at 0.05 across 12 independent tests. Note that Bonferroni correction divides the target alpha by the number of tests.

2. Apply the Bonferroni formula

Compute the adjusted per-metric significance threshold: α_adjusted = 0.05 / 12 = 0.004166... (approximately 0.0042).

3. Interpret the result

Explain that each individual metric must have a p-value less than 0.0042 to be considered statistically significant after controlling for multiple comparisons.

4. Discuss trade-offs and alternatives

Mention that Bonferroni is conservative and may reduce power, especially if metrics are correlated. Briefly note alternatives like Holm-Bonferroni or false discovery rate (FDR) control if appropriate.

Key Points to Mention

  • Bonferroni correction formula: α_adjusted = α / m, where m is the number of tests.
  • Calculation: 0.05 / 12 = 0.00417 (rounded to 0.0042).
  • Interpretation: Each metric's p-value must be below 0.0042 to be significant.
  • Trade-off: Reduced Type I error but increased Type II error (lower power).
  • Assumption of independence: Bonferroni does not require independence but is more conservative when tests are correlated.
  • Alternatives: Holm-Bonferroni, Benjamini-Hochberg (FDR), or other multiple testing corrections.

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