← LinkedIn Interview Insights

LinkedIn·Data Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026

Summary

LinkedIn data scientist interview with a meaty stats/experimentation question about a flawed email A/B test. The whole thing centered on Simpson's paradox and whether you could trust aggregate results when the data was sliced by city and week. Felt more like a case study than a typical interview question.

Questions Asked (4)

Q1

A marketing team ran an email test across two cities over two weeks. Email B outperforms Email A within every city and every week, but when you combine all the data, Email A looks better overall. How do you figure out which email is actually better?

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

This is a Simpson's paradox setup and I knew that pretty quickly, which helped.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize this as Simpson's Paradox and explain that the overall result is misleading due to confounding by city and week. To determine which email is actually better, analyze the data stratified by city and week, and consider using a weighted average or regression model to adjust for these confounders.

Pro tip: Always check for confounding variables before trusting aggregate metrics; in A/B testing, ensure randomization is balanced across strata to avoid Simpson's Paradox.

1. Identify the Paradox

Notice that the overall result contradicts the stratified results, indicating a potential Simpson's Paradox.

2. Check for Confounding

Examine if city and week are confounders by checking if they are associated with both the email version and the outcome.

3. Analyze Stratified Data

Compare Email A and B within each city-week combination to confirm that B outperforms A in all strata.

4. Adjust for Confounders

Use a weighted average (e.g., by sample size) or a regression model to estimate the overall effect while controlling for city and week.

5. Conclude and Recommend

Based on the adjusted analysis, conclude that Email B is better and recommend it, while noting the importance of stratified analysis in future tests.

Key Points to Mention

  • Simpson's Paradox: overall trend reverses when data is aggregated vs. stratified.
  • Confounding variables: city and week may be unevenly distributed across email groups.
  • Stratified analysis: compare within each city and week to see consistent results.
  • Weighted average or regression: adjust for confounders to get a valid overall estimate.
  • Randomization check: ensure email assignment was random within each stratum.
  • Practical implication: always analyze experiment results at the appropriate granularity.

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

Q2

What would you actually report to stakeholders if Email B wins in every individual subgroup but Email A wins in the combined data?

A/B Testing & ExperimentationStakeholder Management
Author's notes

Surprisingly the part I felt best about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, recognize this as Simpson's Paradox and explain that the combined result is likely driven by an imbalanced confounding variable, such as unequal subgroup sizes or traffic allocation. Then, recommend investigating the root cause, validating the data, and deciding whether to report subgroup results or the overall result based on the experiment's design and business context. Finally, communicate transparently with stakeholders, presenting both views and a clear recommendation.

Pro tip: Don't just report the paradox—proactively diagnose it. Check for sample ratio mismatch (SRM) and segment distribution differences between variants, as these often explain the reversal and demonstrate rigorous experimentation practices.

1. Acknowledge Simpson's Paradox

State that this is a classic case of Simpson's Paradox, where a trend appears in subgroups but reverses when groups are combined, often due to a confounding variable.

2. Investigate the Cause

Analyze the experiment data to identify the confounding factor, such as imbalanced subgroup sizes, unequal traffic allocation, or a segment that behaves differently between variants.

3. Validate Data and Experiment Setup

Check for sample ratio mismatch (SRM), ensure randomization was correct, and verify that the subgroup definitions and metrics are consistent across variants.

4. Determine the Appropriate Metric

Decide whether the overall metric or subgroup metrics are more relevant for the business decision, considering the experiment's goals and the nature of the confounding variable.

5. Communicate Transparently

Present both the subgroup and combined results to stakeholders, explain the paradox and its implications, and provide a clear recommendation with caveats.

Key Points to Mention

  • Simpson's Paradox and confounding variables
  • Sample Ratio Mismatch (SRM) and its impact on validity
  • Weighted averages and how subgroup sizes affect the overall result
  • The importance of pre-registering the primary metric and analysis plan
  • Business context: which metric aligns with stakeholder goals
  • Transparent communication and avoiding cherry-picking results

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

Q3

Can you compute a valid confidence interval if you only have access to aggregated data and not the raw observations?

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

