Explain the trade-off between precision and recall, and how you would pick a threshold for a real model.
What the interviewer wants to hear
- Precision is the share of flagged cases that are truly positive
- Recall is the share of real positives that get flagged
- Raising the threshold usually raises precision and lowers recall
- Pick the threshold from the business cost of each error type
- Use a precision-recall curve to see the options
Model answer
Precision asks: of everything the model flagged, how much was really positive? Recall asks: of all real positives, how many did we catch? Most models output a score, and the threshold decides what counts as a positive. If I raise the threshold, I flag fewer cases, so precision usually goes up and recall goes down. Lowering it does the opposite. There is no universally right point. I would plot the precision-recall curve and talk to the business about the cost of each mistake. For fraud review, a missed fraud might cost hundreds of dollars while a false alarm costs a few minutes of an analyst, so I would favour recall up to the team review capacity. For an email that tells customers their account is suspended, false positives are very costly, so I would favour precision. F1 is a handy summary when costs are similar.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Data Scientist questions
- Explain what a p-value is to a product manager, and one common way it is misunderstood.
- When would you report the median instead of the mean? Give a business example.
- What is the difference between correlation and causation? How would you test if a change causes an outcome?
- How do you handle missing values in a dataset?
- How do you present a data analysis to non-technical stakeholders?
- What is the central limit theorem and why does it matter for everyday analysis work?
- You receive a new, messy dataset for an analysis. What are your first steps before any modelling?
- How do you choose the right chart to present a finding to senior leaders?
- Why do we split data into training, validation and test sets? How do you decide how to split?