Data Scientist interview questions and answers

Data scientist interviews cover statistics, machine learning, coding in Python and SQL, and product sense: choosing the right metric, designing experiments and explaining results to non-experts.

Skills and knowledge

  1. Explain the bias-variance trade-off.

    Sample answer: Bias is error from a model that is too simple and misses real patterns (underfitting). Variance is error from a model that is too sensitive to the training data and learns noise (overfitting). Making a model more complex lowers bias but raises variance; the goal is the balance that performs best on new data, found with validation.

  2. How do you prevent overfitting?

    Sample answer: Use more data, simpler models, regularisation such as L1 or L2, cross-validation to pick settings, early stopping, dropout in neural networks, and fewer but better features. Always judge the model on a held-out test set it has never seen.

  3. What is a p-value?

    Sample answer: Assuming there is truly no effect, the p-value is the probability of seeing a result at least as extreme as the one observed. A small p-value, commonly below 0.05, suggests the data is unlikely under no effect. It is not the probability that the hypothesis is true, and it says nothing about how big or important the effect is.

  4. How would you design an A/B test?

    Sample answer: Define one primary metric and a hypothesis, decide the smallest effect worth detecting, calculate the sample size needed, randomly split users, run for full weeks to cover weekday patterns, avoid peeking early, check that groups are balanced, then analyse with the planned test and report the effect with a confidence interval.

  5. Precision or recall: which matters more?

    Sample answer: It depends on the cost of mistakes. Precision is how many flagged cases are truly positive; recall is how many true positives you catch. For fraud or disease screening, missing a case is costly, so recall matters more; for spam filtering, wrongly blocking a real email is costly, so precision matters more. F1 balances both.

  6. How do you handle an imbalanced dataset?

    Sample answer: Use metrics that reflect the minority class such as precision, recall, F1 or PR-AUC rather than accuracy. Try class weights, resampling (undersampling the majority or oversampling the minority), adjusting the decision threshold, and collecting more examples of the rare class.

  7. Explain how a random forest works.

    Sample answer: A random forest builds many decision trees, each on a random sample of rows and considering a random subset of features at each split, then averages their predictions (or takes a majority vote). The randomness makes the trees different, so their errors partly cancel out, giving a model that is accurate and less prone to overfitting than one tree.

  8. How would you choose features for a model?

    Sample answer: Start with domain knowledge about what could drive the outcome, explore relationships with the target, remove leaking features that would not be known at prediction time, drop near-duplicates, and use model-based importance or regularisation to prune. Validate that each change improves held-out performance.

  9. What is cross-validation?

    Sample answer: Cross-validation splits training data into several folds, trains on all but one and tests on the one left out, rotating through each fold. Averaging the scores gives a more reliable estimate of performance than a single split, and helps pick model settings without touching the final test set.

  10. What is regularisation?

    Sample answer: Regularisation adds a penalty for large model weights to reduce overfitting. L1 (lasso) can push some weights to exactly zero, acting as feature selection. L2 (ridge) shrinks all weights smoothly. The strength of the penalty is chosen with validation.

  11. Explain the central limit theorem.

    Sample answer: When you take many random samples and average each one, the averages form a roughly normal distribution as the sample size grows, whatever the shape of the original data. This is why confidence intervals and many tests work on averages even when the data itself is skewed.

  12. How do you explain a model's predictions?

    Sample answer: Globally, show which features matter most with permutation importance or SHAP values. For one prediction, use SHAP or similar to show which features pushed it up or down. For stakeholders, translate this into plain reasons and examples, and check that the reasons make business sense.

Past experience

  1. Tell me about a model that went into production.

    Sample answer: Explain the business problem, the data, the model and baseline it beat, how it was evaluated, how it was deployed and monitored, and the business result. If it failed or was dropped, say why and what you learned; that is still a strong answer.

  2. Tell me about a time you had to work with messy or limited data.

    Sample answer: Describe the gaps, how you cleaned and checked the data, what assumptions you made and tested, how you chose a simpler method that suited the data, and how you clearly told stakeholders about the uncertainty in the results.

What would you do?

  1. A product manager asks if a new feature increased engagement. How do you answer?

    Sample answer: Ask what engagement means and agree on one metric. If there was an A/B test, analyse it. If not, compare similar users before and after with care, look at a control group of users who did not get the feature, and watch for seasonality and novelty effects. Give an honest answer with the level of confidence, not just a yes.

  2. How would you build a model to predict customer churn?

    Sample answer: Define churn clearly and the prediction window, gather features such as usage trends, support tickets, payments and tenure from before that window, start with a simple baseline like logistic regression, then try gradient boosting. Evaluate with precision and recall, and work with the retention team on how scores will be used.

Open Data Scientist jobs

CClera
Remote · Worldwide

Data Scientist

RemoteData & AIFull Time
Pay not listedToday · via Himalayas
TThumbtack
Remote · Ontario, Canada

Sr. Data Scientist, Business Analytics

RemoteData & AIFulltime
$168,300.00 - $217,800.00Today · via Thumbtack careers (Ashby)
SSAPITBusinessSysteme
Vancouver, British Columbia, Canada

Senior Data and Applied Scientist

HybridData & AIFull-time
Pay not listedToday · via SAPITBusinessSysteme careers (SmartRecruiters)
SSohohouseco
London, England, United Kingdom

Lead Data Scientist

OnsiteData & AIFull Time
Pay not listedToday · via Arbeitnow
PPersonalisinc
Fremont, California, United States

Clinical Lab Scientist 1

OnsiteData & AIFull Time
$56.25 to $66.00 per hourToday · via Personalisinc careers (Greenhouse)
TThumbtack
Remote · Ontario, Canada

Data Scientist II, Business Analytics

RemoteData & AIFulltime
$150,500.00 - $194,700.00Today · via Thumbtack careers (Ashby)

More interview guides