Interview guide

Data Scientist Interview Questions and Sample Answers

For data scientists at any level preparing for machine learning, evaluation, experimentation and business case questions. Each question explains what the interviewer is checking, with tips and sample answers you can adapt.

14 questions · Updated 24 November 2026

Data science interviews test whether you can turn a messy business problem into a model or analysis that actually helps, and whether you understand your methods well enough to know when they will mislead you. Explaining why a model behaves as it does matters more than remembering library calls.

Expect machine learning fundamentals, evaluation metrics, experiments and statistics, a coding round, an open-ended case, and behavioural questions that often focus on projects that didn’t go to plan. The maths here is kept in words. If an interviewer asks for a formula, write it down, then say what it means in practice.

The sample answers use [placeholders] for your own experience, so swap in real projects, data and results. If you’re coming from analytics, the data analyst guide covers SQL, cleaning and dashboard questions in more depth.

How the interview usually goes

  • Recruiter screen: your background, the kinds of problems and models you’ve worked on, and why this role.
  • Coding round: Python or SQL, often data manipulation with pandas or a similar library, or queries on a sample schema. Some companies set a take-home task instead.
  • Machine learning and statistics: model choice, evaluation, overfitting and experiments, with follow-up questions that test how deep your understanding goes.
  • Case or product round: an open-ended business problem, such as reducing churn or detecting fraud, where you frame the problem, choose data and metrics, and outline an approach.
  • Behavioural and stakeholder round: past projects, explaining results to non-technical people, and what you did when a model underperformed.

Machine learning fundamentals

Explain the bias–variance trade-off.

What they’re checking: A foundational question. They want to know whether you can connect the theory to practical decisions, such as whether a model needs more flexibility or more constraint.

  • Define both in plain words: bias is consistent error from a model that’s too simple; variance is sensitivity to the particular training sample.
  • Link them to underfitting and overfitting, and to how you’d diagnose each from training and validation error.
  • If pushed, mention that very large modern models don’t always follow the simple curve, but the idea still guides everyday choices.
Sample answer

Bias is error from a model being too simple to capture the real pattern, so it’s wrong in a consistent way, on the training data as well as new data. That’s underfitting, like fitting a straight line to data that clearly curves. Variance is error from a model being too sensitive to its particular training sample: train it on a slightly different sample and the predictions change noticeably. That’s overfitting. For squared error, the expected error on new data splits into bias squared, variance, and noise that no model can remove. Making a model more flexible usually lowers bias and raises variance, so the aim is the point where error on unseen data is lowest, which I find with validation. As a diagnosis: high training error points to bias; low training error with much higher validation error points to variance.

What is overfitting, and how do you prevent it?

What they’re checking: Every data scientist meets overfitting. They’re checking that you can detect it reliably and know several remedies, including what cross-validation does and doesn’t do.

  • Explain detection first: compare training and validation performance.
  • Describe k-fold cross-validation accurately, and keep a final test set that’s used once.
  • Know the difference between L1 and L2 regularisation in words.
  • Mention model-specific controls: tree depth, early stopping, dropout.
Sample answer

Overfitting is when a model learns noise in the training data as if it were signal, so it does well in training and worse on new data. I spot it by comparing training and validation performance; a large gap is the warning sign. For an honest estimate, I use k-fold cross-validation: split the data into k parts, train on all but one, validate on the part left out, rotate, and average. Cross-validation doesn’t prevent overfitting by itself, but it lets me choose models and settings that generalise, and I still keep a final test set that I use only once. To reduce it, I get more data if possible, simplify the model or drop weak features, and add regularisation: L2 shrinks all the weights towards zero, while L1 can push some to exactly zero, which also selects features. For trees I limit depth; for neural networks, early stopping and dropout.

What is data leakage, and how do you avoid it?

What they’re checking: Leakage is one of the most common reasons a model looks excellent in development and fails in production. They want examples and concrete prevention habits.

  • Give at least two kinds: target leakage, and contamination between training and test data.
  • Mention time: random splits on time-ordered data let a model learn from the future.
  • Describe the habit that prevents most leakage: fit every preprocessing step inside the training folds only.
Sample answer

Leakage is when the training data contains information the model won’t have when it makes real predictions, so validation scores look great and production results don’t. One kind is target leakage: a feature that’s only known after the outcome, like using “refund issued” to predict whether an order will be disputed. Another is contamination between training and test data, such as fitting a scaler or imputer on the whole dataset before splitting, or having the same customer in both sets when it must work on new customers. With time-ordered data, a random split lets the model learn from the future. To prevent it, I split first, fit all preprocessing on the training folds only, use time-based or grouped splits where they match reality, and ask of every feature: would I know this at the moment of prediction? A result that looks too good is my first warning sign.

How do you approach feature engineering?

What they’re checking: Good features often matter more than the choice of algorithm. They want to see domain thinking, sound techniques, and awareness of leakage and production constraints.

  • Start from the domain: what behaviour or context would plausibly predict the outcome?
  • Name common techniques: aggregates over time windows, ratios, date parts, log transforms, encodings for categories.
  • Mention that features must be computed the same way in training and in production.
Sample answer

Feature engineering is turning raw data into inputs that make the signal easier for a model to learn, and it’s often where the biggest improvements come from. I start from domain knowledge. For a churn model, raw event logs mean little, but features like days since last login, how usage has changed over recent weeks, or support tickets in the past month say a lot. Typical techniques are aggregating behaviour over time windows, ratios, date parts like day of week, log transforms for skewed values, and encoding categories: one-hot for a few values, and something like target encoding for many, calculated out of fold so it doesn’t leak. Scaling matters for linear and distance-based models but not for tree-based ones. I check each feature’s value with cross-validation, and I make sure it can be computed the same way in production, to avoid training–serving skew.

How do you choose between a simple model and a more complex one?

What they’re checking: They want to see that you choose models to fit the problem and its constraints, not out of habit or fashion.

  • Start with a baseline, such as a simple rule or a linear or logistic regression, so you know what extra complexity actually adds.
  • Weigh the gain against interpretability, training and prediction cost, latency, and how hard the model is to maintain and monitor.
  • Consider the data: gradient-boosted trees are a strong, common choice for tabular data, while deep learning usually earns its place with images, audio, text or very large datasets.
  • Mention trust and regulation: where individual decisions must be explained, as in lending, that can decide the choice.

Metrics, experiments and statistics

Interviewers often follow up a definition with “and when would that matter?”. Prepare an example for each idea, and explain it in words before reaching for a formula.

What’s the difference between precision and recall, and when does each matter more?

What they’re checking: Choosing between them is a business decision about the cost of mistakes. They want clear definitions and sensible examples.

  • Precision: of everything flagged, how much was right. Recall: of everything that should have been flagged, how much was caught.
  • Explain that moving the decision threshold trades one against the other.
  • Tie the choice to the cost of a false positive versus a false negative, and to practical limits such as review capacity.
Sample answer

Precision asks: of everything the model flagged as positive, how much really was positive? Recall asks: of all the real positives, how many did the model catch? You usually trade one against the other by moving the decision threshold: flag more cases and recall rises while precision tends to fall. Which matters more depends on what each error costs. For a spam filter, I’d favour precision, because sending a genuine email to the spam folder is worse than letting the odd spam message through. For screening for a serious disease, I’d favour recall, because a missed case costs far more than a false alarm that a follow-up test can clear. There’s often a practical limit too, like a fraud team that can only review so many alerts a day, so I’d choose the threshold that gives the best recall within that capacity and agree it with the business.

How would you evaluate a model on highly imbalanced data?

What they’re checking: Fraud, churn, defects and rare diseases are all imbalanced problems. They’re checking that you won’t report a meaningless accuracy figure.

  • Explain why accuracy misleads when positives are rare.
  • Know when the precision–recall curve is more informative than ROC AUC.
  • Mention evaluating on the real class balance even if you resample or weight classes during training.
Sample answer

With imbalanced data, accuracy misleads: if positives are rare, a model that predicts “no” for everything scores very highly and catches nothing. I start with the confusion matrix, then use precision and recall, or an F-score weighted towards whichever matters more. To compare models across thresholds, I prefer the precision–recall curve and average precision over ROC AUC when positives are rare, because ROC AUC can look strong thanks to the large number of easy negatives. If the business acts on a fixed number of cases each week, precision among those top-ranked cases is the most honest measure. If the predicted probabilities are used directly, I check calibration as well. I use stratified splits so every fold contains positives, and if I resample or weight classes in training, I still evaluate on data with the real class balance.

