Data Science

Data Science Interview Knowledge Hub

Data Science interviews test analytical judgment — statistics, probability, experimentation, and product reasoning — far more than algorithm trivia. This hub owns that core: 54 interview questions across statistics, probability, hypothesis testing, A/B testing, product analytics, causal inference, and communication, plus 5 analytical case studies. For SQL, Python, and ML fundamentals it links you to the canonical hub rather than repeating it.

For Data / Product / Applied Scientists · Reviewed September 12, 2026

SQL, Python, and ML have their own canonical hubs

This hub focuses on the analytical Data Science layer and links out for the rest — one topic, one strong explanation.

The roadmap

From statistical foundations to senior product judgment.

  1. 01

    Foundation

    Statistics, probability, and hypothesis testing — the reasoning everything else rests on.

  2. 02

    Analysis

    Exploring unfamiliar data and making evaluation decisions.

  3. 03

    Experimentation

    Designing, sizing, and interpreting A/B tests — the core Data Science differentiator.

  4. 04

    Product science

    Metrics, funnels, retention, and causal reasoning about the business.

  5. 05

    Communication

    Turning analysis into decisions stakeholders trust.

Question library

54 questions. Each answers in ~30 seconds, then the mental model, common mistakes, and follow-ups.

Foundation

Statistics

Summaries, spread, sampling, and the sampling distributions behind every estimate.

When would you report the median instead of the mean?Core

Report the median when the distribution is skewed or has outliers — income, latency, session length. The mean is pulled toward the tail, so it stops describing a typical value; the median (the 50th percentile) is robust to extremes. Use the mean when the distribution is roughly symmetric and you need a quantity that sums (e.g. total revenue = mean × count).

Mental model

The mean is a balance point (sensitive to how far outliers sit); the median is a rank (sensitive only to order). Skew moves them apart.

Example

Ten users spend $10 and one spends $10,000: mean ≈ $919, median = $10. The median is the honest 'typical' spend.

Common mistakes

  • Quoting a mean on heavy-tailed data (latency, revenue) and calling it 'typical'.
  • Forgetting the mean is what you need when a metric must aggregate additively.

Interviewer follow-ups

  • What about the mode?
  • How would you summarize a bimodal distribution?

Senior perspective

For latency and cost, report percentiles (p50/p95/p99), not the mean — the tail is the user experience, and SLOs are set on it.
What's the difference between variance and standard deviation, and why do we use std?Core

Variance is the average squared deviation from the mean; standard deviation is its square root. We usually report the standard deviation because it's in the same units as the data (dollars, ms), so it's interpretable, and it's what shows up in the normal distribution's 68/95/99.7 rule. Variance is the natural quantity to work with algebraically because variances of independent variables add.

Example

Session lengths with std = 30s means most sessions fall within ±30s of the mean; variance (900 s²) has no intuitive unit.

Common mistakes

  • Comparing variances across metrics with different units.
  • Assuming the 68/95/99.7 rule applies to a skewed distribution — it's a normal-distribution property.

Interviewer follow-ups

  • Why divide by n-1 for a sample?
  • How does std relate to standard error?
Covariance vs correlation — when do you use each?Core

Both measure how two variables move together, but covariance is unbounded and unit-dependent, so its magnitude is uninterpretable. Correlation is covariance normalized by the two standard deviations, giving a unitless value in [-1, 1] you can actually compare across pairs. Use correlation to judge strength of a linear relationship; use covariance mainly as an intermediate quantity (e.g. in PCA or portfolio math).

Common mistakes

  • Reading correlation as causation.
  • Trusting Pearson correlation on a non-linear relationship — it only captures linear association (consider Spearman).
  • Ignoring that a correlation near 0 can still hide a strong non-linear relationship.

Interviewer follow-ups

  • Pearson vs Spearman?
  • How does an outlier affect correlation?
Explain the Central Limit Theorem and why it matters for interviews.Core

The CLT says the distribution of the sample mean approaches a normal distribution as the sample size grows, regardless of the population's shape — provided the variance is finite. It's why we can build confidence intervals and run t-tests on means even when the underlying data (clicks, revenue) is nowhere near normal: it's the mean's sampling distribution that's normal, not the data.

Mental model

Averaging cancels idiosyncrasy. Each sample mean is a blend of many draws, and blends of independent things pile up into a bell curve.

Example

Conversion is 0/1 (Bernoulli, very non-normal), but the mean conversion rate over 10,000 users is approximately normal — so a proportion test is valid.

Common mistakes

  • Claiming the CLT makes the raw data normal — it's about the sampling distribution of the statistic.
  • Applying it to tiny samples or infinite-variance distributions.

Interviewer follow-ups

  • How large is 'large enough'?
  • What breaks the CLT?

Senior perspective

For heavy-tailed metrics (revenue per user), the sample mean converges slowly — small experiments can still have non-normal mean distributions, which is a reason to use variance reduction or a bootstrapped/rank-based test.
What does a 95% confidence interval actually mean?Core

It's a range produced by a procedure that, over many repeated samples, captures the true parameter 95% of the time. For your one interval, the parameter is either in it or not — the 95% describes the method's long-run reliability, not the probability the truth is in this particular interval. Practically: a 95% CI is the set of parameter values your data wouldn't reject at the 5% level.

Common mistakes

  • Saying 'there's a 95% probability the true value is in this interval' — that's a Bayesian credible-interval statement, not a frequentist CI.
  • Treating a wide CI that includes 0 as 'no effect' rather than 'not enough data to tell'.

Interviewer follow-ups

  • How does sample size change the width?
  • CI vs credible interval?

Senior perspective

In product reviews, report the CI, not just the point estimate — a 2% lift with a [-1%, 5%] interval is a very different decision than [1.8%, 2.2%].
Standard error vs standard deviation — what's the difference?Senior

Standard deviation measures spread in the data; standard error measures spread in an estimate. The standard error of the mean is std / √n — it shrinks as you collect more data, because your estimate of the mean gets more precise, even though the data's own spread doesn't change. Confidence intervals and test statistics are built from standard errors, not standard deviations.

Example

Data std stays ~$50 whether you sample 100 or 10,000 users; but the standard error of mean spend drops from $5 to $0.5 — a tenfold-tighter estimate.

