Skip to content
Resume Studioby M2Toolkit

9 role-specific questions

Data Scientist Interview Questions & Answers

Data science interviews cover machine learning fundamentals, choosing and evaluating models, feature engineering, statistics, and getting models into production responsibly.

Free, no sign-up. 82 questions in this role's practice pool, including behavioural, HR and situational questions.

Data science & machine learning interview questions

Modelling, evaluation, overfitting, features, experimentation and ML in production.

  1. 1.

    What is overfitting, and how do you prevent it?

    BeginnerTechnical

    What the interviewer is evaluating

    Core ML understanding.

    Key points a strong answer covers

    • Definition. The model learns noise in the training data and fails to generalise.
    • Detect. A gap between training and validation performance; cross-validation.
    • Regularisation. Regularisation (L1/L2, dropout).
    • Simpler model / more data. Simpler models, feature selection, more data, early stopping.
    • Bias–variance. It's the variance side of the bias–variance trade-off.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Tuning on the test set.
    • Not mentioning validation.

    Likely follow-up questions

    • How does cross-validation help?
    • What's data leakage, and how does it look like overfitting's opposite?
    Example strong answer

    Overfitting is when a model learns the training data too closely — including its noise — so it performs very well on training data but poorly on new data. I detect it by comparing training and validation performance, ideally with cross-validation; a big gap is the warning sign. To prevent it: start with a simpler model, select fewer, better features, add regularisation like L1 or L2 or dropout in neural networks, use early stopping, limit depth in tree models, and get more or augmented data. It's the high-variance side of the bias–variance trade-off; underfitting is the opposite. And the test set stays untouched until the very end, so I'm not overfitting to it through tuning.

    Practise this question and get feedback
  2. 2.

    How do you choose an evaluation metric for a classification model? Discuss imbalanced data.

    IntermediateTechnical

    What the interviewer is evaluating

    Metric choice tied to the business problem.

    Key points a strong answer covers

    • Accuracy misleads. Accuracy misleads on imbalanced data.
    • Precision & recall. Precision and recall, depending on the cost of each error type.
    • F1 / PR-AUC / ROC-AUC. F1, PR-AUC (better for rare classes), ROC-AUC.
    • Threshold & business cost. Pick a threshold based on business costs.
    • Handling imbalance. Class weights or resampling.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Reporting 99% accuracy on a 1% fraud dataset.
    • Ignoring the decision threshold.

    Likely follow-up questions

    • When is recall more important than precision?
    • Why can ROC-AUC look good on very imbalanced data?
    Example strong answer

    I start from the cost of each kind of error. With imbalanced data accuracy is misleading — if 1% of transactions are fraud, predicting 'not fraud' every time is 99% accurate and useless. So I look at precision — of the cases we flag, how many are right — and recall — of the real cases, how many we catch. For fraud or medical screening, missed cases are expensive, so recall matters more, with precision kept high enough that reviewers aren't overwhelmed. I use the precision-recall curve and PR-AUC, which is more informative than ROC-AUC for rare classes, then choose the decision threshold with the business based on the costs. Class weights or resampling can help the model learn the minority class.

    Practise this question and get feedback
  3. 3.

    How do you approach feature engineering?

    IntermediateTechnical

    What the interviewer is evaluating

    Practical modelling skill.

    Key points a strong answer covers

    • Domain understanding. Start from domain knowledge and hypotheses.
    • Transformations. Scaling, log transforms, encoding categories, date parts, interactions.
    • Missing values. Impute missing values and add missing indicators.
    • Avoid leakage. Avoid leakage: only use information available at prediction time; fit transforms on training data.
    • Validate value. Check features actually improve validation performance.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Using features that wouldn't exist at prediction time.
    • Fitting scalers on the full dataset.

    Likely follow-up questions

    • Give an example of target leakage.
    • How would you encode a category with 10,000 values?
    Example strong answer

    I start with domain understanding — what drives the outcome — and form hypotheses, then turn raw data into signals. For churn, that might be days since last login, trend in usage over the last four weeks, number of support tickets, and plan changes. Typical transformations: log-transforming skewed amounts, extracting day of week or month from dates, encoding categories with one-hot or target encoding for high cardinality, and interaction features. Missing values are imputed, often with an indicator flag because missingness can be informative. The biggest risk is leakage, so every feature must be computable at prediction time, and transformations are fitted only on the training data inside a pipeline. I keep features that improve validation performance and drop the rest.

    Practise this question and get feedback
  4. 4.

    How do you choose which model to use for a problem?

    IntermediateTechnical

    What the interviewer is evaluating

    Pragmatism and trade-off thinking.

    Key points a strong answer covers

    • Baseline first. Start with a simple baseline.
    • Data type & size. Consider the data type and size: gradient boosting for tabular, deep learning for images/text.
    • Interpretability. Interpretability requirements.
    • Operational constraints. Latency, cost and maintenance constraints.
    • Compare with validation. Compare candidates on a proper validation setup.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Jumping straight to deep learning for small tabular data.
    • No baseline to compare against.

    Likely follow-up questions

    • Why do gradient-boosted trees often win on tabular data?
    • When would you accept a less accurate but more interpretable model?
    Example strong answer

    I always start with a simple baseline — a heuristic or logistic regression — so I know what 'good' means. Then I consider the data: for structured tabular data, gradient-boosted trees like XGBoost or LightGBM are usually the strongest; for images, audio or text, deep learning or pre-trained models. Interpretability matters a lot in credit or healthcare, where a slightly less accurate but explainable model can be the right call. Operational constraints count too: latency, inference cost, how often it must retrain, and who will maintain it. I compare candidates on the same cross-validation setup and metric, and I prefer the simplest model that meets the requirement.

    Practise this question and get feedback
  5. 5.

    What changes when you take a model from a notebook to production?

    AdvancedTechnical

    What the interviewer is evaluating

    MLOps awareness: what it takes for a model to keep working after the notebook.

    Key points a strong answer covers

    • Reproducible pipelines. Reproducible training pipelines with versioned data, code and models.
    • Serving. Batch or real-time serving with latency requirements.
    • Monitoring & drift. Monitor inputs, predictions and performance for drift.
    • Retraining. Retraining on a schedule or trigger.
    • Testing & rollout. Tests, shadow/canary rollouts and rollback; fairness checks.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Training and serving features computed differently.
    • No monitoring after deployment.

    Likely follow-up questions

    • What's training–serving skew?
    • How would you detect that a model has degraded?
    Example strong answer

    A notebook proves an idea; production needs reliability. Training becomes a reproducible pipeline with versioned data, code and model artefacts, so any model can be rebuilt. Features must be computed the same way at training and serving time, otherwise you get training–serving skew — a feature store or shared code helps. Serving is either batch scoring or a real-time API with latency and scaling requirements. Before full rollout I'd run the new model in shadow mode or as a canary against the current one. After launch I monitor input distributions for data drift, prediction distributions, and actual performance as labels arrive, with alerts and a retraining schedule or trigger — plus checks for bias across groups.

    Practise this question and get feedback
  6. 6.

    Explain a machine learning model to a non-technical stakeholder.

    IntermediateHR

    What the interviewer is evaluating

    Communication of complex ideas.

    Key points a strong answer covers

    • Plain language. Plain language and an analogy.
    • What it does & doesn't. What it predicts and its limits.
    • Business impact. What it means for their decisions.
    • Trust & drivers. The main drivers, with a concrete example.

    Suggested answer structure

    1. Answer directly in one or two sentences.
    2. Back it up with one specific example.
    3. Connect it to this role and this company.

    Common mistakes

    • Explaining the algorithm instead of the outcome.
    • Overselling accuracy.

    Likely follow-up questions

    • How would you explain a false positive?
    • How do you build trust in a model's recommendations?
    Example strong answer

    I focus on what it does for them, not how it works. For a churn model I'd say: 'Every week it looks at how each customer has been using the product — logins, support tickets, plan changes — and gives each a score for how likely they are to cancel in the next month. It's like an experienced account manager's gut feeling, but applied consistently to all 20,000 customers.' I'd explain the main drivers with a real example, be clear it's a probability, not a certainty — of the 100 customers it flags as highest risk, about 40 would cancel without action — and connect it to their decision: which customers the success team should call first. Then I'd suggest measuring whether those calls actually reduce churn.

    Practise this question and get feedback
  7. 7.

    Explain p-values and confidence intervals in simple terms.

    IntermediateTechnical

    What the interviewer is evaluating

    Statistical literacy.

    Key points a strong answer covers

    • p-value meaning. The probability of results at least this extreme if there were no real effect.
    • Not the probability it's true. It's not the probability that the hypothesis is true.
    • Confidence interval. A range of plausible values for the true effect.
    • Practical significance. Statistical significance isn't practical significance.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Saying a p-value is the probability the null hypothesis is true.
    • Ignoring effect size.

    Likely follow-up questions

    • Why is a confidence interval often more useful than a p-value?
    • What does 'statistically significant' not tell you?
    Example strong answer

    A p-value answers: if there were really no effect, how surprising would results at least this extreme be? A p-value of 0.03 means that, assuming no real difference, we'd see a difference this big about 3% of the time by chance. It is not the probability that our hypothesis is true or false — that's the most common misreading. A confidence interval gives a range of plausible values for the true effect: 'the new page lifts conversion by between 0.5 and 2.5 percentage points', at 95% confidence. I find intervals more useful because they show the size and uncertainty of the effect, and a statistically significant result can still be too small to matter for the business.

    Practise this question and get feedback
  8. 8.

    How would you evaluate an application built on a large language model?

    AdvancedTechnical

    What the interviewer is evaluating

    Modern ML evaluation practice.

    Key points a strong answer covers

    • Define tasks & criteria. Define the tasks and what good looks like.
    • Evaluation set. Build a representative evaluation set with expected outputs.
    • Automated + human. Automated checks, model-graded rubrics validated by human review.
    • Failure modes. Hallucination, safety, bias, prompt injection.
    • Monitor in production. Monitor quality, cost and latency; regression-test prompt and model changes.

    Suggested answer structure

    1. Define it in one sentence.
    2. Explain how it works underneath.
    3. Give a practical example from code or a project.
    4. Close with a trade-off, pitfall or when you'd use it.

    Common mistakes

    • Judging quality from a handful of manual chats.
    • No regression tests when prompts change.

    Likely follow-up questions

    • How do you validate an LLM-as-judge grader?
    • How would you test for prompt injection?
    Example strong answer

    I'd define the tasks and success criteria first — for a support assistant: correct, grounded in our help articles, polite, and escalating when unsure. Then build an evaluation set of realistic inputs, including hard and adversarial cases, with expected answers or rubrics. Some checks are automatic: format, citations to real sources, refusing out-of-scope requests. For open-ended quality I'd use model-graded rubrics, but validate them against human ratings on a sample. I'd specifically test failure modes: hallucinations, unsafe content, bias and prompt injection. Every prompt or model change runs against the eval set as a regression test, and in production I monitor user feedback, escalation rates, cost and latency.

    Practise this question and get feedback
  9. 9.

    Tell me about a data science project from start to finish.

    IntermediateBehavioural

    What the interviewer is evaluating

    End-to-end ownership and impact.

    Key points a strong answer covers

    • Problem framing. The business problem and how you framed it.
    • Data & approach. Data, features and approach.
    • Your role. What you did personally.
    • Result & impact. The measurable outcome.
    • Learning. What you learned.

    Suggested answer structure

    1. Situation — one or two sentences of context.
    2. Task — what you were responsible for.
    3. Action — what you did, step by step (say “I”).
    4. Result — what changed, with a number if you can back it up.
    5. Reflection — what you learned or would do differently.

    Common mistakes

    • Focusing on the algorithm and not the business outcome.
    • No clear personal contribution.

    Likely follow-up questions

    • What would you do differently?
    • How did you know the model was good enough to ship?
    Example strong answer (a fictional story — use your own)

    At a subscription meal-kit company, retention was falling and the team wanted to know whom to target with offers. I framed it as predicting which customers would cancel within 30 days. I owned the project with an analyst from marketing. I built features from order history, skips, delivery issues and support contacts, started with a logistic regression baseline, and moved to LightGBM, which improved PR-AUC from 0.31 to 0.44. The key insight was that two consecutive skipped weeks was the strongest signal. We ran a randomised test: customers flagged and offered a flexible pause cancelled 18% less than the control group. I'd involve the marketing team earlier next time, because designing the intervention took longer than the model.

    Practise this question and get feedback

Behavioural & HR questions you'll also get

These come up in almost every data scientist interview. Story questions are best answered with STAR — Situation, Task, Action, Result.

  • Tell me about yourself.

    BeginnerHR

    What the interviewer is evaluating

    Whether you can give a concise, relevant pitch that frames your experience around this job.

    Key points a strong answer covers

    • Present. Start with your current role and what you do.
    • Relevant past. Pick the most relevant past experience.
    • Strength / achievement. Include one strength or achievement with evidence.
    • Why this role. Finish with why this role is the next step.

    Suggested answer structure

    1. Present — your current role in one or two sentences.
    2. Past — the experience most relevant to this job.
    3. Proof — one achievement or strength with evidence.
    4. Future — why this role is the logical next step.

    Common mistakes

    • Reciting your whole CV chronologically.
    • Personal life story unrelated to the job.
    • Going over two minutes.

    Likely follow-up questions

    • Why are you looking to leave your current role?
    • What would your manager say is your biggest strength?
    Example strong answer

    I'm a front-end developer with four years' experience, currently at a fintech start-up where I build the customer dashboard in React and TypeScript. Before that I spent two years at an agency building e-commerce sites, which taught me to work fast with lots of different clients. The thing I'm proudest of recently is leading our move to a shared component library, which cut the time to build new screens by about a third. I'm now looking for a role where I can work on a larger product with a strong design system, which is exactly what drew me to this position.

  • Why should we hire you?

    BeginnerHR

    What the interviewer is evaluating

    Whether you understand the role and can match your strengths to its needs with evidence.

    Key points a strong answer covers

    • Role's needs. Show you understand what the role needs.
    • Matching strengths. Match two or three strengths to those needs.
    • Evidence. Back each with evidence.
    • Enthusiasm. Close with genuine enthusiasm.

    Suggested answer structure

    1. Name the two or three things the role needs most.
    2. Match each with your experience and evidence.
    3. Add what makes you different.
    4. Finish with genuine interest.

    Common mistakes

    • Generic claims like 'I'm hardworking' with no evidence.
    • Comparing yourself to other candidates you don't know.

    Likely follow-up questions

    • What would you do in your first 90 days?
    • What's one area where you'd need support?
    Example strong answer

    From the job description and our conversation, you need someone who can take ownership of the customer onboarding process, work with sales and product, and improve the numbers. I've done exactly that for three years: at my current company I redesigned onboarding for new accounts and cut the time to first value from 14 days to 6. I'm comfortable working across teams — I run a weekly session with sales and product on customer feedback — and I'm very data-driven, so I'd measure everything from day one. I'm also genuinely excited about your product, because it solves a problem I've seen customers struggle with.

  • Tell me about a time you disagreed with a teammate. How did you handle it?

    BeginnerBehavioural

    What the interviewer is evaluating

    Handling conflict constructively and keeping relationships.

    Key points a strong answer covers

    • Listened to their view. Show you listened to understand their view.
    • Used facts / common goal. Bring it back to facts or a shared goal.
    • Resolution & relationship. Resolve it and keep the relationship.

    Suggested answer structure

    1. Situation — one or two sentences of context.
    2. Task — what you were responsible for.
    3. Action — what you did, step by step (say “I”).
    4. Result — what changed, with a number if you can back it up.
    5. Reflection — what you learned or would do differently.

    Common mistakes

    • Making the other person the villain.
    • A story where you were simply right and they gave in.

    Likely follow-up questions

    • What if you couldn't reach agreement?
    • Have you ever been wrong in a disagreement?
    Example strong answer (a fictional story — use your own)

    On a website rebuild, a senior designer wanted an animated, image-heavy homepage, and I was worried it would hurt mobile load times and SEO. As the developer responsible for performance, I needed us to agree before the sprint started. I asked her to walk me through what she was trying to achieve — she wanted the brand to feel premium. I built two quick prototypes, one with her full design and one with lighter animations, and we tested both on a mid-range phone together. Hers took nearly six seconds to load. We agreed on a version that kept the key animation but lazy-loaded the rest. The page launched loading in under two seconds, and she later asked me to review designs earlier. I learned that testing together beats debating.

  • Tell me about a mistake you made and what you learned.

    BeginnerBehavioural

    What the interviewer is evaluating

    Honesty, accountability and learning.

    Key points a strong answer covers

    • Real mistake owned. Own a real mistake.
    • Fixed it. Show how you fixed it and who you told.
    • Changed behaviour. Show what you changed afterwards.

    Suggested answer structure

    1. Situation — one or two sentences of context.
    2. Task — what you were responsible for.
    3. Action — what you did, step by step (say “I”).
    4. Result — what changed, with a number if you can back it up.
    5. Reflection — what you learned or would do differently.

    Common mistakes

    • Choosing a fake mistake like 'I work too hard'.
    • Blaming others.

    Likely follow-up questions

    • How did your manager react?
    • How do you know you haven't repeated it?
    Example strong answer (a fictional story — use your own)

    In my first year as a marketing coordinator, I sent a promotional email to our whole list with the wrong discount code — I'd tested the email but not clicked the code itself. Within an hour customers were complaining that it didn't work. I told my manager immediately, set the wrong code to apply the discount too, and sent a short correction email with an apology. We lost very little revenue, and some customers replied thanking us for the quick fix. Since then I use a pre-send checklist that includes testing every link and code as a customer would, and I asked for a second person to check any campaign to more than 10,000 people.

  • Describe a situation where you worked under pressure or to a tight deadline.

    BeginnerBehavioural

    What the interviewer is evaluating

    Prioritisation, composure and delivery.

    Key points a strong answer covers

    • The pressure. Make the pressure concrete.
    • Prioritised. Show how you prioritised.
    • Communicated. Show how you kept people informed.
    • Delivered. Show the outcome.

    Suggested answer structure

    1. Situation — one or two sentences of context.
    2. Task — what you were responsible for.
    3. Action — what you did, step by step (say “I”).
    4. Result — what changed, with a number if you can back it up.
    5. Reflection — what you learned or would do differently.

    Common mistakes

    • Glorifying working all night as the solution.
    • No mention of prioritising.

    Likely follow-up questions

    • What would you do if it was clear you couldn't make the deadline?
    • How do you stop pressure affecting quality?
    Example strong answer (a fictional story — use your own)

    Two days before a client presentation, our analyst fell ill and I had to finish the market research report she'd been leading. I listed everything left and asked the account director which sections the client cared about most — pricing and competitor comparison. I focused on those, reused verified data from our previous report, and moved the appendix to a follow-up email. I sent a short update each evening so nobody was surprised. We delivered the core report on time, the client approved the next phase, and the appendix followed two days later. I learned to ask early what matters most rather than trying to do everything equally well.

  • What would you do if you realised you were going to miss a deadline?

    BeginnerSituational

    What the interviewer is evaluating

    Transparency and problem solving.

    Key points a strong answer covers

    • Tell people early. Flag it as soon as you know.
    • Assess the gap. Work out how far off you are.
    • Options. Offer options: reduced scope, help, a new date.
    • Prevent repeats. Learn why it happened.

    Suggested answer structure

    1. Clarify the situation and what's at stake.
    2. Say what you'd do first, and why.
    3. Explain who you'd involve and how you'd communicate.
    4. Describe how you'd check the outcome and prevent a repeat.

    Common mistakes

    • Waiting until the deadline to say anything.
    • Promising you'll just work all night.

    Likely follow-up questions

    • What if your manager is unavailable?
    • Has this happened to you?
    Example strong answer

    I'd tell the person depending on it as soon as I realised, not at the deadline. Before that conversation I'd work out how far off I am and why, so I could offer options: delivering the most important part on time and the rest a few days later, getting help from a colleague, or agreeing a new date. Then I'd let them decide what works best for them, and keep them updated. Afterwards I'd look at why it slipped — usually underestimating something — so I plan better next time.

Ready to answer them out loud?

Run a timed data scientist mock interview, type or speak your answers, and get a score breakdown with what to improve.

Interview questions for related roles