stats

🟢 Stats Repeat: Bayes' Theorem (Third Time)

Without looking at the formula, try this one:

"2% of emails are spam. Your filter catches 97% of spam but also flags 5% of legitimate emails. An email is flagged. Probability it's actually spam?"

Work it out, then check.

Answer:

P(Spam|Flagged) = (0.97 × 0.02) / (0.97 × 0.02 + 0.05 × 0.98)
                = 0.0194 / (0.0194 + 0.049)
                = 0.0194 / 0.0684
                ≈ 28.4%

Higher than the disease examples because the base rate (2%) is much higher than 0.1%.