Short answer: sometimes, if you have exposure counts and conversion counts per cell.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that the answer depends on what aggregated statistics are available—means, variances, sample sizes, etc. Then explain that if sufficient summary statistics exist (e.g., mean, standard deviation, and n), you can compute a confidence interval using standard formulas, but you must be cautious about assumptions and potential biases. Emphasize that while it's possible, the validity hinges on the completeness and correctness of the aggregates and the underlying distributional assumptions.

Pro tip: Mention that in A/B testing, aggregated data often includes per-variant means and variances, which are sufficient for a two-sample t-test or confidence interval—but always check for Simpson's paradox or aggregation bias. Also, highlight that if only sums or counts are available, you might need to derive variances from other sources or use bootstrapping if raw data can be simulated.

1. Clarify Available Aggregates

Ask what specific aggregated statistics are provided: mean, variance, sample size, sum, etc. This determines the feasibility of computing a confidence interval.

2. Identify the Appropriate Formula

Based on the available statistics, select the correct formula for the confidence interval (e.g., for a mean: x̄ ± t * (s/√n) if s and n are known).

3. Check Assumptions and Validity

Verify that assumptions (e.g., normality, independence) hold, and consider whether the aggregated data might hide important distributional features or biases.

4. Compute and Interpret

Calculate the confidence interval using the chosen formula and interpret it in the context of the problem, noting any limitations due to aggregation.

5. Discuss Alternatives if Insufficient

If key statistics are missing, discuss alternative approaches like using bounds, simulation, or requesting additional data.

Key Points to Mention

  • Sufficient statistics: mean, standard deviation, and sample size are typically needed for a confidence interval around a mean.
  • Central Limit Theorem: for large samples, the sampling distribution of the mean is approximately normal, enabling CI computation even if raw data is not normal.
  • Aggregation bias: aggregated data can mask subgroup differences, leading to incorrect conclusions (e.g., Simpson's paradox).
  • Two-sample scenarios: for A/B tests, you need per-group means, variances, and sample sizes to compute a confidence interval for the difference.
  • Assumption of independence: aggregated data must come from independent observations; otherwise, the CI may be too narrow.
  • Tools and libraries: mention that standard statistical software can compute CIs from summary statistics (e.g., scipy.stats, statsmodels).

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

Q4

If the original test was poorly designed, how would you redesign the experiment to avoid this confounding problem?

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

Talked about randomizing assignment within each city and week cell, balancing sample sizes across strata, and locking down any other variables like send time and targeting rules before launch.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by diagnosing the specific confounding variable in the original test, then propose a redesign that isolates the treatment effect through randomization, stratification, or blocking. Emphasize how the new design controls for the confounder while maintaining statistical power and practical feasibility.

Pro tip: Acknowledge that perfect experiments are rare in industry; instead of just fixing the confound, discuss how you'd quantify its impact and use techniques like CUPED or holdout groups to validate results.

1. Identify the Confounding Variable

Clearly state what the confounder is and how it biased the original test. Explain why it matters for the experiment's validity.

2. Choose a Redesign Strategy

Select an appropriate method such as randomization, stratification, blocking, or matching to control for the confounder. Justify why this method fits the context.

3. Ensure Randomization and Balance

Describe how you would randomize units to treatment and control, and check for covariate balance. Mention techniques like stratified randomization or re-randomization.

4. Plan for Analysis and Power

Outline the statistical analysis plan, including how you'll adjust for the confounder (e.g., regression, ANOVA) and ensure adequate power. Discuss potential trade-offs.

5. Validate and Iterate

Propose running a pilot or using A/A tests to validate the new design. Mention ongoing monitoring and iteration if issues persist.

Key Points to Mention

  • Randomization and its role in eliminating confounding
  • Stratification or blocking to balance known confounders
  • Sample size and power considerations in the redesign
  • Use of control variables or covariates in analysis (e.g., regression adjustment)
  • Trade-offs between internal validity and practical constraints
  • Techniques like CUPED or holdout groups to detect and correct bias

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