If an email filtering system has a 5% chance of falsely marking a legitimate email as spam and a 1% chance of letting a spam email through, what is the probability of a flagged email being legitimate if 10% of incoming emails are spam?

Instruction: Calculate the probability that an email marked as spam is actually a legitimate email, given the error rates and spam frequency.

Context: This question assesses the candidate's understanding of conditional probability and real-world application.

Updated

Official answer

The 1% spam escape rate matters: it means 99% of spam is flagged. Using an illustrative population of 10,000 emails with the stated proportions:

  • 9,000 are legitimate; 5% of those, or 450, are flagged.
  • 1,000 are spam; 99% of those, or 990, are flagged.

Thus 1,440 emails are flagged and 450 are legitimate. P(legitimate | flagged) = 450/1440 = 0.3125 = 31.25%.

Equivalently, Bayes' rule gives (0.05×0.90)/(0.05×0.90 + 0.99×0.10). The 5% false-positive rate conditions on legitimate mail; it is not the fraction of flagged mail that is legitimate. These calculations assume the supplied prevalence and error rates apply to the same incoming population.

Related Questions