Bayes’ Theorem: COVID tests
Assume that 0.5% of people have COVID. Suppose a COVID test gives a (true) positive on 96% of patients who have COVID, but gives a (false) positive on 2% of patients who do not have COVID. Bob tests positive. What is the probability that Bob has COVID?
Solution
(1) Label events:
- Event
: Bob is actually positive for COVID - Event
: Bob is actually negative; note - Event
: Bob tests positive - Event
: Bob tests negative; note
(2) Identify known data:
- Know:
- Know:
- Know:
and therefore
We seek:
(3) Translate Bayes’ Theorem:
Set
We know all values on the right except
(4) Denominator: apply Total Probability (Division into Cases):
Observe that
Therefore:
Plug in data and compute:
(5) Plug in and compute:
Intuition - COVID testing
Some people find this low number surprising. In order to repair your intuition, think about it like this: roughly 2.5% of tests are positive, with roughly 2% coming from false positives, and roughly 0.5% from true positives. Only
of all the positive results are true ones! (This rough approximation assumes that
.) If two tests both come back positive, the odds of COVID are now 98%.
If only people with symptoms are tested, so that, say, 20% of those tested have COVID, that is,
, then one positive test implies a COVID probability of 92%.
Inferring bin from marble
There are marbles in bins in a room:
- Bin 1 holds 7 red and 5 green marbles.
- Bin 2 holds 4 red and 3 green marbles.
Your friend goes in the room, shuts the door, and selects a random bin, then draws a random marble. (Equal odds for each bin, then equal odds for each marble in that bin.) He comes out and shows you a red marble.
What is the probability that this red marble was taken from Bin 1?
Solution
(1) Label events:
- Event
: friend chooses Bin 1. - Event
: friend chooses Bin 2. - Event
: friend draws a red marble. - Event
: friend draws a green marble. Answer will be
.
(2) Identify knowns:
- Know
. - Know
. - Know
. - Know
. - Know
.
(3) Apply Bayes’ Theorem for
:: Division into Cases for the denominator:
(3) Plug in data and compute: