Data Science Interview Questions

100 real questions from Google, Meta, Airbnb & Stripe. Model answers. What they’re actually scoring.

6 free answers — click any question to read the model answer + what they’re actually scoring
> filter: 100/100
machine-learning1 free ↓
01
Explain the bias-variance tradeoff.
Tests whether you can connect the abstract tradeoff to practical decisions like regularization strength, model selection, and cross-validation — not just recite the definition.
free
My favorite way to explain it is the moment every data scientist has lived: training AUC 0.95, validation AUC 0.71. That gap IS variance: the model memorized noise that does not generalize. The mirror image is both scores stuck low and close together, say 0.72 and 0.71: that is bias, the model is too simple to capture the signal. Bias is error from wrong assumptions, variance is error from sensitivity to the training sample, and total error trades one against the other. In practice I diagnose before I treat: learning curves tell me which side I am on. High variance calls for regularization, more data, or a simpler model; high bias calls for richer features or more capacity. Naming the diagnostic, not just the definitions, is what separates a senior answer.
Insider read
Really testing: Whether you understand why models fail, not just the textbook definition.
The tell: Weak candidates recite the definition; strong ones connect it to underfitting, overfitting, and concrete levers.
Follow-up: How would you diagnose which one is hurting you in a real project?
Say this"I diagnose it by comparing train and validation error: a big gap means variance, both high means bias."
02
How would you handle an imbalanced dataset?
Full answer + insider read in the complete set.Unlock all 100 · $19
03
What's the difference between L1 and L2 regularization?
L1 zeros features out; L2 just shrinks them. When does that matter?
Full answer + insider read in the complete set.Unlock all 100 · $19
04
Random forest vs gradient boosting - when do you pick each?
Bagging vs boosting tradeoffs, not just "both are tree ensembles."
Full answer + insider read in the complete set.Unlock all 100 · $19
05
How do you detect and deal with multicollinearity?
VIF, and why it breaks interpretation more than prediction.
Full answer + insider read in the complete set.Unlock all 100 · $19
06
How would you evaluate a model when you have no labels?
Proxy metrics and unsupervised evaluation under ambiguity.
Full answer + insider read in the complete set.Unlock all 100 · $19
07
What is regularization and why does it help?
Connect it to overfitting and the bias-variance lever.
Full answer + insider read in the complete set.Unlock all 100 · $19
08
How does a decision tree choose where to split?
Entropy and Gini - do you actually understand them or just call sklearn?
Full answer + insider read in the complete set.Unlock all 100 · $19
09
What is cross-validation, and how does it leak?
Fitting scalers before the split contaminates the fold - classic trap.
Full answer + insider read in the complete set.Unlock all 100 · $19
10
Precision vs recall - how do you choose between them?
Anchor the choice on real-world cost of each error type.
Full answer + insider read in the complete set.Unlock all 100 · $19
11
What is the ROC curve, and when is PR-AUC better?
ROC-AUC flatters a model under heavy class imbalance.
Full answer + insider read in the complete set.Unlock all 100 · $19
12
How does gradient boosting actually work?
Fitting residuals sequentially and the role of the learning rate.
Full answer + insider read in the complete set.Unlock all 100 · $19
13
Explain the curse of dimensionality.
Distance metrics breaking down and sample sparsity.
Full answer + insider read in the complete set.Unlock all 100 · $19
14
How would you handle missing data?
Reason about the missingness mechanism (MCAR/MAR/MNAR) before imputing.
Full answer + insider read in the complete set.Unlock all 100 · $19
15
What is the difference between bagging and boosting?
Variance vs bias reduction; parallel vs sequential training.
Full answer + insider read in the complete set.Unlock all 100 · $19
16
How do you prevent overfitting in a neural network?
Beyond "dropout" - data, early stopping, and capacity.
Full answer + insider read in the complete set.Unlock all 100 · $19
17
Explain gradient descent and its main variants.
Learning rate, SGD vs batch, and convergence behavior.
Full answer + insider read in the complete set.Unlock all 100 · $19
18
How would you build a recommendation system?
Collaborative vs content-based, cold-start, and the metric you'd optimize.
Full answer + insider read in the complete set.Unlock all 100 · $19
19
What is feature importance, and how can it mislead?
Correlation, leakage, and SHAP vs impurity-based importance.
Full answer + insider read in the complete set.Unlock all 100 · $19
20
When would you choose a simpler model over a complex one?
Interpretability, latency, maintenance, and the actual business need.
Full answer + insider read in the complete set.Unlock all 100 · $19
That's one section. Five more are locked.
// stats · sql · python · a/b testing · behavioral
Unlock all 100 · $19
statistics-probability1 free ↓
21
Explain a p-value to a non-technical stakeholder.
Tests communication skill and conceptual precision — most candidates accidentally say “the probability the null is true,” which is wrong and signals shallow understanding.
free
I usually explain it like this: imagine a world where the thing you're testing has zero effect. If you ran the same experiment in that world, how often would you see results as surprising as what you actually got? A p-value of 0.03 means: if there was truly nothing going on, you'd only see data this extreme by chance 3% of the time. It's not "97% chance this works" - it's a measure of how strange your results would be if the effect wasn't real. The lower it is, the more suspicious you should be that something genuine is happening.
Insider read
Really testing: Whether you can explain it without the classic mistake: "the probability the null hypothesis is true."
The tell: Strong candidates use a concrete analogy. Weak ones recite the definition robotically - or quietly commit the error.
Follow-up: What's the difference between statistical significance and practical significance?
Say this"A low p-value means the data would be very surprising if nothing was happening - it doesn't tell you the effect is big enough to matter."
22
What is the Central Limit Theorem and why does it matter?
What it actually claims about sampling distributions.
Full answer + insider read in the complete set.Unlock all 100 · $19
23
Type I vs Type II error - which is worse?
Tied to the real-world cost of the decision.
Full answer + insider read in the complete set.Unlock all 100 · $19
24
What is a confidence interval, really?
It describes the procedure, not "95% chance the value is in here."
Full answer + insider read in the complete set.Unlock all 100 · $19
25
Explain the difference between correlation and causation.
Full answer + insider read in the complete set.Unlock all 100 · $19
26
What is statistical power, and what drives it?
Full answer + insider read in the complete set.Unlock all 100 · $19
27
When would you use a t-test vs a chi-square test?
Full answer + insider read in the complete set.Unlock all 100 · $19
28
Explain Bayes' theorem with a real example.
Full answer + insider read in the complete set.Unlock all 100 · $19
29
Frequentist vs Bayesian inference - what's the difference?
Full answer + insider read in the complete set.Unlock all 100 · $19
30
How do you handle multiple hypothesis testing?
Full answer + insider read in the complete set.Unlock all 100 · $19
31
What is selection bias, and how do you spot it?
Full answer + insider read in the complete set.Unlock all 100 · $19
32
Explain maximum likelihood estimation.
Full answer + insider read in the complete set.Unlock all 100 · $19
33
What does it mean for an estimator to be unbiased?
Full answer + insider read in the complete set.Unlock all 100 · $19
34
How would you test whether a coin is fair?
Full answer + insider read in the complete set.Unlock all 100 · $19
35
Law of large numbers vs the Central Limit Theorem?
Full answer + insider read in the complete set.Unlock all 100 · $19
36
Explain p-hacking and how to avoid it.
Full answer + insider read in the complete set.Unlock all 100 · $19
37
What distribution would you use to model wait times or counts?
Full answer + insider read in the complete set.Unlock all 100 · $19
38
How do you detect and treat outliers?
Full answer + insider read in the complete set.Unlock all 100 · $19
sql1 free ↓
39
Write a query to return the second-highest salary.
Tests SQL fluency: subqueries, window functions (RANK/DENSE_RANK), and whether you know how to handle ties correctly.
free
The cleanest approach uses a window function:

SELECT DISTINCT salary FROM (SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk FROM employees) t WHERE rnk = 2

I prefer DENSE_RANK over a simple offset because it handles ties correctly - if two people share the highest salary, this still returns the second distinct value. The classic subquery alternative - SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees) - works in simple cases but breaks with ties and doesn't scale to the Nth highest without rewriting it entirely.
Insider read
Really testing: Whether you reach for a window function instinctively or write a clunky nested subquery.
The tell: Mentioning DENSE_RANK vs RANK vs ROW_NUMBER and why it matters for ties is what separates prepared candidates from the rest.
Follow-up: How would you change this to return the Nth highest for any N?
Say this"I'd use DENSE_RANK so ties are handled correctly - with a naive subquery, two people sharing the max salary would break the result."
40
Explain the difference between WHERE and HAVING.
Full answer + insider read in the complete set.Unlock all 100 · $19
41
What's the difference between INNER, LEFT, and FULL JOIN?
Full answer + insider read in the complete set.Unlock all 100 · $19
42
Write a query to find duplicate rows.
Full answer + insider read in the complete set.Unlock all 100 · $19
43
How do window functions differ from GROUP BY?
Full answer + insider read in the complete set.Unlock all 100 · $19
44
Find the running total of sales by month.
Full answer + insider read in the complete set.Unlock all 100 · $19
45
How would you optimize a slow query?
Full answer + insider read in the complete set.Unlock all 100 · $19
46
Write a query for month-over-month growth.
Full answer + insider read in the complete set.Unlock all 100 · $19
47
What is a CTE, and when is it better than a subquery?
Full answer + insider read in the complete set.Unlock all 100 · $19
48
How do you handle NULLs in joins and aggregates?
Full answer + insider read in the complete set.Unlock all 100 · $19
49
Find the top N records per group.
Full answer + insider read in the complete set.Unlock all 100 · $19
50
Difference between RANK, DENSE_RANK, and ROW_NUMBER?
Full answer + insider read in the complete set.Unlock all 100 · $19
51
Write a query to pivot rows into columns.
Full answer + insider read in the complete set.Unlock all 100 · $19
52
How would you find users active three days in a row?
Full answer + insider read in the complete set.Unlock all 100 · $19
53
What's the difference between UNION and UNION ALL?
Full answer + insider read in the complete set.Unlock all 100 · $19
python-coding1 free ↓
54
How is a list different from a tuple, and when use each?
Tests Python fundamentals and whether you understand mutability semantics — when immutability is a feature you’d intentionally reach for, not a constraint.
free
The core difference is mutability: a list can be changed after creation - add, remove, reorder - while a tuple is fixed. I reach for a list when I'm building something up over time, like collecting predictions as they stream in. I use a tuple for things that should stay constant: coordinates, RGB values, a row from a database result. The practical payoff of tuples beyond just convention is that they're hashable - you can use them as dictionary keys or set members, which you can't do with a list. They're also slightly faster and signal intent: when I see a tuple in someone else's code, I know they meant it to be read-only.
Insider read
Really testing: Whether you know about hashability and intentional immutability, not just "tuples can't be changed."
The tell: Mentioning dictionary keys or sets as a use case is the signal most candidates miss. It shows you've actually used the difference, not just read about it.
Follow-up: What's a named tuple and when would you prefer it over a dataclass?
Say this"Tuples are hashable, so they can be dictionary keys - like using (user_id, date) as a compound lookup key. That comes up more than people expect."
55
What does a generator do, and why use one?
Full answer + insider read in the complete set.Unlock all 100 · $19
56
Explain vectorization in NumPy and pandas.
Full answer + insider read in the complete set.Unlock all 100 · $19
57
How would you speed up a slow pandas operation?
Full answer + insider read in the complete set.Unlock all 100 · $19
58
What's the difference between .loc and .iloc?
Full answer + insider read in the complete set.Unlock all 100 · $19
59
How do you merge two dataframes without exploding rows?
Full answer + insider read in the complete set.Unlock all 100 · $19
60
Deduplicate a list while preserving order.
Full answer + insider read in the complete set.Unlock all 100 · $19
61
What is a Python decorator, with a real use case?
Full answer + insider read in the complete set.Unlock all 100 · $19
62
How do you handle a dataset too big for memory?
Full answer + insider read in the complete set.Unlock all 100 · $19
63
Explain the time and space complexity of your approach.
Full answer + insider read in the complete set.Unlock all 100 · $19
64
How would you write reproducible data science code?
Full answer + insider read in the complete set.Unlock all 100 · $19
65
What's the difference between copy and deepcopy?
Full answer + insider read in the complete set.Unlock all 100 · $19
ab-testing-experimentation1 free ↓
66
Walk me through designing an A/B test from scratch.
Tests end-to-end experimental design: hypothesis formation, power analysis, randomization unit, guardrail metrics, and when to stop an experiment early.
free
I start with the hypothesis before touching any data: what change am I making, what metric should move, and in which direction? Then I define the minimum detectable effect - the smallest improvement that would actually matter to the business - because that drives sample size. I run a power analysis with 80% power and α = 0.05, check how long it'll take to collect that traffic, and set a fixed end date. Once it's running I do not peek at results early - peeking inflates false positives even when the underlying data is clean. At the end I check baseline balance between groups, analyze the primary metric, then check guardrail metrics to confirm nothing else broke. I present the result in terms of the business decision, not just whether p < 0.05.
Insider read
Really testing: Whether you treat this as a statistics problem or a business decision problem.
The tell: Candidates who open with "set up control and treatment groups" miss the point. It starts with the hypothesis and the minimum effect size that would actually change a decision.
Follow-up: What would you do if you couldn't randomly assign users?
Say this"I always pre-register the primary metric before the test starts. If you choose it after you see the data, the p-value means nothing."
67
How do you choose the sample size for an experiment?
Full answer + insider read in the complete set.Unlock all 100 · $19
68
What is a primary metric vs a guardrail metric?
Full answer + insider read in the complete set.Unlock all 100 · $19
69
Your A/B test is not significant. What do you do?
Full answer + insider read in the complete set.Unlock all 100 · $19
70
What is the novelty effect, and how do you handle it?
Full answer + insider read in the complete set.Unlock all 100 · $19
71
How do you handle peeking and early stopping?
Full answer + insider read in the complete set.Unlock all 100 · $19
72
Why do network effects break a standard A/B test?
Full answer + insider read in the complete set.Unlock all 100 · $19
73
Explain Simpson's paradox in an experiment.
Full answer + insider read in the complete set.Unlock all 100 · $19
74
How would you measure long-term impact of a change?
Full answer + insider read in the complete set.Unlock all 100 · $19
75
What is the minimum detectable effect, and why set one?
Full answer + insider read in the complete set.Unlock all 100 · $19
76
Treatment and control differ at baseline. Now what?
Full answer + insider read in the complete set.Unlock all 100 · $19
77
How do you analyze an experiment with a skewed metric?
Full answer + insider read in the complete set.Unlock all 100 · $19
78
When would you NOT run an A/B test?
Full answer + insider read in the complete set.Unlock all 100 · $19
79
What is a difference-in-differences analysis?
Full answer + insider read in the complete set.Unlock all 100 · $19
80
How do you communicate an experiment result to executives?
Full answer + insider read in the complete set.Unlock all 100 · $19
product-sense-behavioral1 free ↓
81
How would you measure the success of a product feature?
Tests product sense: distinguishing leading from lagging indicators, choosing the right granularity, and how to separate causation from correlation in messy real-world data.
free
I start by asking what the feature was supposed to do for the user and for the business - those don't always overlap, and the right metric lives at their intersection. Then I define one primary metric that directly reflects that value, plus one or two guardrail metrics to make sure I'm not trading something important away. If the feature is a recommendation module meant to increase engagement, my primary metric might be click-through rate on recommendations, and my guardrail is that overall satisfaction or session length doesn't drop. I also separate short-term engagement signals from longer-term retention signals - a feature can look great in week one and quietly hurt retention at month three. And I always ask whether the metric I'm watching is something I can actually attribute to this feature, or if other things are moving it.
Insider read
Really testing: Whether you start from the business goal or just rattle off metrics you know.
The tell: Strong candidates ask "what was this supposed to accomplish?" first. Weak ones immediately list DAU, CTR, time-on-page without grounding them in anything.
Follow-up: How would you know if the metric you're tracking is actually a good proxy for what you care about?
Say this"I always pair the primary metric with a guardrail - otherwise you can optimize a feature locally while quietly hurting the product overall."
82
A key metric dropped 20% overnight. How do you investigate?
Full answer + insider read in the complete set.Unlock all 100 · $19
83
How would you design the ML system behind a feature?
Full answer + insider read in the complete set.Unlock all 100 · $19
84
How do you detect and handle model drift in production?
Full answer + insider read in the complete set.Unlock all 100 · $19
85
How would you set up monitoring for a deployed model?
Full answer + insider read in the complete set.Unlock all 100 · $19
86
Tell me about a time your model failed in production.
Full answer + insider read in the complete set.Unlock all 100 · $19
87
Tell me about a project you're proud of.
Full answer + insider read in the complete set.Unlock all 100 · $19
88
Describe a time you disagreed with a stakeholder.
Full answer + insider read in the complete set.Unlock all 100 · $19
89
How do you prioritize when everything is urgent?
Full answer + insider read in the complete set.Unlock all 100 · $19
90
Tell me about a mistake you made with data.
Full answer + insider read in the complete set.Unlock all 100 · $19
91
Explain a complex model to a non-technical executive.
Full answer + insider read in the complete set.Unlock all 100 · $19
92
How do you decide if a problem needs ML at all?
Full answer + insider read in the complete set.Unlock all 100 · $19
93
How would you estimate the size of a market or quantity?
Full answer + insider read in the complete set.Unlock all 100 · $19
94
A stakeholder wants a model you think won't work. What now?
Full answer + insider read in the complete set.Unlock all 100 · $19
95
How do you ensure your analysis is trustworthy?
Full answer + insider read in the complete set.Unlock all 100 · $19
96
Tell me about a time you had to learn something fast.
Full answer + insider read in the complete set.Unlock all 100 · $19
97
How would you detect fraud or anomalies in transactions?
Full answer + insider read in the complete set.Unlock all 100 · $19
98
What would you do in your first 90 days in this role?
Full answer + insider read in the complete set.Unlock all 100 · $19
99
How do you handle ambiguous, poorly defined problems?
Full answer + insider read in the complete set.Unlock all 100 · $19
100
Why data science, and why this company?
Full answer + insider read in the complete set.Unlock all 100 · $19
// complete set