Common mistakes

  • Using the data's std where the standard error belongs (over-narrow or over-wide intervals).
  • Forgetting SE depends on n — 'the metric is noisy' is often just 'the sample is small'.

Interviewer follow-ups

  • How does this drive sample-size planning?
What do bias and variance mean for an estimator (not a model)?Senior

Bias is how far an estimator's expected value sits from the true parameter; variance is how much it bounces around from sample to sample. A good estimator trades them off. The sample mean is unbiased; dividing sample variance by n (instead of n-1) is biased low. Sometimes a slightly biased estimator with much lower variance is preferable — the mean-squared error (bias² + variance) is what you actually minimize.

Common mistakes

  • Conflating estimator bias/variance with model bias/variance (related idea, different object).
  • Assuming unbiased is always best — regularized/shrinkage estimators are biased on purpose.

Interviewer follow-ups

  • Why n-1 for sample variance (Bessel's correction)?
How would you sample users to estimate a metric, and what biases creep in?Senior

Prefer simple random sampling for an unbiased estimate; use stratified sampling when subgroups matter or vary a lot (sample within each segment, then combine) to cut variance and guarantee coverage. The biases to name: selection bias (who's eligible to be sampled), survivorship bias (only observing what survived), and self-selection (opt-in surveys). The fix is to define the frame first — who could be sampled — and check it matches the population you want to describe.

Common mistakes

  • Sampling from logged-in users and generalizing to all users.
  • Ignoring that 'active users' already excludes churned ones (survivorship).

Interviewer follow-ups

  • Stratified vs cluster sampling?
  • How do you weight a stratified estimate?

Probability

Bayes, distributions, and the probabilistic reasoning interviews love to probe.

Walk through Bayes' theorem with the classic medical-test example.Core

Bayes updates a prior with evidence: P(disease | positive) = P(positive | disease)·P(disease) / P(positive). The trap is the base rate. Even a 99%-accurate test for a disease that affects 1 in 1,000 people produces mostly false positives, because the 999 healthy people generate ~10 false positives for every 1 true positive — so a positive result means roughly a 9% chance of disease, not 99%.

Mental model

Think in counts, not percentages. Imagine 100,000 people, fill in the four cells (true/false × positive/negative), and read the answer off the column.

Example

100,000 people, prevalence 0.1%: 100 sick (99 test positive), 99,900 healthy (~999 false positives). P(sick | positive) = 99 / (99 + 999) ≈ 9%.

Common mistakes

  • Confusing P(positive | disease) with P(disease | positive) — the base-rate fallacy.
  • Ignoring the prior/prevalence entirely.

Interviewer follow-ups

  • How does prevalence change the answer?
  • What's the intuition for a rare-event classifier's precision?

Senior perspective

This is why a fraud/anomaly model with 'great' recall can still be operationally useless: at a low base rate, precision collapses, and analysts drown in false positives.
What are the key rules for expectation and variance you should know cold?Core

Expectation is linear always: E[aX + bY] = aE[X] + bE[Y], even when X and Y are dependent. Variance is not: Var(aX) = a²Var(X), and Var(X + Y) = Var(X) + Var(Y) only when X and Y are independent (otherwise add 2·Cov(X,Y)). Knowing linearity of expectation lets you solve many 'expected number of…' problems without touching the full distribution.

Example

Expected number of heads in 100 flips: by linearity, 100 × 0.5 = 50 — no need to sum a binomial.

Common mistakes

  • Adding variances of dependent variables without the covariance term.
  • Assuming E[XY] = E[X]E[Y] in general — that's only true under independence.

Interviewer follow-ups

  • Derive the variance of a sample mean.
  • Why does averaging reduce variance?
Which probability distribution would you reach for, and when?Senior

Bernoulli/Binomial for a fixed number of yes/no trials (conversion, click). Poisson for counts of rare events in a fixed window (arrivals, errors per minute). Exponential for the time between such events. Normal for sums/averages of many small effects (via the CLT). Log-normal for multiplicative, right-skewed quantities (income, session length). Naming the generative story — how the data is produced — is what picks the distribution.

Common mistakes

  • Defaulting to normal for count or heavy-tailed data.
  • Using Poisson when events aren't independent or the rate isn't constant.

Interviewer follow-ups

  • Poisson vs binomial — when do they coincide?
  • How would you check a distributional assumption?
Are 'independent' and 'uncorrelated' the same thing?Senior

No. Independence means knowing one variable tells you nothing about the other — a strong, all-relationships condition. Uncorrelated only means zero linear association. Independence implies uncorrelated, but not the reverse: variables can be perfectly dependent yet uncorrelated (e.g. Y = X² with X symmetric around 0 has correlation 0). The exception is the joint-normal case, where uncorrelated does imply independent.

Common mistakes

  • Treating a correlation of 0 as proof of no relationship.

Interviewer follow-ups

  • Give an example of dependent-but-uncorrelated variables.
Law of Large Numbers vs Central Limit Theorem — how do they differ?Senior

The Law of Large Numbers says the sample mean converges to the true mean as n grows — it's about where the average lands. The CLT says how the sample mean fluctuates around that true mean — its distribution is approximately normal with standard error std/√n. LLN gives you consistency (you'll get the right answer eventually); CLT gives you the error bars (how wrong you might be right now).

Common mistakes

  • Using them interchangeably; one is about convergence of the value, the other about the shape of the error.

Interviewer follow-ups

  • Why does this justify Monte Carlo estimation?

Hypothesis Testing

p-values, Type I/II errors, power, and statistical vs practical significance.

What is a p-value, precisely?Core

A p-value is the probability of observing data at least as extreme as yours, assuming the null hypothesis is true. Small p means your data would be surprising if there were truly no effect, so you reject the null. It is not the probability the null is true, and not the probability your result happened by chance — both are common misreadings.

Mental model

It measures surprise under 'nothing is happening'. Low surprise-if-null → keep the null; high surprise-if-null → reject it.

Common mistakes

  • 'p = 0.03 means a 3% chance the null is true' — false.
  • Treating p ≥ 0.05 as 'proof of no effect' rather than 'insufficient evidence'.
  • Interpreting the p-value as the effect size — it says nothing about magnitude.

Interviewer follow-ups

  • Why is 0.05 arbitrary?
  • What's the difference between statistical and practical significance?
Explain Type I error, Type II error, and statistical power.Core

A Type I error (false positive, rate α) is rejecting a true null — shipping a change that does nothing. A Type II error (false negative, rate β) is failing to detect a real effect. Power = 1 − β is the probability of detecting an effect that truly exists. You buy power with a bigger sample, a larger true effect, lower variance, or a higher α — the four levers of experiment sizing.

Example

α = 0.05, power = 0.8 is the common default: a 5% false-positive rate and an 80% chance of catching a real effect of the size you planned for.

Common mistakes

  • Running an underpowered test, getting p ≥ 0.05, and concluding 'no effect' — you had little chance of detecting one.
  • Raising α to 'find significance' without acknowledging the extra false positives.

Interviewer follow-ups

  • Which error is worse for a launch decision?
  • How does power relate to sample size?

Senior perspective

Choose α and β from the business cost of each error: for an irreversible, expensive change, lower α; for a cheap, reversible one, you can tolerate more false positives to move faster.
Your experiment has p < 0.05 but the business impact is negligible. What does that mean?Senior

It means the effect is real but too small to matter. With a large enough sample, even a trivial difference becomes statistically significant, because significance measures 'distinguishable from zero,' not 'big enough to act on.' The decision should hinge on the effect size and its confidence interval versus a pre-agreed minimum meaningful effect — not on the p-value crossing 0.05.

Example

A 0.05% lift in click-through on 50M users can be p < 0.001 yet not worth the engineering cost or the added complexity.

Common mistakes

  • Shipping anything that's 'significant' regardless of magnitude.
  • Not defining a minimum detectable/meaningful effect before the test.

Interviewer follow-ups

  • How would you set the threshold for 'meaningful'?
  • How do guardrail metrics factor in?

Senior perspective

Define the practically-significant threshold with the product team before launching, and evaluate the effect against it — this stops statistically-significant-but-useless changes from shipping and adding permanent complexity.
One-tailed vs two-tailed test — which and why?Senior

A two-tailed test asks 'is there any difference?'; a one-tailed test asks 'is it better in this specific direction?'. Two-tailed is the safe default for experiments, because a change can help or hurt and you want to catch harm. A one-tailed test has more power for the same α but only by ignoring the other direction — rarely worth it in product, where a negative surprise is exactly what you must not miss.

Common mistakes

  • Picking one-tailed after seeing the data to gain significance (p-hacking).
  • Using one-tailed and then being blindsided by a regression in the untested direction.

Interviewer follow-ups

  • When is one-tailed genuinely justified?
You test 20 metrics in an experiment. What's the problem, and how do you fix it?Senior

Each test at α = 0.05 has a 5% false-positive rate, so across 20 independent metrics you'd expect about one 'significant' result by pure chance even if nothing changed. Control it by correcting for multiplicity: Bonferroni (divide α by the number of tests — simple, conservative) or Benjamini-Hochberg (control the false discovery rate — more powerful when you have many metrics). Better yet, pre-register one primary metric and treat the rest as secondary/exploratory.

Example

20 tests at α = 0.05 → P(at least one false positive) ≈ 1 − 0.95²⁰ ≈ 64%.

Common mistakes

  • Reporting whichever of many metrics turned up significant ('cherry-picking').
  • Bonferroni-correcting so hard on dozens of metrics that you lose all power — use FDR instead.

Interviewer follow-ups

  • Bonferroni vs FDR trade-off?
  • How does peeking relate to multiple testing?

Senior perspective

The cleanest fix is organizational: a pre-registered primary metric + guardrails, so the ship decision rests on one test and the rest inform, not decide.
When would you use a non-parametric test instead of a t-test?Senior

Reach for a non-parametric test (Mann-Whitney, permutation, bootstrap) when the assumptions behind a t-test are shaky — heavy skew, extreme outliers, tiny samples, or ordinal data — because those break the t-test's reliance on approximate normality of the mean. The trade-off is that non-parametric tests often answer a slightly different question (about ranks/medians, not means) and can be less powerful when the parametric assumptions actually hold.

Common mistakes

  • Defaulting to a t-test on revenue-per-user (extremely heavy-tailed) with a small sample.
  • Assuming non-parametric means assumption-free — it still assumes e.g. independence.

Interviewer follow-ups

  • Why is a permutation test attractive for A/B tests?
  • Bootstrap vs Mann-Whitney?

Analysis

EDA & Data Quality

Approaching unfamiliar data, missingness, outliers, and leakage.

You're handed an unfamiliar dataset in an interview. How do you approach it?Core

Orient before analyzing. Establish the grain (what one row represents) and the size, then check each column's type, range, and missingness. Look at distributions for skew and outliers, and at a few key relationships. Crucially, sanity-check against reality — do the totals match a known number, are timestamps sane, are IDs unique — because most 'insights' from a dirty dataset are artifacts. Only once you trust the data do you chase the actual question.

Mental model

EDA is building trust in the data first, then curiosity. An interviewer is watching whether you validate before you conclude.

Common mistakes

  • Jumping to modeling before understanding the grain and quality.
  • Not stating assumptions about what a row means.

Interviewer follow-ups

  • What would you check first?
  • How do you decide a column is trustworthy?
How do you decide how to handle missing values?Senior

Start with why it's missing, because the mechanism dictates the fix. Missing completely at random can be dropped or simply imputed with low risk. Missing at random (missingness depends on observed variables) can be imputed conditionally. Missing not at random — where the missingness depends on the unseen value itself (high earners hiding income) — biases any naive imputation, and often the fact of missingness is itself signal worth encoding as a flag. Match the method to the mechanism, not to convenience.

Common mistakes

  • Mean-imputing everything regardless of mechanism, shrinking variance and hiding bias.
  • Dropping rows with missing values when missingness is informative (introduces selection bias).

Interviewer follow-ups

  • MCAR vs MAR vs MNAR?
  • When is a 'missingness' indicator feature useful?
You find outliers. Do you remove them?Senior

Not reflexively — decide by cause. An outlier that's a data error (a negative age, a $10^9 order) should be fixed or removed; an outlier that's a real extreme (a whale customer, a viral spike) is often the most important data and must stay. Choose the treatment for the goal: robust statistics or winsorizing for a summary, keep-and-model for prediction, investigate individually for anomaly detection. Never delete inconvenient points to make a result look cleaner.

Common mistakes

  • Auto-dropping anything beyond 3 std as 'noise' when it's real signal.
  • Winsorizing after seeing which cutoff gives the desired result.

Interviewer follow-ups

  • Robust statistics vs removal?
  • How would you tell an error from a real extreme?
What is data leakage, and how would you catch it before it burns you?Senior

Leakage is when information that wouldn't be available at prediction time sneaks into training, producing amazing offline metrics that collapse in production. Classic forms: a feature that's a proxy for the label (a 'was_refunded' flag when predicting fraud), fitting a scaler or imputer on the full dataset before splitting, or using future data in a time-series split. Catch it by asking of every feature 'would I truly know this at prediction time?', splitting before any fitting, and treating a suspiciously perfect model as a leak until proven otherwise.

Example

Predicting churn with 'days_since_last_login = 90' — but that value is only knowable after the user has already churned.

Common mistakes

  • Standardizing/imputing before the train-test split.
  • Random (not temporal) splits on time-series data.

Interviewer follow-ups

  • How does leakage differ from overfitting?
  • How would you split a time-series dataset?
Model performance dropped after a pipeline change. How would you determine whether the data changed?Staff

Bisect the pipeline and compare distributions before vs after the change. For each feature, compare summary stats and distributions across the two versions (a KS test or population-stability index flags shifts), and check missingness and cardinality — a broken join or an encoding change shows up as a spike in nulls or a new category. Separate training-serving skew (features computed differently in prod than in training) from genuine data drift (the world changed). Reproduce on a fixed sample to confirm the change is the cause, not a coincidence.

Common mistakes

  • Retraining blindly instead of finding what shifted.
  • Not distinguishing a data/pipeline bug from real distribution drift.

Interviewer follow-ups

  • Training-serving skew vs drift?
  • Which feature would you check first?

Model-Evaluation Decisions

Choosing models and metrics as a business decision — concept definitions live on /ai-ml.

When would you prefer a simple model over a more accurate complex one?Senior

Prefer the simple model when the marginal accuracy doesn't pay for its costs: when you need interpretability (regulated decisions, stakeholder trust), when data or latency is constrained, when the complex model is fragile to drift, or when the maintenance burden outweighs a small lift. A logistic regression you can explain and monitor often beats a gradient-boosted forest that's 1% better but a black box nobody trusts. The right model is a business decision, not a leaderboard result.

Common mistakes

  • Chasing offline accuracy with no regard for interpretability, latency, or maintenance.
  • Assuming complexity always wins — it often overfits and rots faster.

Interviewer follow-ups

  • When is interpretability non-negotiable?
  • How would you quantify the cost of complexity?
How do you choose between optimizing precision vs recall for a real product?Senior

Let the cost of each error decide. Optimize recall when a miss is expensive and a false alarm is cheap — disease screening, fraud you can afford to review. Optimize precision when acting on a positive is costly or annoying — blocking a legitimate transaction, spamming users with alerts. Then set the threshold, not just the model, to the operating point that balances those costs at your actual base rate. The metric follows the business, not the other way round.

Example

Cancer screening favors recall (don't miss a case); an auto-block fraud action favors precision (don't freeze good customers).

Common mistakes

  • Reporting accuracy on an imbalanced problem where it's meaningless.
  • Optimizing the metric in the abstract instead of tuning the decision threshold to the cost structure.

Interviewer follow-ups

  • ROC-AUC vs PR-AUC for an imbalanced problem?
  • How does the base rate change the threshold?
Your offline metric improved but the product KPI didn't move. What could explain the mismatch?Staff

Offline and online can diverge for several reasons: the offline metric isn't aligned with the KPI (better AUC that doesn't change user behavior), the offline data is stale or biased by the old model's own logging (feedback loops), the improvement lands where it doesn't matter (already-easy cases), or the change shifts the system in ways offline data can't see (users adapt, other components react). The resolution is an online experiment — offline evaluation ranks candidates, but only an A/B test measures product impact.

Common mistakes

  • Trusting offline gains as product wins.
  • Ignoring that the training data is logged under the current policy (selection/feedback bias).

Interviewer follow-ups

  • What is a feedback loop in logged data?
  • Why must the final call be online?

Experimentation

Experimentation & A/B Testing

Design, sample size, guardrails, peeking, interference — the flagship DS skill.

How would you design an A/B test for a new checkout button?Core

Start from the decision, not the test. State one primary metric tied to the goal (checkout conversion), pick guardrails you must not harm (revenue, latency, refunds), and define the minimum effect worth shipping. From that effect, α, and power, compute the sample size and therefore the duration. Randomize at the right unit (user, not request), split traffic, and only read the result at the pre-committed stopping point.

Mental model

An experiment is a pre-registered bet: metric, effect size, and stopping rule decided before you see data — everything else is rationalization after the fact.

Common mistakes

  • No pre-declared primary metric, so you shop for a significant one afterward.
  • Randomizing at the request level when the treatment affects a user's whole session.
  • Deciding duration by 'when it looks significant' instead of by power.

Interviewer follow-ups

  • What unit would you randomize on?
  • What guardrails would you set?
  • How long should it run?
What unit should you randomize on, and why does it matter?Senior

Randomize at the level at which the treatment is experienced and at which you want to generalize — usually the user (or account), not the page-view or request. If a user can see both variants across sessions, the treatment contaminates the control and the comparison is meaningless. Coarser units (user, cluster) reduce contamination but increase variance, because you have fewer independent units; that trade-off drives your sample size.

