Skip to content

22 interview questions

Data scientist interview questions and answers

Data science interviews test three things at once: whether your statistics are sound, whether you can build and judge a model, and whether your work changes a decision. Expect a mix of concept questions, a case or take-home, a SQL or coding round and behavioral questions about stakeholders.

Updated

Statistics and probability

01Explain a p-value to someone without a statistics background.

What they want to hear: Whether you understand what a p-value is and is not, and can explain it without the common misreadings.

Answer outline

  1. Start from the null hypothesis: assume there is no real effect.
  2. The p-value is the probability of seeing data at least this extreme if that assumption were true.
  3. Say what it is not: not the probability the null is true, and not the size of the effect.
  4. Close with practical meaning: a small p-value says the result would be surprising under no effect, so we look at effect size and context before acting.

02What is the difference between Type I and Type II errors?

What they want to hear: Clear definitions plus the judgment to say which one is more costly in a given business setting.

Answer outline

  1. Type I: a false positive, rejecting a true null. Its rate is controlled by alpha.
  2. Type II: a false negative, missing a real effect. Its rate is beta, and power is 1 minus beta.
  3. Lowering one usually raises the other unless you add data.
  4. Give an example: in fraud screening a missed fraud may cost more than a false alarm, so you accept more false positives.

03What does the central limit theorem say, and why does it matter in practice?

What they want to hear: That you know why so many standard tests and confidence intervals work, and where the assumption breaks.

Answer outline

  1. The distribution of sample means approaches a normal distribution as sample size grows, whatever the shape of the underlying data, given finite variance and independent samples.
  2. That is why z and t based confidence intervals for means work on non-normal data.
  3. Caveats: heavy-tailed or highly skewed data such as revenue per user need larger samples, and dependent observations break it.
  4. In practice consider bootstrapping or transforming when you doubt it.

04How would you explain the difference between correlation and causation, and how can you get closer to causation?

What they want to hear: Awareness of confounding and a toolkit beyond 'run an A/B test'.

Answer outline

  1. Correlation can come from confounders, reverse causation or selection bias.
  2. The gold standard is a randomised experiment.
  3. When you cannot randomise: difference-in-differences, regression discontinuity, instrumental variables or matching, each with its own assumptions.
  4. Be explicit about which assumption your conclusion depends on.

Machine learning

05Explain the bias-variance trade-off.

What they want to hear: Core understanding of why models underfit or overfit and what you can do about each.

Answer outline

  1. Bias: error from a model too simple to capture the pattern, which leads to underfitting.
  2. Variance: error from a model too sensitive to the training data, which leads to overfitting.
  3. More complexity usually lowers bias and raises variance; the goal is the lowest total error on unseen data.
  4. Tools: more data, regularisation, simpler features or ensembles for variance; richer features or models for bias.

06How do you detect and prevent overfitting?

What they want to hear: Practical habits, not just the definition.

Answer outline

  1. Detect: a gap between training and validation performance, checked with a proper hold-out or cross-validation.
  2. Prevent: regularisation (L1, L2), early stopping, pruning or limiting tree depth, dropout for neural networks.
  3. Reduce leakage: split before any preprocessing that learns from data, and split by time or user when the data has that structure.
  4. Keep a final test set you touch only once.

07What is the difference between L1 and L2 regularisation?

What they want to hear: Whether you know how each penalty behaves and when to choose it.

Answer outline

  1. L1 (lasso) adds the sum of absolute weights; it can push weights to exactly zero, so it also selects features.
  2. L2 (ridge) adds the sum of squared weights; it shrinks weights smoothly and handles correlated features more stably.
  3. Elastic net combines both.
  4. Scale features first, since both penalties depend on feature scale.

08How would you evaluate a classification model on a highly imbalanced dataset?

What they want to hear: That you will not report 99 percent accuracy on a 1 percent positive class and call it a success.

Answer outline

  1. Explain why accuracy misleads: predicting the majority class scores high.
  2. Use precision, recall, F1 and the precision-recall curve; ROC AUC can look optimistic when positives are rare.
  3. Pick the decision threshold from the business cost of false positives and false negatives.
  4. Consider class weights or resampling during training, and always evaluate on the real distribution.