How would you design an A/B test, and how would you explain a p-value?

What they’re checking: Experiments drive many product decisions, and p-values are widely misunderstood. They want a careful design and a correct, plain-English interpretation.

  • Cover the design decisions: hypothesis, one primary metric, guardrail metrics, unit of randomisation, and the significance level and minimum effect agreed beforehand.
  • Say what a p-value is not: the probability that the change works, or a measure of how big the effect is.
  • Mention checks during the test, such as whether the traffic split matches the plan, and the risk of stopping early.
Sample answer

First I’d agree the hypothesis and one primary metric, plus guardrail metrics that mustn’t get worse, such as page load time or cancellations. I’d choose the unit of randomisation, usually the user rather than the session, so people don’t switch between versions. We’d agree the significance level beforehand and the smallest effect worth detecting, and a power calculation tells us how many users we need and how long to run, ideally in whole weeks. During the test, I’d check the split matches the plan; a mismatch usually means an assignment bug. The p-value is the probability of seeing a difference at least this large if the change really had no effect. It isn’t the probability that the change works, and it doesn’t tell us how big the effect is, so I’d report a confidence interval too. And no stopping early because it looks good, unless we planned a sequential design.

What are Type I and Type II errors?

What they’re checking: It checks that you understand the two ways a test can be wrong, how test design controls each, and what they mean for the business.

  • Type I is a false positive: concluding there’s an effect when there isn’t. The significance level you agreed beforehand is the rate of these you accept when there’s truly no effect.
  • Type II is a false negative: missing an effect that’s real. Power is the chance of detecting a real effect of a given magnitude; more data and larger true effects increase it.
  • Put it in business terms: a Type I error might mean shipping a change that does nothing; a Type II error might mean abandoning one that would have helped.
  • Mention that checking many metrics or running many tests raises the chance of at least one false positive, and that corrections or a single pre-agreed primary metric help.

Business problems, production and communication

Senior interviewers spend much of their time here. They want to know whether your work changes decisions, keeps working after launch, and makes sense to the people who rely on it. For project and failure stories, the STAR method keeps your answer easy to follow.

Walk me through a data science project you’re proud of.

What they’re checking: This is a depth and ownership check: how you framed the problem, made choices and measured impact, and whether you hold up when they probe.

  • Use a simple arc: business problem, data, approach and the alternatives you rejected, evaluation, deployment, and the measured result.
  • Be clear about what you did yourself and what the team did.
  • Prepare for follow-ups: why that model, why that metric, what went wrong, what you’d do differently.
  • Choose a project where you can discuss trade-offs and a mistake, not just a final score.

How would you approach an open-ended business problem, such as reducing customer churn?

What they’re checking: They’re testing structure and judgement: whether you clarify the decision first, consider simple approaches, and remember that a prediction only matters if someone acts on it.

  • Ask who will use the output and what action they’ll take; that decides the framing.
  • Pin down the definitions, such as what counts as churn and when you’d know.
  • Propose a simple baseline before any model, and a way to measure the real business impact.
Sample answer

I’d start by pinning down the decision the work should support, because “reduce churn with data” could mean many things. Who will act on the output, and how: a retention offer, a product change, a call from an account manager? That decides the framing: a prediction, a segmentation, or a causal question about what drives churn. Then I’d agree a success metric with the business and check what data exists, including how churn is defined and when we’d know it happened. Before any model, I’d do some descriptive analysis and set a simple baseline, like a rule based on recent inactivity, because it might be good enough, or show where the signal is. If a model is justified, I’d build it, compare it with the baseline offline, then test the intervention properly with a holdout group, since predicting churn and preventing it aren’t the same thing.

How would you monitor a model after it goes into production?

What they’re checking: Models degrade quietly as the world changes. They want to see that you think beyond the notebook to drift, data quality, delayed labels and ownership.

  • Distinguish data drift (the inputs change) from concept drift (the relationship between inputs and outcome changes).
  • Monitor in layers: data quality, input and prediction distributions, model performance once labels arrive, and the business metric.
  • Mention versioning, rollback and a retraining plan, whether scheduled or triggered.
Sample answer

