πHow to Use This List
Data science interviews in India usually have four parts: a SQL or Python screen, an ML concepts round, a project deep dive and a case or product round. This list covers the questions that come up again and again. Do not memorise the answers word for word. Understand them well enough to explain with an example from your own project.
New to the field? Start with the data scientist roadmap.
πMachine Learning Fundamentals
1. What is the bias variance trade-off?
Bias is error from overly simple assumptions, so the model underfits. Variance is error from sensitivity to the training data, so the model overfits. Increasing model complexity lowers bias but raises variance. The goal is the complexity that minimises total error on unseen data, found with validation.2. How do you detect and fix overfitting?
Detect it when training performance is much better than validation performance. Fix it with more data, simpler models, regularisation, feature selection, early stopping, dropout in neural networks, or limiting tree depth and adding minimum leaf sizes.3. Explain L1 and L2 regularisation.
Both add a penalty on coefficient size to the loss. L1 (Lasso) adds the absolute values and can push coefficients to exactly zero, which acts as feature selection. L2 (Ridge) adds squared values, shrinks coefficients smoothly and handles correlated features better. Elastic Net combines both.4. What is the difference between supervised and unsupervised learning?
Supervised learning trains on labelled examples to predict a target, such as churn or price. Unsupervised learning finds structure without labels, such as customer segments with clustering or compressed features with PCA.5. Why do we split data into train, validation and test sets?
Training data fits the model, validation data tunes choices like hyperparameters, and the test set gives one honest estimate of performance on unseen data. Reusing the test set for decisions leaks information and makes results optimistic.6. What is cross validation and when is it useful?
k-fold cross validation splits data into k parts, trains on k minus 1 and validates on the remaining one, rotating through all parts. It gives a more stable performance estimate on smaller datasets. For time series, use forward chaining splits so the model never trains on the future.7. What is data leakage?
Leakage happens when information unavailable at prediction time sneaks into training, such as scaling using the full dataset, or a feature computed after the outcome. It produces great offline scores and poor production results. Use pipelines and think about when each feature becomes available.πMetrics
8. Precision versus recall: which matters more?
Precision is the share of predicted positives that are correct. Recall is the share of actual positives you catch. For fraud or cancer screening, missing positives is costly, so recall matters. For spam filtering, wrongly blocking real mail is costly, so precision matters. The business cost decides.9. What is the F1 score?
The harmonic mean of precision and recall. It is useful when you need a single number that balances both, especially on imbalanced data.10. Explain ROC AUC.
The ROC curve plots true positive rate against false positive rate across all thresholds. AUC is the area under it, equal to the probability that the model ranks a random positive above a random negative. 0.5 is random, 1.0 is perfect. On heavily imbalanced data, the precision recall curve is often more informative.11. Why is accuracy misleading on imbalanced data?
If 99 percent of transactions are genuine, a model that predicts genuine every time scores 99 percent accuracy and catches no fraud. Use precision, recall, PR AUC and a cost based threshold instead.12. RMSE versus MAE?
Both measure regression error. RMSE squares errors first, so it punishes large mistakes more. MAE treats all errors linearly and is easier to explain. Choose based on whether big misses are disproportionately expensive.πModels
13. How does a decision tree decide where to split?
It tries candidate splits and chooses the one that most reduces impurity, measured with Gini impurity or entropy for classification and variance for regression.14. Random forest versus gradient boosting?
A random forest trains many deep trees independently on bootstrapped samples and random feature subsets, then averages them, which mainly reduces variance. Gradient boosting trains shallow trees sequentially, each correcting the errors of the previous ones, which mainly reduces bias. Boosting usually wins on tabular data but needs more careful tuning.15. What are the key hyperparameters in XGBoost or LightGBM?
Learning rate, number of trees, max depth or number of leaves, minimum child weight, subsample, column sample and regularisation terms. Use early stopping on a validation set to choose the number of trees.16. How does logistic regression work?
It models the log odds of the positive class as a linear function of features, then passes it through the sigmoid to get a probability. It is trained by minimising log loss. It is fast, interpretable and a strong baseline.17. How does k-means clustering work, and how do you choose k?
It assigns points to the nearest centroid, recomputes centroids and repeats until stable. Choose k with the elbow method, silhouette score and, most importantly, whether the clusters make business sense.18. What is PCA?
Principal component analysis finds orthogonal directions of maximum variance and projects data onto the top ones. It reduces dimensions, removes correlated features and helps visualisation, at the cost of interpretability.πFeatures and Data
19. How do you handle missing values?
First ask why they are missing. Options include dropping rows or columns, imputing with median or mode, model based imputation, or adding a missing indicator flag, since missingness itself can be predictive.20. How do you encode categorical variables?
One-hot encoding for low cardinality, target or frequency encoding for high cardinality (done inside cross validation to avoid leakage), and native categorical support in CatBoost or LightGBM.21. How do you handle class imbalance?
Use class weights, resampling such as undersampling or SMOTE, better metrics like PR AUC, and threshold tuning based on business cost. Always resample only the training data.22. What is feature scaling and when is it needed?
Standardisation or normalisation puts features on comparable ranges. It matters for distance and gradient based models like k-NN, SVM, logistic regression and neural networks. Tree models do not need it.πStatistics and Experiments
23. What is a p-value?
The probability of seeing a result at least this extreme if the null hypothesis were true. A small p-value suggests the data is unlikely under the null. It is not the probability that the null is true.24. How do you design an A/B test?
Define one primary metric and guardrail metrics, estimate the sample size from the minimum detectable effect and desired power, randomise users properly, run for full weekly cycles, avoid peeking and stopping early, and check for sample ratio mismatch before reading results.25. Type I versus type II error?
Type I is a false positive, declaring an effect that is not real. Type II is a false negative, missing a real effect. Lowering one usually raises the other unless you collect more data.πSQL and Python
26. Find the second highest salary per department.
Use a window function: rank salaries with DENSE_RANK() partitioned by department and ordered by salary descending, then filter where the rank equals 2. Explain why DENSE_RANK handles ties better than ROW_NUMBER here.27. Compute 7-day rolling average revenue.
Aggregate revenue by day, then use AVG(revenue) OVER (ORDER BY day ROWS BETWEEN 6 PRECEDING AND CURRENT ROW). Mention filling missing days first so the window is truly seven calendar days.28. What is the difference between merge and concat in pandas?
merge joins DataFrames on keys like a SQL join. concat stacks DataFrames along rows or columns without matching keys.πProject and Case Questions
29. Walk me through a project end to end.
Use a clear structure: business problem, data sources, cleaning, features, baseline, model choice, metric and why, validation, results in business terms, deployment and what you would improve. Interviewers probe the decisions, so know why you made each one.30. Case: our app's daily active users dropped 10 percent last week. What do you do?
Confirm the data first (tracking bugs, definition changes). Then segment the drop by platform, app version, geography, acquisition channel and new versus returning users. Check internal changes such as releases and marketing, and external factors such as holidays or competitors. Form hypotheses, validate each with data and recommend actions.πFAQ
How many rounds are typical?
Usually three to five: online assessment, SQL or Python, ML concepts, project deep dive and a hiring manager or case round.Do product companies ask deep learning questions?
For general data scientist roles, mostly fundamentals. For NLP, vision or GenAI roles, expect transformers, embeddings and evaluation questions.How should freshers prepare?
Master SQL and ML fundamentals, build two real projects and practise explaining them aloud. Read the roadmap and the salary guide.πLearn It Live
Prakalpana's Data Science course is taught live online with an optional 1-on-1 track, project reviews and mock interviews modelled on real Indian hiring rounds. See the data science track, or WhatsApp or call +91 9180377502 for a free demo.