Data Scientist Interview Questions 2026 — ML, Stats & Python
Practise interview-style exercises with worked explanations. These are learning examples, not a verified record of questions asked by a named employer.
Statistics Interview Questions
Definition: Statistics is the foundation of data science. Without statistical understanding, you cannot correctly interpret model results, design experiments, or make data-driven decisions.
Confidence Interval: Range of values likely to contain the true population parameter with a given confidence level (e.g., 95% CI).
Central Limit Theorem: The sampling distribution of the mean approaches normal distribution as sample size increases, regardless of population distribution.
| # | Question | Concept | Quick Answer Summary |
|---|---|---|---|
| 1 | What is p-value and how do you interpret it? | Hypothesis testing | Probability of seeing data as extreme as observed if H0 is true. p<0.05: reject H0. p>0.05: fail to reject H0. |
| 2 | Explain Type I and Type II errors | Hypothesis testing | Type I: False positive (reject true H0). Type II: False negative (fail to reject false H0). Tradeoff controlled by significance level α. |
| 3 | When would you use median vs mean? | Descriptive statistics | Use median when data has outliers or is skewed (salaries, house prices). Use mean when data is approximately normally distributed. |
| 4 | What is the difference between correlation and causation? | Statistical inference | Correlation: two variables move together. Causation: one variable causes the other. Correlation does not imply causation. |
| 5 | Explain bias-variance tradeoff | ML fundamentals | High bias = underfitting (too simple model). High variance = overfitting (too complex model). Goal: find sweet spot with cross-validation. |
Machine Learning Interview Questions
Linear vs Logistic Regression
Linear regression: predicts continuous values (sales, price). Logistic regression: predicts probability of binary outcome (churn yes/no, fraud yes/no). Use logistic for classification, linear for regression tasks.
How does a Random Forest work?
Builds N decision trees on random subsets of data and features (bagging). Final prediction = majority vote (classification) or average (regression). Reduces variance compared to single decision tree. Handles missing values well.
What is gradient boosting?
Builds trees sequentially — each tree corrects errors of the previous one. Algorithms: XGBoost, LightGBM, CatBoost. Very powerful but prone to overfitting — use regularisation and cross-validation.
How do you handle class imbalance?
Techniques: Oversampling minority class (SMOTE), undersampling majority class, class_weight=’balanced’ in Scikit-learn, use precision/recall/F1 instead of accuracy, threshold tuning with ROC-AUC.
What evaluation metrics do you use for classification?
Accuracy (misleading with imbalanced data), Precision (when false positives are costly), Recall (when false negatives are costly), F1 Score (harmonic mean of precision and recall), AUC-ROC (overall model discrimination ability).
A/B Testing — Deep Dive
A/B testing (also called controlled experiments) is a core data scientist skill. You must be able to design, run and analyse experiments correctly.
Define Hypothesis
H0 (null): The new feature has no effect on metric X. H1 (alternative): The new feature increases metric X. Define significance level (α = 0.05) and statistical power (1-β = 0.80).
Calculate Sample Size
Use: n = (Zα/2 + Zβ)² × 2σ² / δ². In practice: use a sample size calculator with expected effect size, baseline conversion rate, and desired power. Underestimating sample size is the #1 A/B testing mistake.
Run the Experiment
Randomise at user level (not session). Run for at least 1–2 full business cycles. Avoid peeking at results — use sequential testing if early stopping is needed.
Analyse Results
Calculate p-value. Check for novelty effects, seasonality, and network effects. Segment analysis: does the effect hold across user cohorts? Look at secondary metrics — are guardrail metrics affected?
Make Decision
If significant improvement AND no guardrail metric degradation → ship. Calculate business impact: absolute lift × daily users × revenue per conversion.
⭐ Key Takeaways
- Statistics is the foundation — p-value, hypothesis testing, bias-variance tradeoff are always tested
- Know 5 core ML algorithms deeply (theory, assumptions, tuning) rather than 20 superficially
- A/B testing: design (sample size), execution (randomisation), analysis (p-value, segments, guardrails)
- Python stack: Pandas + Scikit-learn + Matplotlib + SciPy — master these before anything else
- Differentiate yourself: Kaggle competitions, published analysis on Medium/Towards Data Science, GitHub projects
- Compare current job postings for the same responsibilities and location; assess fixed pay, conditional bonuses and equity separately.
Prepare for Your Data Scientist Interview
Mock-interview services are coming soon. Booking and payment are currently inactive. View the planned offers or contact us with a question.
Mock interviews — coming soon →Documentation and next steps
Check the relevant documentation for your software version and database dialect. These are practice resources, not verified employer question banks.
Find a related learning guide · About the author · Suggest a correction