A deployed model can get worse without any change to its code, because the world changes. Data drift is when the inputs shift, say a new customer segment arrives after a marketing campaign. Concept drift is when the relationship itself changes, so the same inputs now lead to different outcomes. There are also plain data problems: a renamed field, a change of units, a pipeline that starts sending nulls. So I’d monitor in layers: data quality checks on the inputs, input and prediction distributions compared with the training data using something like the population stability index, model performance once the true outcomes arrive, and the business metric the model is meant to move. Outcomes often arrive late, so the earlier signals matter. I’d agree alert thresholds and owners, version data and models so we can roll back, and decide whether retraining is scheduled or triggered by drift.

Tell me about a model that didn’t work as expected in production.

What they’re checking: They want honesty, a methodical investigation and a lasting lesson, not a story where nothing went wrong.

  • Pick a real case and say plainly what went wrong, including your own part.
  • Show how you found the root cause rather than guessing.
  • End with what changed in how you work, not just the fix.
Sample answer

At [Company], I built a [model type] to [purpose — for example, predict which orders would be returned]. Offline it clearly beat the baseline on [metric], but after launch [what happened — for example, its live predictions were much weaker than in testing]. I compared the live feature values with the training data and found [the cause — for example, a feature built from data that was only complete after dispatch, so at prediction time it was mostly missing]. I explained the problem to [stakeholders] in plain terms, including my part in it, and [the fix — for example, rebuilt the feature from data available at the time of prediction and retrained]. The second version [result]. Since then I [lesson — for example, check every feature’s availability at prediction time and run a new model in shadow mode before it makes real decisions].

How would you explain a model to non-technical stakeholders?

What they’re checking: A model nobody trusts doesn’t get used. They want to see that you can explain what it does, how good it is, and where it’s weak, without jargon.

  • Lead with the decision it supports, not the algorithm.
  • Express performance in the audience’s terms, using real examples rather than metric names.
  • Show the main factors it relies on, and be clear that these are learned patterns, not proven causes.
Sample answer

I start with what the model does in their terms and the decision it helps with, not the algorithm. For example: “Every Monday, this ranks customers by how likely they are to cancel in the next month, so the retention team can call the highest-risk ones first.” Then I explain how good it is in the same language: “Of the customers in the top group, about [share] actually cancel, compared with [baseline share] across all customers.” I show the main factors it relies on, like a drop in usage or unresolved complaints, with a couple of real examples, and I’m clear that these are patterns it has learned, not proven causes. I also say where it’s weak, such as new customers with little history. Finally, I ask how they’d use it, which usually brings any misunderstanding to the surface.

Questions to ask the interviewer

  • How does the team split its time between modelling, experimentation, analysis and data engineering?
  • How do models get from development into production here, and who maintains them afterwards?
  • How does the team decide whether a model was a success after launch?
  • Who are the main stakeholders, and how are data science projects prioritised?
  • What does the data infrastructure look like, and where are the biggest gaps?
  • What would a strong first six months look like in this role?

Common mistakes

  • Jumping to a complex model before setting a baseline; start simple and show what extra complexity buys.
  • Reporting accuracy on imbalanced data; choose metrics that reflect the cost of each type of error.
  • Describing a p-value as the probability that the result is true; say what it actually measures, and report effect sizes and intervals.
  • Talking only about model scores; connect your work to a decision or a business outcome.
  • Skipping over data problems and leakage; interviewers trust candidates who explain how they checked.
  • Giving textbook definitions without examples; anchor each concept in a project you’ve worked on.

The day before

  • Explain the core ideas out loud in plain words: bias and variance, regularisation, cross-validation, precision and recall, p-values and power.
  • Prepare two projects in depth, including the alternatives you considered, how you evaluated them, a mistake, and the result.
  • Practise a few Python data-manipulation and SQL problems, talking through your approach as you go.
  • Rehearse one open-ended case, such as reducing churn or detecting fraud, from framing the problem to measuring impact.
  • Look at the company’s product and think about where data science could help and what data they are likely to have.
  • For a remote interview, check your internet, microphone, and access to any shared notebook or editor link you’ve been sent.
Practise these questions out loud

Lucimeet’s AI interviewer asks you the questions, listens to your answers, asks follow-ups and scores each one — then shows a better way to say it. Your first interview is free.