Example

A/B testing a UI change per request means the same user sees A then B — their behavior blends the two, biasing the effect toward zero.

Common mistakes

  • Session- or request-level randomization for a user-facing change.
  • Forgetting that the analysis unit must match the randomization unit (else variance is understated).

Interviewer follow-ups

  • When would you cluster-randomize?
  • How does the unit affect the variance calculation?
How do you decide the sample size and duration for an experiment?Senior

Four inputs set the sample size: the baseline rate, the minimum detectable effect (the smallest lift worth catching), α (false-positive rate), and power (1 − β). Smaller effects and higher power need quadratically more users — halving the MDE roughly quadruples the sample. Convert the required users into duration using your daily eligible traffic, and always run at least one or two full weekly cycles to cover day-of-week effects.

Mental model

Sample size ∝ variance / MDE². Detecting a tiny effect precisely is expensive; that's why you fix the smallest effect you'd actually act on first.

Common mistakes

  • Powering for an implausibly large effect, so the test is chronically underpowered for what really happens.
  • Running for three days and missing weekly seasonality.
  • Peeking and stopping the moment it crosses 0.05 (inflates false positives — see peeking).

Interviewer follow-ups

  • Why does the sample scale with 1/MDE²?
  • How would you reduce the required sample?

Senior perspective

