Data Analyst Interview
Menu
Browse in your language. All mock interviews, preparation sessions and feedback are in English only.
🧪 Data Scientist

Data Scientist Interview Questions 2026 — ML, Stats & Python

In brief: Review statistics, machine learning and Python interview topics. Explain evaluation metrics, data leakage and uncertainty with clear assumptions and examples.

Practise interview-style exercises with worked explanations. These are learning examples, not a verified record of questions asked by a named employer.

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?
+
Compensation varies by role, employer, location, and experience. Compare current advertised ranges and distinguish fixed pay from bonuses and equity. No particular salary or premium is guaranteed.

⭐ 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

✉ WhatsApp