All 100 questions. Every model answer. Every insider read.

Walk in knowing what a senior answer sounds like - and what they're actually scoring.

$19
// interview bootcamp: $5,000+ · 1:1 coach: $200/hour · this playbook: $19
Unlock all 100 for $19
14-day money-back guarantee. No questions asked.
// what happens when you pay
1Secure checkout opens. Card, Apple Pay, Google Pay or PayPal, processed by Stripe.
2All 100 unlock instantly. Your private link opens the moment payment clears.
3It's yours for good. The receipt email contains your permanent link. Lose it? Email us, we resend.
VISAMastercardAmexApple PayGoogle PayPayPal
// secure checkout by Lemon Squeezy. We never see your card details.
Common questions
Why not just ask ChatGPT?+
ChatGPT gives you a plausible answer. It does not tell you whether that answer makes an interviewer want to hire you. The whole product is the insider read: what they're really testing, how a junior answer sounds versus a senior one, and the follow-up they'll throw next.
Are these real interview questions?+
Yes. These are the questions that actually come up in data science interviews at tech companies, banks, and consultancies, grouped the way a real loop runs: stats, ML, SQL, Python, A/B testing, and behavioral.
What's different from free question lists?+
Free lists give you questions. This gives you the model answer plus what the interviewer is actually scoring. That is the difference between recalling an answer and handling the follow-up.
What if it doesn't help?+
14-day, no-questions-asked refund. Email support@howto-playbooks.com with your order number and we refund in full.
What format is it?+
A single web page, bookmarkable, works on any device. All 100 questions expandable with answers and insider reads. Lifetime access.
How do I get access after paying?+
Instantly. The moment payment clears, your private link opens with all 100 questions and answers. Your receipt email contains the same permanent link, so you can come back anytime, on any device. If you ever lose it, email support@howto-playbooks.com and we resend it.
Is the payment secure?+
Yes. Checkout is handled by Lemon Squeezy, our merchant of record, with payments processed by Stripe, the same infrastructure used by Amazon and Shopify. Card, Apple Pay, Google Pay and PayPal are supported. Your card details never touch our servers.
// more playbooks: 100 questions each
$19 one-time
// 100 questions · insider reads · 14-day refund
Unlock all 100