[MUSIC PLAYING]
JOE BLITZSTEIN: The town of Bayesville has a population of 2000 people.
Jimmy is worried, after reading a news article,
about a disease called conditionitis.
Conditionitis is a serious, but rare, disease
afflicting 1% of the population.
Let's represented healthy people as blue and diseased people as orange.
Jimmy decides to go to the doctor to get tested.
Unfortunately, Jimmy tests positive for the disease.
In other words, the test says that he has conditionitis.
We will represent positive test results with yellow hats.
JIMMY: Could the test be wrong?
DOCTOR: Well, the test is 95% accurate.
JOE BLITZSTEIN: What does this mean for Jimmy?
Note that there are two ways this test could be wrong.
A person could test positive for the disease when they don't have it,
or they could test negative when they do have the disease.
There are also two ways that the tests could be right.
A person who has the disease could test positive,
or a person who does not have the disease could test negative.
Suppose that 95% accurate means if a person has conditionitis,
than 95% of the time they will test positive,
which would be the correct diagnosis.
If the person does not have conditionitis, then 95% of the time
they will test negative, which again would be the correct diagnosis.
In other words, there is a 5% chance of misdiagnosis in each case.
Given this information, how sure are you that Jimmy has the disease?
A. He almost certainly has the disease.
B. He probably has the disease.
C. It's about 50/50 whether he has the disease.
or D. He probably does not have the disease.
Let's imagine that we conduct the test for every single person in Bayesville,
and assign each person who tests positive for conditionitis
a yellow hat.
Recall that healthy people are represented
as blue, diseased people are represented as orange,
and a yellow hat represents a positive test result.
Since the test is not 100% accurate, some
of the people who get hats probably don't actually have conditionitis.
The combination of the test results and the true disease status
classifies our population into four groups--
true negatives, or healthy individuals who are correctly
tested as negative, true positives, or diseased individuals who are correctly
tested as positive, false negatives, or diseased individuals who
are incorrectly tested as negative, and false positives,
or healthy individuals who are incorrectly tested as positive.
If we just look at the negative results, our test seems pretty good.
After all, it only missed one diseased person.
However, looking at the positive test results,
we find that a large majority of the positive test results
are actually false alarms.
This is good news for Jimmy.
His positive test result does increase his chance of being diseased.
But with so many false positives, it turns out
that there's only a 16% chance he's actually sick.
There's an 84% chance he does not have conditionitis.
So Jimmy stops panicking, but decides to get a second opinion just in case.
Did you make the right prediction?
In general, we need to take into account the rarity of a disease,
not just the accuracy of a test.
And we need to distinguish between the probability of having a disease, given
that you test positive, and the probability that you test positive,
given that you have the disease.
[MUSIC PLAYING]