FDEInterviews logo
Machine Learning & Data Science / 01
easy★ EssentialGoogleScaleMicrosoft

Explain precision, recall and F1, and which one matters for a fraud-detection customer?

Every FDE loop opens with this, but the definitions are table stakes. What gets scored is whether you can map each metric to a dollar cost the customer recognizes, here's the framing that does it.

Updated Sep 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

TL;DR: Precision and recall are two ways of being wrong that cost the customer different dollars, so price each error first, then pick recall-at-a-precision-floor (or F-beta), almost never F1. For fraud the usual call is recall-first capped by the review queue the ops team can staff.

How to approach it

Don't recite formulas first. Open by anchoring the two error types to the customer's business: "Precision and recall are two ways of being wrong, and they cost the customer different amounts of money. Which mistake is more expensive here?" Then give crisp definitions: precision = of everything we flagged, what fraction was actually fraud (TP / (TP + FP)); recall = of all real fraud, what fraction we caught (TP / (TP + FN)). F1 is their harmonic mean, a single number when you must balance both.

A strong answer

Work a micro-example. A bank processes 100,000 transactions a day; 100 are fraudulent (0.1%). Your model flags 500 transactions and 80 of them are real fraud:

  • Precision = 80/500 = 16%, for every true catch, ~5 legitimate customers get their card declined.
  • Recall = 80/100 = 80%, 20 frauds slip through.

Now translate: a missed fraud costs ~$500 in chargebacks; a false decline costs ~$10 in support time plus churn risk. Missed fraud: 20 × $500 = $10,000/day. False positives: 420 × $10 = $4,200/day. Recall is currently the bigger lever, but say explicitly that this flips if false declines drive cardholders to a competitor. For fraud, you typically optimize recall at a precision floor the operations team can staff for: "the review queue can absorb 500 alerts/day, so we pick the threshold that maximizes recall subject to that."

The threshold is the dial that makes this a decision instead of a fact, and sweeping it on the same illustrative bank shows why. Keep the model fixed and move only the cutoff (all arithmetic below is computed from the stated counts):

ThresholdFlags/dayCaught (of 100)PrecisionMissed-fraud costFalse-positive costTotal/day
Loose2,000954.8%$2,500$19,050$21,550
Middle5008016%$10,000$4,200$14,200
Strict2006030%$20,000$1,400$21,400

The same model produces a $21,550 day, a $14,200 day, or a $21,400 day depending on one number nobody trained. Both extremes lose: loose drowns in false-positive handling cost, strict bleeds chargebacks, and the middle wins here only because of the specific $500-to-$10 cost ratio, so when the customer's costs change, the right threshold moves. Notice also that the loose row is infeasible regardless of its economics if the ops team can only review 500 alerts a day; the review queue is a constraint the PR curve knows nothing about. Walking an interviewer through a table like this, even with rounder numbers, is the difference between knowing the definitions and owning the operating point.

Then generalize the decision rule: recall-first when misses are catastrophic (fraud, medical screening, contract risk clauses); precision-first when false positives erode trust or burn human time (spam filtering, lead scoring, auto-actions with no human review). F1 only when the costs are symmetric, which, in real deployments, is rare. Saying "I almost never optimize F1 in production; I pick an operating point on the precision-recall curve with the customer" reads senior.

The domains in this answer and which way each tilts:

DomainOptimize forWhy (cost of the wrong error)
FraudRecall at a precision floorMissed fraud ~$500 chargeback vs ~$10 false decline; queue caps the floor
Medical screeningRecallA missed case is catastrophic
Spam filteringPrecisionFalse positives erode trust
Lead scoringPrecisionFalse positives burn human time

What interviewers probe next

  • "Why harmonic mean for F1, not arithmetic?", it punishes imbalance: precision 1.0 + recall 0.01 gives F1 ≈ 0.02, not 0.5. A model that flags everything can't game it.
  • "How do you move along the tradeoff?", the classification threshold. The model is fixed; the operating point is a business decision you revisit with the customer.
  • "Accuracy here?", 99.9% by predicting 'not fraud' for everything. Name the accuracy trap before they ask.
  • "Who sets the threshold?", you, jointly with the customer's ops lead, based on queue capacity and error costs. FDE answers always name the human owner.

Common mistakes

Reciting TP/FP definitions and stopping, that's a flashcard, not an answer. Defaulting to "F1 balances both" without asking whether the costs are balanced. Forgetting the base rate, so the worked numbers don't hang together. And never mentioning the threshold: candidates who treat precision/recall as fixed properties of a model, rather than a dial you set with the customer, fail the production-readiness sniff test.

Key takeaways

  • Price both error types in dollars before naming any metric; the cost ratio picks the metric, not the other way around.
  • F1 encodes equal error costs, which production rarely has; reach for recall-at-a-precision-floor or F-beta instead.
  • The threshold is a business dial set jointly with the customer's ops lead, sized to review-queue capacity, not a fixed model property.
That one was free — and so are 10 answers per topic without an account. Signing in doubles that to 20, opens the Plus lessons in the courses, and remembers which topics you keep getting wrong.no card · Google sign-in · nothing to cancel
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 10 to 20 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

The follow-up that does the real grading is 'a blocked legitimate transaction costs us a furious customer, a missed fraud costs us the chargeback, so what do you optimize?' and the move is to put a dollar figure on each before naming a metric. F1 is the answer that sounds balanced and quietly fails here, because equal weighting is exactly wrong when the two errors cost different amounts; reach for F-beta or a chosen operating point on the PR curve instead.

DISCUSSION · 0

No comments yet — be the first to share your approach.