LeoMath

Explore

Bayes in screening

A thousand people, split by illness and test result. Change the prevalence, sensitivity and false-positive rate and see what share of positives are really ill; then retest the positives.

  • ill · positive
  • healthy · positive
  • ill · negative
  • healthy · negative
positives 89of them ill 10share (whole people) 10/89 ≈ 0.112
P(ill|+)=P(+|ill)P(ill)P(+)prior → posterior 0.010 → 0.107
Back to the article →

Experiment idea from: github.com/huzhuofan1020-svg/ybs

What did you observe?Play first, then answer. Read the explanation only after you have thought it through.

  1. 1.With the default settings, how many of the positives are actually ill? Why is that share so low when the sensitivity is 95%?
  2. 2.Drag the prevalence from 1% to 20%. How does the posterior change? The test itself has not changed.
  3. 3.Turn on “Retest the positives”. Why does the same test, taken a second time, give a much more reliable answer?
Related concept: Conditioning & Bayes

Discussion

Found a mistake, have a question or a suggestion? You can also write to 620026600@qq.com

No comments yet. Share your understanding, ask a question, or point out an error on this page.

Log in to join the discussion