09Explain how a random forest works and how it differs from gradient boosting.

What they want to hear: Real understanding of the two model families you are most likely to use on tabular data.

Answer outline

  1. Random forest: many deep trees trained on bootstrap samples with random feature subsets, averaged. Mainly reduces variance.
  2. Gradient boosting: shallow trees built one after another, each fitting the errors of the ones before. Mainly reduces bias.
  3. Boosting is often more accurate but more sensitive to tuning and noisy labels; forests are dependable defaults that parallelise easily.
  4. Mention learning rate, number of trees and depth as the main boosting controls.

10Walk me through how you would handle missing data.

What they want to hear: Whether you ask why data is missing before choosing a method.

Answer outline

  1. First find out why it is missing: at random, or tied to the outcome or another variable.
  2. Options: drop rows or columns when the loss is small and harmless, impute with median or model-based methods, or add a 'was missing' indicator.
  3. Fit imputation on training data only to avoid leakage.
  4. Check how results change under different choices.

Experiments and product analytics

11How would you design an A/B test for a new checkout button?

What they want to hear: End-to-end experiment design: metric, sample size, randomisation and guardrails.

Answer outline

  1. Define the primary metric (checkout conversion) and guardrails (revenue per user, error rate).
  2. Choose the randomisation unit, usually the user, and check the split is balanced.
  3. Estimate sample size from baseline rate, minimum effect you care about, alpha and power, and fix the duration in advance, covering full weekly cycles.
  4. Analyse once at the planned end, check for sample ratio mismatch, and report effect size with a confidence interval.

12An experiment shows a significant lift, but the product team is skeptical. What do you check?

What they want to hear: Healthy skepticism toward your own result and knowledge of the common ways tests go wrong.

Answer outline

  1. Sample ratio mismatch and assignment bugs.
  2. Peeking or stopping early, and multiple metrics tested without correction.
  3. Novelty effects: does the lift fade over time?
  4. Segment consistency and whether the effect size is plausible given past tests.

13Daily active users dropped 10 percent yesterday. How would you investigate?

What they want to hear: A calm, structured approach that rules out data problems before business stories.

Answer outline

  1. Check the data first: logging changes, pipeline delays, a definition change.
  2. Check external causes: holidays, outages, a competitor launch, seasonality.
  3. Segment by platform, app version, country and acquisition channel to find where the drop sits.
  4. Match it to recent releases or campaigns, then form and test a hypothesis.

14How would you choose the success metric for a new feature?

What they want to hear: Product sense: linking a metric to user value and avoiding metrics that are easy to game.

Answer outline

  1. Start from the behaviour the feature is meant to change.
  2. Pick one primary metric that moves when users get value and is sensitive enough to detect change.
  3. Add guardrails so a win in one place does not hide a loss elsewhere.
  4. Agree the definition with the product team before launch.

SQL and coding

15Write a query to find each user's first purchase date and the amount of that purchase.

What they want to hear: Comfort with window functions and with getting the grain of the result right.

Answer outline

  1. Use ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY purchased_at) in a CTE.
  2. Select rows where the row number equals 1.
  3. Mention ties: add a tiebreaker column to the ORDER BY, or use RANK if ties should all return.
  4. Say how you would check the result, for example the row count equals the count of distinct buyers.

16How would you calculate 7-day retention from an events table?

What they want to hear: Whether you can turn a product definition into correct SQL and state your assumptions.

Answer outline

  1. Define the cohort: users by signup date, and what counts as 'retained' (active on day 7, or within days 1 to 7).
  2. Build a signup CTE, join to events on user_id, filter by the date difference.
  3. Divide retained users by cohort size, grouped by signup date.
  4. Exclude cohorts too recent to have a full 7 days.

17How do you make your analysis reproducible?

What they want to hear: Engineering habits that let others trust and rerun your work.

Answer outline

  1. Code in version control, not only notebooks.
  2. Pinned environments and fixed random seeds.
  3. Queries and data snapshots recorded with dates.
  4. A short readme or summary that says how to rerun and what each step assumes.

