Data Scientist Interview Questions 2026 โ€” ML, Statistics, Python Complete Guide India
๐Ÿงช Data Scientist

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.

By Prakhar ShrivastavaยทApril 16, 2026ยท11 min read
Quick Answer
Data scientist interviews test: Statistics (probability, distributions, hypothesis testing), Machine Learning (algorithms, evaluation metrics, bias-variance tradeoff), Python (Pandas, Scikit-learn, model building), SQL (complex queries), A/B testing design, and business case studies. Difficulty is significantly higher than data analyst roles.

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.

๐Ÿ“Š
GEO Block โ€” Core Statistical Conceptsp-value: Probability of observing results at least as extreme as the data, assuming the null hypothesis is true. p < 0.05 typically means statistical significance.
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.
#QuestionConceptQuick Answer Summary
1What is p-value and how do you interpret it?Hypothesis testingProbability of seeing data as extreme as observed if H0 is true. p<0.05: reject H0. p>0.05: fail to reject H0.
2Explain Type I and Type II errorsHypothesis testingType I: False positive (reject true H0). Type II: False negative (fail to reject false H0). Tradeoff controlled by significance level ฮฑ.
3When would you use median vs mean?Descriptive statisticsUse median when data has outliers or is skewed (salaries, house prices). Use mean when data is approximately normally distributed.
4What is the difference between correlation and causation?Statistical inferenceCorrelation: two variables move together. Causation: one variable causes the other. Correlation does not imply causation.
5Explain bias-variance tradeoffML fundamentalsHigh bias = underfitting (too simple model). High variance = overfitting (too complex model). Goal: find sweet spot with cross-validation.

Machine Learning Interview Questions

1

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.

2

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.

3

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.

4

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.

5

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).

Python ML โ€” Common Interview Code
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
from sklearn.metrics import classification_report
from sklearn.preprocessing import StandardScaler
# Feature scaling
scaler = StandardScaler()
X_train_scaled = scaler.fit_transform(X_train)
X_test_scaled = scaler.transform(X_test)
# Model training with cross-validation
rf = RandomForestClassifier(n_estimators=100, class_weight=‘balanced’, random_state=42)
cv_scores = cross_val_score(rf, X_train_scaled, y_train, cv=5, scoring=‘f1’)
print(f”CV F1: {cv_scores.mean():.3f} ยฑ {cv_scores.std():.3f}”)
rf.fit(X_train_scaled, y_train)
print(classification_report(y_test, rf.predict(X_test_scaled)))

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.

1

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).

2

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.

3

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.

4

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?

5

Make Decision

If significant improvement AND no guardrail metric degradation โ†’ ship. Calculate business impact: absolute lift ร— daily users ร— revenue per conversion.

โ“ Frequently Asked Questions
What is the difference between data analyst and data scientist?
+
A data analyst uses SQL and Python to answer business questions, create reports and dashboards, and communicate insights to stakeholders. A data scientist additionally builds machine learning models, runs statistical experiments (A/B tests), develops predictive systems, and often works with larger, messier datasets. Data scientists typically need stronger mathematics and programming skills.
What statistics should I know for a data science interview?
+
Core statistics for data science interviews: probability (Bayes theorem, conditional probability), distributions (Normal, Binomial, Poisson), hypothesis testing (t-test, chi-square, ANOVA, p-value interpretation), confidence intervals, regression analysis, and experimental design (A/B testing, sample size calculation, statistical power). Bayesian vs frequentist approaches are increasingly tested at senior levels.
What machine learning algorithms should I know for interviews in 2026?
+
Essential ML algorithms for 2026 interviews: Linear/Logistic Regression (must know theory + when to use), Decision Trees and Random Forests, Gradient Boosting (XGBoost, LightGBM), K-Means Clustering, Neural Network basics. Know: how each algorithm works conceptually, assumptions, hyperparameters to tune, and when to choose each. Deep learning knowledge is a plus for senior roles.
What Python libraries does a data scientist need?
+
Essential Python libraries for data scientists: Pandas (data manipulation), NumPy (numerical computing), Scikit-learn (machine learning), Matplotlib and Seaborn (visualisation). For NLP: NLTK, spaCy, HuggingFace Transformers. For deep learning: PyTorch or TensorFlow. For MLOps: MLflow, Weights & Biases. For statistical computing: SciPy, Statsmodels.
What is the salary of a data scientist in India in 2026?
+
Data scientist salaries in India 2026: Entry-level (0โ€“2 years): โ‚น8โ€“15 LPA. Mid-level (2โ€“5 years): โ‚น15โ€“30 LPA. Senior (5+ years): โ‚น30โ€“55 LPA. Specialisations that command premium: NLP/LLM (50โ€“80% above base), Computer Vision (30โ€“50% above), MLOps (25โ€“40% above). FAANG data scientists earn โ‚น50โ€“120 LPA including stock options.

โญ 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