Data Scientist Interview Questions 2026 โ ML, Stats & Python
Top data science interview questions with answers โ machine learning algorithms, statistics, Python, A/B testing, and real case studies from Google, Amazon, Netflix, Flipkart and top Indian startups in 2026.
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
- DS salaries: โน8โ15L (junior), โน15โ30L (mid), โน30โ55L (senior) โ NLP/LLM specialists earn premium
Prepare for Your Data Scientist Interview
Book a free mock session. We cover statistics, ML concepts, Python and case studies with personalised feedback.
Book Free Mock Session