Data science interviews are wider than most candidates expect. You are tested on statistics, machine learning, SQL, and business judgment, often in the same loop. Most people over-study one area and get caught on another. A balanced preparation plan beats deep expertise in any single category.
Here are the four question types you should be ready for, the classics in each, and what interviewers are actually listening for.
Statistics and probability
Interviewers want to know you understand the why, not just the formulas. Be ready to explain things plainly to a product manager who has never taken a stats class.
- Central limit theorem. The sampling distribution of the mean approaches a normal distribution as the sample size grows, regardless of the underlying distribution.
- Type I vs Type II error. Type I is a false positive (rejecting a true null). Type II is a false negative (failing to reject a false null). There is always a tradeoff.
- p-value. The probability of seeing data at least this extreme if the null hypothesis were true. It is not the probability the null is true.
- t-test vs z-test. Z-test when population variance is known and n is large. T-test when variance is unknown, which is almost always the real-world case.
- Bayes problems. Sensitivity, specificity, and base rates. The classic disease test question shows up in almost every loop.
Machine learning
You are expected to explain how the models work, not just which library to import.
Concepts that come up every loop
- Bias vs variance. High bias means the model is too simple and underfits. High variance means the model is too flexible and overfits. The goal is the balance that minimizes total error on unseen data.
- Imbalanced classes. Resampling (oversample the minority, undersample the majority, SMOTE), class weights, and choosing metrics like F1 or AUC over raw accuracy.
- L1 vs L2 regularization. L1 (Lasso) drives coefficients to zero and does feature selection. L2 (Ridge) shrinks them smoothly and handles multicollinearity.
- Gradient descent. Iteratively update parameters in the direction that reduces the loss. The learning rate controls step size. Too large and you diverge, too small and you crawl.
Algorithm-specific prompts
- Random forest. Bagging plus random feature selection at each split reduces variance compared to a single decision tree.
- XGBoost. Gradient boosting with built-in regularization, smarter handling of missing values, and parallel tree construction.
- Neural networks. Know the vanishing gradient problem and the fixes (ReLU activations, residual connections, batch normalization).
Evaluation metrics
- Accuracy. Easy to compute, misleading on imbalanced data.
- Precision and recall. Precision is how many of your predicted positives are correct. Recall is how many of the actual positives you caught.
- F1 and AUC-ROC. F1 balances precision and recall. AUC-ROC is useful when you care about ranking.
- RMSE vs MAE. RMSE punishes big errors harder. MAE is more robust to outliers.
SQL
SQL questions range from straightforward joins to multi-step window functions. The bar at most tech companies is a clean, correct query written under light pressure.
- Joins. Inner, left, right, full outer, self-joins. Be able to articulate when each is correct.
- Window functions. ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, running totals, and moving averages.
- Aggregation. GROUP BY, HAVING, and NULL handling. Interviewers love a subtle NULL case.
- CTEs and subqueries. Use CTEs to make multi-step logic readable instead of stacking subqueries.
A classic: find users who purchased in January but not in February. A clean version uses a LEFT JOIN or NOT EXISTS against a filtered subquery, and an interviewer will often push you on which is more efficient at scale.
Business and product cases
The hardest part of the loop for most technical candidates. The interviewer is checking whether you can frame a real question, choose a metric, and make a call.
- Metric definition. How do you measure the success of a new feature? Discuss leading vs lagging indicators, guardrails, and gaming risks.
- A/B testing. Hypothesis, primary and guardrail metrics, sample size via power analysis, randomization, duration, and statistical vs practical significance.
- Root cause analysis. DAU dropped ten percent last week. Segment by platform, geography, cohort, and time. Rule out data quality before you rule in a product cause.
- Model framing. Walk through a churn prediction end to end: target definition, feature set, model choice, evaluation, deployment, monitoring.
Company flavors
- Meta. Heavy product sense and experimentation. Expect deep product-metric prompts on Facebook and Instagram.
- Google. More statistics and ML theory. Coding in Python is common. Scale and production thinking show up more than at peers.
- Amazon. Leadership Principles drive the behavioral loop. Pair your technical answers with clean STAR stories.
- Startups. More take-home projects, more end-to-end work, less theoretical depth.
A short prep plan
- Week by week. Rotate categories. Do not spend a month only on ML.
- Practice out loud. Case and behavioral answers fall apart without reps.
- Daily SQL. Short problems on StrataScratch, LeetCode, or HackerRank keep the muscle warm.
- Resume review. Be able to defend every project on your resume in technical detail.
- Company prep. Study the products before onsite day. Metric questions assume you use the app.
Helpful resources
- Bureau of Labor Statistics - Occupational Outlook Handbook for career data and projections
- StrataScratch - SQL and Python data science interview problems
- LinkedIn Learning - Professional development courses
Related topics