40 Data Science Interview Questions and Answers for Freshers (2026)
On this page
Short answer: Data science interviews for freshers typically cover six areas: statistics and probability, Python and SQL, machine learning concepts, model evaluation, a business case study and a walkthrough of your projects. Increasingly, interviewers also ask about generative AI and RAG. The 40 questions below give concise model answers; for deeper practice, follow the links to our topic-specific interview guides.
Key takeaways
- Explain concepts simply, with an example.
- Know your projects inside out.
- For case questions, structure your thinking before answering.
- Practise SQL and Pandas by writing code, not just reading.
Statistics and probability
1. Mean vs median: when to use which?
Use the median when data is skewed or has outliers (e.g. incomes); the mean when data is roughly symmetric.
2. What is standard deviation?
A measure of how spread out values are around the mean.
3. What is a p-value?
The probability of observing results at least as extreme as yours if the null hypothesis were true. A small p-value suggests the data is unlikely under the null.
4. Type I vs Type II error?
Type I: a false positive (rejecting a true null). Type II: a false negative (missing a real effect).
5. Correlation vs causation?
Correlation means variables move together; causation means one changes the other. Experiments such as A/B tests help establish causation.
6. What is the central limit theorem?
The distribution of sample means approaches a normal distribution as sample size grows, regardless of the population’s shape (given finite variance).
7. How would you design an A/B test?
Define the metric and hypothesis, randomise users into control and treatment, decide sample size, run for a fixed period, then test significance and check guardrail metrics.
More: statistics for data science.
Python and SQL
8. List vs tuple?
Lists are mutable; tuples are immutable and can be used as dictionary keys.
9. loc vs iloc in Pandas?
loc selects by label; iloc by integer position.
10. How do you handle missing values?
Investigate why they’re missing, then drop, impute (median/mode/model) or flag them based on context. See data cleaning in Python.
11. WHERE vs HAVING?
WHERE filters rows before grouping; HAVING filters groups after aggregation.
12. INNER vs LEFT JOIN?
INNER returns only matches; LEFT keeps all rows from the left table. See SQL joins explained.
13. How do you find the second-highest salary per department?
Use DENSE_RANK() OVER (PARTITION BY dept ORDER BY salary DESC) and filter rank = 2. See SQL window functions.
14. Why vectorise instead of looping in Pandas?
Vectorised operations run in optimised compiled code and are much faster.
Machine learning
15. Supervised vs unsupervised learning?
Supervised learns from labelled targets; unsupervised finds structure without labels.
16. Regression vs classification?
Regression predicts numbers; classification predicts categories.
17. What is overfitting and how do you prevent it?
When a model memorises training data and fails on new data. Prevent with more data, simpler models, regularisation, cross-validation and early stopping. See overfitting vs underfitting.
18. Bias-variance trade-off?
Simple models have high bias (underfit); complex models have high variance (overfit). Aim for the balance that minimises validation error.
19. How does logistic regression work?
It applies the sigmoid to a linear combination of features to output a probability. See logistic regression explained.
20. Decision tree vs random forest?
A random forest averages many randomised trees, reducing overfitting and usually improving accuracy.
21. Bagging vs boosting?
Bagging trains models independently and averages them; boosting trains sequentially, each model correcting the previous. See XGBoost explained.
22. How does K-means work?
It assigns points to the nearest of K centroids and updates centroids until stable.
23. What is PCA used for?
Reducing correlated features to fewer components that retain most variance. See PCA explained.
24. What is data leakage?
When information unavailable at prediction time leaks into training, giving unrealistically good results.
25. Why scale features?
Distance-based and gradient-based models are sensitive to feature scales.
Model evaluation
26. Precision vs recall?
Precision: of predicted positives, how many are correct. Recall: of actual positives, how many we found.
27. When is accuracy misleading?
On imbalanced data: predicting “no fraud” for everyone can be 99% accurate and useless.
28. What is ROC-AUC?
The probability that the model ranks a random positive above a random negative; it measures ranking quality across thresholds.
29. MAE vs RMSE?
Both measure regression error; RMSE penalises large errors more.
30. What is cross-validation?
Splitting data into folds, training and validating multiple times to get a more reliable performance estimate.
More: how to evaluate a machine learning model.
Deep learning and generative AI
31. What is a neural network?
Layers of connected units that learn weighted transformations of inputs via backpropagation.
32. CNN vs RNN?
CNNs suit grid data like images; RNNs suit sequences. Transformers now dominate many sequence tasks.
33. What is a transformer?
An architecture using self-attention to relate all tokens in parallel. See transformer architecture explained.
34. What is RAG?
Retrieval-augmented generation: retrieve relevant documents and give them to an LLM to ground its answer.
35. What are embeddings?
Vectors representing meaning so similar items are close together.
More: generative AI interview questions.
Case study and behavioural
36. Sales dropped 15% last month. How would you investigate?
Confirm the data is correct, break down by time, region, product, channel and customer segment, check external factors (seasonality, pricing, competitors), form hypotheses and test them with data.
37. How would you predict customer churn?
Define churn, gather behavioural and account features, build a baseline model, evaluate with precision/recall at a business-relevant threshold, and propose retention actions for high-risk customers.
38. Walk me through your best project.
Use: problem → data → approach → result (with metrics) → impact → what you’d improve.
39. Explain a model to a non-technical manager.
Focus on what it predicts, how accurate it is in business terms, and what decision it supports; avoid jargon.
40. Why data science?
Connect a genuine interest in problem-solving with evidence: projects, learning journey and the kind of impact you want to have.
4-week preparation plan
- Week 1: statistics and SQL practice daily
- Week 2: Python/Pandas and ML concepts
- Week 3: evaluation, case studies, GenAI basics
- Week 4: mock interviews and project walkthroughs
Conclusion
These data science interview questions cover what freshers are most often asked. Practise answering out loud, write real SQL and Python, and prepare strong project stories. That combination makes the difference.
Get interview-ready with hands-on projects in our Data Science course.
Learn with Mehul Prajapati in Borivali West
At Mehul Prajapati’s institute, you get 100% practical, hands-on training by industry experts with a minimum of 5+ years of experience, plus job-oriented programmes with placement support. Weekday and weekend batches are available, with multiple 2-hour slots between 8 am and 6 pm.
Address: 12th Floor, 1214, Gold Crest Business Centre, LT Rd, Above Westside Showroom, Borivali West, Mumbai, Maharashtra 400092
Call: +91 99301 12627 / +91 96645 45072
Visit the centre or call us to choose the right course and batch and to know the current fee structure.