The most common data science interview questions across statistics, machine learning, SQL, Python, and case study rounds — with detailed sample answers.
14+
Questions covered
4
Interview categories
15 min
Reading time
3 / month
Practice sessions free
A p-value is the probability of observing results at least as extreme as the data, assuming the null hypothesis is true. If p < α (commonly 0.05), you reject the null. A confidence interval gives a range of plausible values for the parameter — a 95% CI means 95% of intervals constructed this way would contain the true value. Both measure uncertainty, but CIs are often more informative because they show the magnitude of the effect.
Bias is the error from wrong assumptions (underfitting); variance is the error from sensitivity to training data fluctuations (overfitting). A simple model has high bias and low variance. A complex model has low bias and high variance. The goal is to find the sweet spot that minimises total error. Techniques like cross-validation help identify the right model complexity.
The CLT states that the sampling distribution of the mean approaches a normal distribution as sample size increases, regardless of the population distribution. This is foundational: it allows us to make inferences about population parameters using sample statistics and underpins hypothesis testing and confidence intervals.
Bagging (e.g. Random Forest) trains multiple models in parallel on random subsets of data and averages predictions — it reduces variance. Boosting (e.g. XGBoost, AdaBoost) trains models sequentially, each correcting the errors of the previous — it reduces bias. Bagging is more robust to overfitting; boosting can achieve higher accuracy but is more sensitive to outliers.
Techniques include: (1) resampling — oversample the minority class (SMOTE) or undersample the majority, (2) class weights — penalise misclassifying the minority class more heavily, (3) use appropriate metrics — accuracy is misleading; use precision, recall, F1, AUC-ROC, (4) anomaly detection framing for extreme imbalance, (5) ensemble methods like balanced random forests.
Gradient descent minimises a loss function by updating parameters in the direction of the negative gradient. Variants: Batch GD uses all data (slow, stable), Stochastic GD uses one sample (fast, noisy), Mini-batch GD is the standard compromise. Adam and RMSprop are adaptive learning rate methods that converge faster in practice for deep learning.
Regularisation adds a penalty to the loss function to discourage overly complex models. L1 (Lasso) adds the sum of absolute weights — drives some weights to zero, useful for feature selection. L2 (Ridge) adds the sum of squared weights — keeps all weights small. ElasticNet combines both. The regularisation strength hyperparameter λ controls the tradeoff between fit and complexity.
WHERE filters rows before aggregation; HAVING filters groups after aggregation. Use WHERE for row-level conditions and HAVING for conditions on aggregated values (e.g. HAVING COUNT(*) > 10).
Window functions perform calculations across a set of rows related to the current row without collapsing them into groups (unlike GROUP BY). Use cases: running totals (SUM OVER), rankings (RANK, ROW_NUMBER), moving averages, and lag/lead comparisons. Example: finding each customer's most recent order without a subquery.
Use GROUP BY with HAVING COUNT(*) > 1 on the column(s) you consider the unique key. Example: SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1. To delete duplicates, use a CTE with ROW_NUMBER() OVER (PARTITION BY ...) and delete rows where row_num > 1.
Structure: problem definition, data collection and cleaning, exploratory analysis, model selection and training, evaluation, deployment, and business impact. Quantify results (e.g. "reduced churn by 12%"). Mention what you would do differently with more time.
Define the north star metric aligned to the business goal. Set up an A/B test with a pre-calculated sample size for statistical significance. Decide on the primary metric (e.g. conversion rate) and guardrail metrics (e.g. latency, churn) upfront. Analyse after the run period, check for novelty effects, and report confidence intervals not just p-values.
Pricing
First 3 rounds of any loop — for any of 31 companies — are completely free. Upgrade to Career when you're ready to finish.
Free
First 3 rounds free — no card needed
Career
Finish every loop. Unlimited companies.
Executive
For senior & leadership candidates
Enterprise
For bootcamps, universities & L&D teams
Data analysts primarily work with existing data to answer business questions using SQL, Excel, and dashboards. Data scientists build predictive models, design experiments, and often write production code. The line blurs across companies, so read the job description carefully.
Yes, most data scientist roles include a Python coding round (data manipulation with pandas, implementing ML algorithms from scratch) and SQL round. Some companies also include take-home case studies where you analyse a dataset and present findings.
Core: numpy (arrays), pandas (data manipulation), scikit-learn (ML algorithms), matplotlib/seaborn (visualisation). For deep learning roles: PyTorch or TensorFlow. For production roles: MLflow, Airflow, FastAPI.
Practice structuring your thinking: clarify the problem, ask about data availability, propose metrics, suggest a modelling approach, discuss trade-offs, and quantify expected impact. NeuralHire includes case study interview simulations with AI feedback on your analytical reasoning.