If the required duration is impractical, the honest options are: raise the MDE (accept you can only detect bigger effects), reduce variance (CUPED, better metric), or accept a higher α — not quietly peek until it's significant.
Why is 'peeking' at an experiment a problem, and how do you handle it?Senior

A fixed-horizon test controls the false-positive rate only if you look once, at the planned end. If you check repeatedly and stop as soon as p < 0.05, you give yourself many chances to cross the line by luck, and the real false-positive rate balloons well past 5%. The fixes are to commit to the sample size and look once, or to use methods designed for continuous monitoring — sequential tests (e.g. mSPRT), group-sequential boundaries (O'Brien-Fleming), or always-valid confidence sequences.

Example

Peeking daily for two weeks can push a nominal 5% false-positive rate above 20-30%.

Common mistakes

  • Treating the dashboard's live p-value as a valid stopping signal.
  • Stopping early on a positive result but letting negatives 'run longer to be sure' — asymmetric peeking.

Interviewer follow-ups

  • What is a sequential test?
  • How do always-valid confidence intervals help?

Senior perspective

At org scale, bake the correct method into the experimentation platform (sequential or fixed-horizon with locked readouts) so peeking isn't a discipline problem for every analyst to solve alone.
An experiment shows a big lift in week one that fades. What's happening?Senior

That pattern is usually a novelty effect: users click the new thing because it's new, not because it's better, and the lift decays as novelty wears off. Its opposite, a primacy effect, is when users initially resist a change and the true benefit only appears later. Handle both by running long enough for behavior to stabilize, and by analyzing new users separately from tenured ones — new users have no 'old' to react to, so their behavior is a cleaner read of the steady state.

Common mistakes

  • Shipping on an inflated first-week number.
  • Killing a change during a primacy dip before users adapt.

Interviewer follow-ups

  • How would you separate novelty from a real effect?
  • Why segment by user tenure?
How do network effects or interference break a standard A/B test?Staff

Standard A/B tests assume one user's treatment doesn't affect another's outcome (SUTVA). In marketplaces, social graphs, or shared-resource systems, that breaks: treating a seller changes buyers in control, ride-pricing changes the pool for everyone, a social feature leaks across friends. The measured effect is then biased — often understated — because control is contaminated by treatment. You mitigate with cluster randomization (assign whole graphs/regions), switchback tests (toggle the whole system on and off over time), or ego-cluster designs.

Example

Testing a discount on half of users in a two-sided marketplace: the treated buyers consume supply the control buyers now can't, so control looks worse and the treatment effect is inflated.

Common mistakes

  • Assuming user-level randomization is always valid.
  • Ignoring that the control group was affected by treatment (interference), then trusting the naive diff.

Interviewer follow-ups

  • When would you use a switchback design?
  • How does cluster randomization trade off variance?

Senior perspective

The judgment call is which design's bias/variance profile fits the mechanism — switchbacks for system-wide effects with fast dynamics, geo/cluster for social or marketplace spillover — and being explicit that you're trading precision for unbiasedness.
What are guardrail metrics and why do you need them?Senior

Guardrail metrics are the things a change must not harm even while it improves the primary metric — latency, crash rate, revenue, unsubscribes, support tickets. They protect against local wins that cause global damage: a change can lift clicks while tanking revenue or page speed. You watch guardrails for regressions, and a significant harm to one can block a launch that 'won' on the primary metric.

Example

A more aggressive recommendation model raises engagement (primary) but increases blocks/reports and latency (guardrails) — net negative.

Common mistakes

  • Optimizing a single metric with no guardrails, then shipping a change that quietly hurts revenue or trust.
  • Setting so many guardrails that every experiment trips one by chance (multiple testing).

Interviewer follow-ups

  • How do you pick guardrails?
  • How do guardrails interact with multiple-testing corrections?
How do you choose the primary metric for an experiment?Senior

Pick one metric that is sensitive (moves when the feature works), aligned with the long-term goal, and hard to game. Prefer a metric close to user value over a vanity proxy. Where the true goal is long-term (retention, LTV) but too slow to measure in a two-week test, choose a validated short-term surrogate that's known to correlate with it — and say explicitly that it's a surrogate. One primary metric keeps the decision unambiguous; everything else is secondary.

Common mistakes

  • Choosing a metric that's easy to move but disconnected from value (e.g. raw clicks).
  • Having several 'primary' metrics, so any positive one justifies shipping.

Interviewer follow-ups

  • What makes a good surrogate metric?
  • Clicks vs downstream conversion — which and why?
How can you make an experiment more sensitive without more users?Staff

Reduce the metric's variance, since required sample scales with variance. The standard technique is CUPED: use each user's pre-experiment value of the metric as a covariate to subtract out the variation that has nothing to do with the treatment, which can cut variance 30-50% and shorten the test proportionally. Other levers: a less noisy metric, stratification/regression adjustment on pre-experiment covariates, winsorizing extreme outliers, or triggered analysis (only include users who could be affected).

Mental model

Users differ a lot from each other before the experiment even starts. Removing that predictable, pre-existing difference leaves a cleaner signal of the treatment.

Common mistakes

  • Using a post-treatment variable as the covariate (biases the estimate).
  • Winsorizing after peeking at which cutoff gives significance.

Interviewer follow-ups

  • Why must the CUPED covariate be pre-experiment?
  • When does triggered analysis help?
How do you compute a confidence interval for a ratio metric like click-through rate per session?Staff

The catch with ratio metrics (clicks ÷ sessions, where a user has many sessions) is that the numerator and denominator are correlated and the unit of analysis (session) is nested within the randomization unit (user), so naive variance is wrong and too small. Use the delta method to get the variance of the ratio, or bootstrap at the user level, so the standard error reflects that users — not sessions — are the independent units.

Common mistakes

  • Computing session-level variance as if sessions were independent, understating the SE and over-declaring significance.
  • Mismatching the analysis unit and the randomization unit.

Interviewer follow-ups

  • Why does nesting inflate the naive significance?
  • Delta method vs bootstrap?
Your experiment's traffic split is 50/50 but you see 52/48. What do you check?Staff

That's a possible sample-ratio mismatch (SRM): the observed split differs from the intended one by more than chance allows (a simple chi-square test flags it). SRM means the randomization or logging is broken — a redirect that drops users, a bot filter applied to one arm, differential opt-outs — and it invalidates the whole result, because the groups are no longer comparable. Don't interpret the metrics until the SRM is explained and fixed.

Common mistakes

  • Ignoring a small-looking imbalance that's statistically impossible by chance on large N.
  • Reporting the lift from an experiment with an unexplained SRM.

Interviewer follow-ups

  • What causes SRM?
  • Why does SRM invalidate the result rather than just add noise?

Senior perspective

SRM is the single most important automated sanity check in a mature experimentation platform — a failing SRM should block the readout, because a biased assignment can manufacture or hide any effect.
An A/B test shows a 2% lift with significance, but the product team believes the change is useless. How do you evaluate it?Staff

Trust the process over either intuition. First validate the test itself — SRM, instrumentation, no peeking, the right unit — because a 'clean 2%' from a broken test is nothing. Then check whether the 2% is on the metric that matters and whether guardrails held. Look for heterogeneity: is the lift concentrated in a segment that makes sense, or diffuse and suspicious? Consider novelty by segmenting new vs tenured users. If it survives all that, a real, guardrail-safe 2% usually ships — the team's disbelief is a hypothesis to test, not a veto.

Common mistakes

  • Overriding a valid experiment with opinion — or blindly shipping a number from an unvalidated test.
  • Not distinguishing 'the result is wrong' from 'the result is real but I don't understand why'.

Interviewer follow-ups

  • What would make you distrust the 2%?
  • How would you investigate heterogeneity?

Senior perspective

The senior move is to reconcile the conflict with evidence — replicate, segment, check the causal mechanism — rather than letting the loudest voice or the p-value alone decide. If it can't be explained, a hold-back or a follow-up confirmation experiment beats a coin-flip.

Product science

Product Data Science

Metric design, funnels, retention, and product-sense reasoning.

How would you design a north-star metric for a product?Senior

A good north-star metric captures the value users get, moves ahead of revenue, and is hard to game. Anchor it to the core action that predicts retention and monetization — 'nights booked' for lodging, 'messages sent' for chat — not a vanity count like signups. Pair it with a small set of input metrics that teams can actually move, and guardrails so nobody games the star at the cost of trust or revenue.

Mental model

The north star is a proxy for delivered value. If gaming the metric doesn't help users, the metric is wrong.

Common mistakes

  • Picking a lagging metric (revenue) as the star — teams can't act on it directly.
  • A single metric with no guardrails, inviting dark-pattern optimization.

Interviewer follow-ups

  • Leading vs lagging metrics?
  • How would you decompose the north star into input metrics?
Daily active users increased 10%, but retention declined. How would you investigate?Senior

Two metrics disagreeing usually means the mix changed. A 10% DAU jump with falling retention points to an influx of low-intent users — a marketing push or a viral loop bringing people who bounce. Separate new from returning users and look at retention by acquisition cohort: if new-cohort retention is low and it's just diluting the average, the product is fine but acquisition quality dropped. If existing users' retention fell too, that's a real product regression to chase.

Common mistakes

  • Reading aggregate DAU as health without segmenting by cohort or channel.
  • Celebrating the DAU lift and missing that you're acquiring users who churn.

Interviewer follow-ups

  • How would you tell acquisition-mix change from a product regression?
  • Which cohorts would you compare?
Checkout conversion fell. Which dimensions would you analyze?Senior

Localize before theorizing. Break the funnel into steps and find which transition dropped — add-to-cart → checkout → payment → confirmation — so you're debugging one stage, not the whole flow. Then slice that stage by dimensions that isolate a cause: platform/browser (a bug), geography (a payment provider), new vs returning, and time (a deploy). A drop concentrated in one slice is a bug or outage; a broad, uniform drop is more likely demand or a pricing/UX change.

Mental model

Funnel debugging is binary search: which step, then which segment. Concentrated = technical; diffuse = behavioral.

Common mistakes

  • Analyzing overall conversion without decomposing by step and segment.
  • Skipping the boring checks — instrumentation change, a deploy, a broken tracking event.

Interviewer follow-ups

  • How would you rule out a tracking/instrumentation change?
  • Concentrated vs uniform drop — what does each imply?
How do you read a retention curve, and what shapes are healthy?Senior

Plot the fraction of a cohort still active over time since signup, one line per cohort. Health is about the shape, not the level: a curve that declines then flattens onto a plateau means you've found a core group for whom the product sticks — that plateau height is your long-term retained fraction. A curve that keeps sliding toward zero has no product-market fit yet. Compare cohorts to see whether recent changes lifted the plateau.

Example

Two products both retain 20% at day 30, but one is still falling and the other has flattened — the flat one is far healthier.

Common mistakes

  • Judging a single number (day-30 retention) instead of the curve's shape.
  • Mixing cohorts of different tenure into one average, hiding a plateau.

Interviewer follow-ups

  • Classic vs rolling vs range retention?
  • What does a 'smile' (upticking) curve indicate?
Leading vs lagging metrics — how do you use both?Core

Lagging metrics (revenue, retention, LTV) tell you the outcome but arrive too late to steer by. Leading metrics (activation, early engagement, a validated surrogate) move first and predict the lagging ones, so teams optimize them day to day. The craft is validating that the leading metric actually causes the lagging one — otherwise you're steering by a dial connected to nothing.

Common mistakes

  • Optimizing a leading metric that doesn't actually predict the lagging outcome.
  • Waiting on lagging metrics for decisions that need a faster signal.

Interviewer follow-ups

  • How would you validate a leading indicator?
A metric improves in every segment but drops overall. How is that possible?Staff

That's Simpson's paradox: the aggregate is a mix, and the mix of segments shifted. Each segment can improve while the overall number falls because a larger share of traffic moved into a lower-performing segment. The resolution is to decide which view answers the question — segment-level is usually the causal truth for 'did the change help?', while the aggregate reflects composition — and to report the mix shift explicitly rather than letting the paradox mislead.

Example

Conversion rises for both mobile and desktop, but a surge of mobile traffic (which converts lower) drags the blended rate down.

Common mistakes

  • Trusting the aggregate without checking for a composition change.
  • Cherry-picking whichever view (aggregate or segmented) supports the desired conclusion.

Interviewer follow-ups

  • Which view should drive the decision?
  • How does this relate to confounding?
How do you decide which segments to analyze without fishing for a story?Staff

Segment along dimensions with a prior reason to differ — platform, tenure, geography, acquisition channel, power vs casual users — chosen before looking, so you're testing hypotheses rather than mining for any split that shows an effect. Treat post-hoc segment discoveries as exploratory hypotheses to confirm, not conclusions, and correct for the many comparisons you're implicitly making. A segment effect you can't explain mechanistically is a lead, not a finding.

Common mistakes

  • Slicing every dimension until something is 'significant' (garden of forking paths).
  • Reporting a surprising subgroup effect as established without replication.

Interviewer follow-ups

  • How does this connect to multiple testing?
  • How would you confirm a discovered segment effect?

Causal Inference

Correlation vs causation, confounding, selection bias, and quasi-experiments.

How do you explain correlation vs causation, and when can you claim causation?Core

Correlation means two things move together; causation means changing one changes the other. You can only claim causation cleanly from a randomized experiment, because randomization balances all other factors — known and unknown — so the only systematic difference between groups is the treatment. Without randomization you're stuck with confounding: some third variable drives both, and the observed association may vanish or reverse once you account for it.

Example

Ice-cream sales correlate with drownings; the confounder is summer. Neither causes the other.

Common mistakes

  • Inferring causation from an observational correlation.
  • 'Controlling for' variables and assuming that's as good as randomizing.

Interviewer follow-ups

  • What is a confounder?
  • What if you can't run an experiment?
What is a confounder, and how does it bias an analysis?Senior

A confounder is a variable that influences both the treatment and the outcome, creating a spurious association between them. It biases any naive comparison because the treated and untreated groups differ on that variable, not just on treatment. You address it by design (randomize, so confounders are balanced) or, in observational data, by adjustment — stratification, regression, matching, or propensity scores — but only for confounders you can measure. Unmeasured confounding is the fundamental limit of observational causal claims.

Common mistakes

  • Adjusting for a variable on the causal path (a mediator) or a collider, which introduces bias rather than removing it.
  • Assuming adjustment handles unmeasured confounders.

Interviewer follow-ups

  • Mediator vs confounder vs collider?
  • Why can controlling for a collider hurt?
You can't randomize. How do you still estimate a causal effect?Staff

Lean on quasi-experimental designs that approximate randomization. Difference-in-differences compares the change over time in a treated group vs a control group, cancelling out fixed differences (assuming parallel trends). A regression-discontinuity design uses an arbitrary threshold (a cutoff score) as a local randomizer. Instrumental variables exploit a source of variation that affects treatment but not the outcome directly. Each rests on an assumption you must argue for and, ideally, test.

Common mistakes

  • Using difference-in-differences without checking the parallel-trends assumption.
  • Presenting a quasi-experimental estimate with the confidence of a randomized one.

Interviewer follow-ups

  • What's the parallel-trends assumption?
  • When is a natural experiment available?
Give an example of selection bias and how you'd guard against it.Senior

Selection bias is when the data you analyze isn't representative because of how it was selected. Analyzing only users who completed onboarding to judge onboarding overstates success — the failures selected themselves out. Survivorship bias (studying only surviving accounts) and self-selection (opt-in surveys) are common forms. Guard against it by defining the population and the eligibility frame up front, and by including the units that dropped out rather than conditioning on the outcome.

Example

Judging a feature by the retention of users who adopted it: adopters were already more engaged, so the 'lift' is partly who they were, not what the feature did.

Common mistakes

  • Conditioning on a post-treatment outcome (adoption, completion) when comparing groups.
  • Generalizing from a self-selected sample.

Interviewer follow-ups

  • Why is conditioning on adoption a problem?
  • How does intent-to-treat analysis help?

Communication

Communication

Explaining uncertainty, null results, and conflicting data to stakeholders.

How would you explain model or experiment uncertainty to a product manager?Senior

Translate the statistics into a decision, not a lecture. Instead of 'p = 0.06, fail to reject,' say 'the data leans positive but we can't rule out that it does nothing — the true lift is somewhere between −1% and +4%.' Give the range and what it means for the choice: whether it's safe to ship, needs more data, or the downside is tolerable. Anchor uncertainty to the action the PM has to take, and be honest about what you don't know without freezing the decision.

Common mistakes

  • Dumping p-values and jargon instead of a decision-relevant range.
  • Either false certainty or paralysis — both erode trust.

Interviewer follow-ups

  • How would you frame a borderline result?
  • When do you recommend collecting more data vs deciding now?
How do you communicate an experiment that came back insignificant?Senior

Distinguish 'no effect' from 'no evidence of an effect,' because they're different and the audience will conflate them. Report the confidence interval: a tight interval around zero is real evidence the change does little; a wide interval means the test was underpowered and you simply can't tell. Then make a recommendation — ship anyway for other reasons, iterate, or invest in a larger test — so a null result still drives a decision instead of being filed as a failure.

Common mistakes

  • Saying 'the change had no effect' when the test was underpowered.
  • Treating a null as a dead end rather than information.

Interviewer follow-ups

  • Tight vs wide interval around zero — what does each imply?
A stakeholder is celebrating a metric you think is misleading. How do you handle it?Staff

Lead with the shared goal, not a contradiction. Acknowledge the metric moved, then show the fuller picture with evidence — the segment or guardrail that tells a different story, or the composition shift behind the number — and propose the measure that better reflects the actual objective. The aim is to protect the decision, not win the argument, so frame it as 'here's a risk this number hides' rather than 'you're wrong.' Bring the data, and offer the better metric to rally around.

Common mistakes

  • Bluntly telling stakeholders they're wrong, triggering defensiveness.
  • Staying silent to avoid conflict and letting a bad decision proceed.

Interviewer follow-ups

  • How would you present the counter-evidence?
  • What if leadership still wants to use the metric?
Two analyses point in opposite directions. How do you present that to leadership?Staff

Don't average them into false confidence or hide one. Reconcile first — usually the conflict comes from different populations, time windows, or definitions, and naming that difference often resolves it. If it genuinely can't be resolved, present both with their assumptions and your assessment of which is more credible and why, plus what evidence would settle it. Leadership makes better calls with an honest 'here's the disagreement and my read' than with a tidy answer that papers over real uncertainty.

Common mistakes

  • Presenting only the analysis that fits the narrative.
  • Reporting a confident single number that hides an unresolved conflict.

Interviewer follow-ups

  • What usually causes two analyses to disagree?
  • What evidence would break the tie?

Case studies

Scenario-based analytical reasoning — reason through the investigation, then compare to a strong approach.

A subscription company reports a 12% drop in renewalsSenior

You're told renewals fell 12% this month. Before proposing fixes, how do you investigate whether it's real, and if so, what's driving it?

What to investigate

  1. Validate the data first — is the drop real, or a reporting/instrumentation change or a broken renewal event?
  2. Pin the time window and check whether it's a step change (a specific date → a release/pricing change) or a gradual slide.
  3. Compare cohorts: is a specific signup cohort renewing worse, or is every cohort down (a systemic vs a mix effect)?
  4. Segment by plan, geography, platform, and payment method — a payment-provider failure looks very different from churn.
  5. Check the acquisition mix — did a recent campaign bring lower-intent users now hitting their first renewal?
  6. Look at product/pricing changes and involuntary churn (expired cards, failed payments) vs voluntary cancellations.
  7. Quantify uncertainty — is 12% outside normal month-to-month variation, and on how many renewals?
  8. Tie it to business context: seasonality, a competitor move, a support incident.

A strong interview approach

A strong candidate validates before theorizing, then localizes: step-change vs slide → cohort vs mix → segment → voluntary vs involuntary. The most common real answers are unglamorous — a payment-processing regression, an expired-card spike, or a low-intent acquisition cohort hitting renewal — not a product-quality collapse. The deliverable is a ranked set of hypotheses with the evidence for each and the single next query that would confirm the top one, not a guess.
A treatment shows a statistically significant improvement. Do you ship it?Staff

An A/B test on your primary metric is significant and positive. Walk through how you decide whether to launch.

What to investigate

  1. Validate the experiment: sample-ratio check, correct randomization unit, instrumentation sane, no peeking.
  2. Is the effect on the metric that matters, and is it practically (not just statistically) significant vs the pre-agreed threshold?
  3. Did any guardrail (revenue, latency, complaints) regress significantly?
  4. Novelty check — segment new vs tenured users; is the lift stable or fading?
  5. Heterogeneity — is the effect concentrated in a sensible segment or diffuse and hard to explain?
  6. Interference — could the treatment have contaminated control (network/marketplace effects)?
  7. Cost side: engineering, maintenance, and added complexity vs the size of the win.

A strong interview approach

Shipping is a decision, not a p-value. The order is: trust the test (validity checks), then judge the magnitude against a pre-agreed meaningful effect, then confirm no guardrail harm, then rule out novelty and interference. A validated, guardrail-safe, practically-significant lift ships; a fragile or trivial one doesn't, even if p < 0.05. When in doubt, a hold-back or a confirmation run beats a coin flip.
Checkout conversion fell overnightSenior

Conversion from cart to completed purchase dropped sharply between yesterday and today. Which dimensions do you analyze, in what order?

What to investigate

  1. Decompose the funnel by step — cart → checkout → payment → confirmation — to find which transition broke.
  2. Rule out instrumentation: did a tracking event or a deploy change how the step is measured?
  3. Slice the broken step by platform/browser and app version — a concentrated drop screams bug/regression.
  4. Slice by geography and payment method — a provider or region outage.
  5. New vs returning users, and traffic source — a demand/mix change vs a technical break.
  6. Overlay the deploy/release timeline on the drop.

A strong interview approach

This is binary search: which step, then which segment. A sharp overnight drop concentrated in one platform/version/region is almost always technical — a deploy, a broken payment integration, or a tracking change — not a behavioral shift. The candidate who checks instrumentation and decomposes before hypothesizing about 'user intent' is the one who'd actually fix it fast.
Engagement improves while revenue decreasesStaff

A change lifts engagement metrics but revenue falls. How do you reason about the trade-off and what do you recommend?

What to investigate

  1. Confirm both moves are real and attributable to the change (ideally from the same experiment).
  2. Trace the mechanism: is engagement up because users hunt more for something they used to find fast (a UX regression dressed as engagement)?
  3. Check whether it's a mix shift — more low-value sessions inflating engagement while high-value actions drop.
  4. Look at the time horizon — is revenue down short-term (learning/novelty) but plausibly up long-term (retention)?
  5. Decide which metric is the true objective and whether engagement here is a means or a vanity signal.

A strong interview approach

Engagement is a means, not the goal — the senior read is to distrust an engagement lift that comes with a revenue drop until the mechanism is understood. Often 'more engagement' is users working harder for the same value (bad), or a composition shift. The recommendation weighs the long-term value (does the change build retention that pays back later?) against the near-term revenue cost — with an explicit statement of which metric is the real objective, rather than declaring victory on engagement.
Offline model quality improves but the product KPI declinesStaff

A new model scores clearly better offline (higher AUC), you launch it, and the product KPI gets worse. What could explain the mismatch?

What to investigate

  1. Is the offline metric aligned with the KPI at all, or better AUC on cases that don't change behavior?
  2. Feedback loop: the offline data was logged under the old model, so it may flatter or mislead the new one.
  3. Where did accuracy improve — on already-easy items, or where it actually matters to the user?
  4. System interactions: did the new model change downstream ranking, caching, or another component?
  5. Did users adapt, or did the change hit a guardrail (latency, diversity) the offline metric ignores?
  6. Is the online result itself valid (experiment design, sample), or is the 'decline' noise?

A strong interview approach

Offline evaluation ranks candidates; only an online experiment measures product impact — and the two diverge when the offline metric is misaligned, the logged data carries the old policy's bias, or the model shifts the wider system. The strong answer treats the online result as the ground truth, then diagnoses the offline-online gap (metric alignment, feedback bias, where the gains landed) rather than trusting the AUC and blaming the market.

Know where you stand

Get a role-calibrated readiness score and a plan that closes your specific gaps.

Check my readiness

The rest of the senior-engineering interview toolkit.