Asked about Probability by simulation

A test is 99% sensitive with a 5% false positive rate for a condition with 1% prevalence. What is the chance a positive result is correct?

An answer that works

About 17%. Out of 10,000 people, 100 are sick and 99 test positive; of 9,900 healthy people, 495 test positive. So 99 of 594 positives are real.

Then they push further

How does this apply to machine learning?

Any classifier for a rare event has the same problem: a small false positive rate applied to a huge number of negatives produces more false alarms than true detections. Precision at the operating point is what users experience.

What gets marked up

Working with counts of people out loud, rather than recalling Bayes' formula, is the clearest way to get this right under pressure.

Reading an answer is not being able to give one. The section that teaches this is Probability by simulation, 4 hours of Probability & statistics.

Learn this properly