Impact and stakeholders

18Tell me about a model or analysis that changed a business decision.

What they want to hear: Impact, not technique. They want to hear what changed because of your work.

Answer outline (STAR)

  1. The decision on the table and who owned it.
  2. Your approach in one or two sentences, without jargon.
  3. How you presented it and handled objections.
  4. What was decided and the measured result.

19Describe a time your analysis showed something stakeholders did not want to hear.

What they want to hear: Integrity and communication under pressure.

Answer outline (STAR)

  1. The finding and why it was unwelcome.
  2. How you checked it before sharing.
  3. How you presented it: facts, uncertainty, options.
  4. What happened and how the relationship held up.

20Tell me about a model that did not work in production.

What they want to hear: Ownership and understanding of the gap between offline metrics and real use.

Answer outline (STAR)

  1. What the model did and how it performed offline.
  2. What went wrong: drift, leakage, a bad proxy metric or an integration issue.
  3. How you found it and what you changed.
  4. The monitoring you added afterwards.

21How do you decide when a simple model is good enough?

What they want to hear: Pragmatism. Complexity has a maintenance and explanation cost.

Answer outline

  1. Start with a baseline: a heuristic or linear model.
  2. Compare the gain from a complex model against its cost to build, run and explain.
  3. Consider who has to trust or act on the output.
  4. Give an example where you shipped the simpler option.

22How do you explain a model's predictions to a non-technical audience?

What they want to hear: Whether people outside your team will understand and act on what you build.

Answer outline

  1. Lead with what the model is for and how good it is in business terms.
  2. Show the main drivers with simple charts or feature importance, with caveats.
  3. Use one or two concrete examples of individual predictions.
  4. Be honest about limits and when not to trust it.

How to prepare

  • Revise the basics you will be asked to explain out loud: hypothesis testing, confidence intervals, bias-variance, regularisation and evaluation metrics.
  • Practise SQL with window functions, joins and date logic by hand, without autocomplete, and talk through your assumptions as you write.
  • Prepare two or three project stories that each cover the problem, your approach, a trade-off you made and the measured result.
  • For case questions, ask clarifying questions first and state the metric you would optimise before reaching for a model.
  • If there is a take-home, keep it clean and readable, explain your choices and say what you would do with more time.

Practice these questions out loud with NORDON

Reading answers is not the same as saying them. NORDON's interview practice asks you questions written for the role, listens to your spoken answer and shows you how to make it stronger.

  1. Upload your CV in the Knowledge base, so questions and feedback use your real background.
  2. Open Practice, enter the role (for example data scientist), paste the job ad if you have it, and choose 3, 5, 8 or 10 questions and the answer language.
  3. Listen to each question and answer out loud, as you would in the room. You can also type an answer.
  4. Get a score from 1 to 10, what worked, what to improve and a stronger answer to rehearse. It uses only what you said and your documents, and leaves a [placeholder] where a fact about you is missing.
  5. Try the question again, or move on. For a dress rehearsal, run a mock call where an interviewer voice asks the questions out loud.

The free plan includes 10 scored practice answers a month and mock calls of up to 10 minutes, no card needed. Paid plans include more practice and mock calls of up to 30 minutes. How practice works

Practice is for preparing. Use live help in a real interview only where the interviewer allows AI assistance, never in an interview, test or assessment whose rules forbid it.

NORDON for job interviews

Preparing for your data scientist interview

What does a data scientist interview process usually include?

Commonly a recruiter screen, a technical screen on statistics or SQL, then a set of interviews that may include a case study, a coding or modelling round and behavioral questions. Some companies use a take-home instead of a live case. Ask the recruiter which rounds to expect.

Do I need deep learning for a data scientist interview?

It depends on the role. Many product and analytics data science roles focus on statistics, experiments and SQL, while machine learning roles go deeper into models. Read the job description and prepare in proportion.

Which language should I use in the coding round?

Usually the one you are most fluent in among the options they allow, most often Python or SQL. Fluency and clear reasoning matter more than the choice of language.