Probability a flagged email is spam given a 99% true positive rate, 2% false positive rate and 10% spam rate

Quick Overview

A Bayes' theorem problem about a spam classifier with a known true positive rate, false positive rate and spam rate. Tests whether you can turn detection rates into the probability that a flagged email is really spam and explain why the base rate matters.

Probability a flagged email is spam given a 99% true positive rate, 2% false positive rate and 10% spam rate

Role: Data Scientist

Category: Statistics & Math

Difficulty: easy

Interview Round: Other

A model detects spam with a 99% true positive rate but a 2% false positive rate, and only 10% of emails are spam. What is the probability that an email flagged as spam is actually spam? ```hint Count every flag Before conditioning on the flag, work out what fraction of all email gets flagged, counting flags on spam and flags on legitimate mail separately. ``` ### What a Strong Answer Covers - The three inputs: the spam rate, the true positive rate and the false positive rate. - The overall flag rate from the law of total probability. - Bayes' theorem applied to get the posterior, stated as a probability or percentage. - Why the answer is well below 99%, explained through the size of the legitimate email pool. ### Follow-up Questions - How does the answer change if spam is only 1% of email? - Which would raise the share of correct flags more here: a 100% true positive rate or a 1% false positive rate? - Two independent filters with these same rates both flag an email. What is the probability it is spam? - How would you set the flagging threshold if sending a legitimate email to the spam folder costs much more than letting a spam email through?

Overview: A Bayes' theorem problem about a spam classifier with a known true positive rate, false positive rate and spam rate. Tests whether you can turn detection rates into the probability that a flagged email is really spam and explain why the base rate matters.

Nov 25, 2026
easyData ScientistOtherStatistics & Math
0
0

A model detects spam with a 99% true positive rate but a 2% false positive rate, and only 10% of emails are spam. What is the probability that an email flagged as spam is actually spam?

What a Strong Answer Covers Guidance

  • The three inputs: the spam rate, the true positive rate and the false positive rate.
  • The overall flag rate from the law of total probability.
  • Bayes' theorem applied to get the posterior, stated as a probability or percentage.
  • Why the answer is well below 99%, explained through the size of the legitimate email pool.

Follow-up Questions Guidance

  • How does the answer change if spam is only 1% of email?
  • Which would raise the share of correct flags more here: a 100% true positive rate or a 1% false positive rate?
  • Two independent filters with these same rates both flag an email. What is the probability it is spam?
  • How would you set the flagging threshold if sending a legitimate email to the spam folder costs much more than letting a spam email through?