there are good attempts in explaining bayes theorem, such as yudkowsky (long), betterexplained.com (shorter) and wiki. Here, I'll try to show how we can apply it (or rather, avoid the pitfall of not applying it) basing on those.
Let's get to a simplified version of a common example - test detecting drug use.
In hk, some high schools are considering mandatory test to detect drug use.
HYPOTHETICALLY, in hk, 0.1% students are drug users. Let's say we have a test that can detect drug use with 90% accuracy. I have a student here tested positive (meaning test says this student is a drug user). What's the chance of this student being a drug user?
90%, right? The test is 90% accurate, so that's gotta be the answer, right?
No. No. No.
The 1st objective of this post is to prevent you from ever giving this wrong answer again, even if u aren't interested in learning how to get the right answer.
To let u recognize how absurd that answer was, imagine I now have 100 students and I know 99 of them are drug users.
If I randomly pick a student out of this group, we can all agree that there's a 99% chance that this student is a drug user.
Now, if I randomly pick a student out of this group to have him take the same drug test as before and the test result is positive, what's the chance of this student being a drug user?
It's 90% with the rationale (well, the test is 90% accurate) fron the previous answer.
U see now how absurd the answer is, right?
Basically,
- we know the student has a 99% chance of being a drug user
- the drug test (90% accurate) he takes confirms it
- yet, we actually DECREASE his probability being a drug user from 99% to 90% after the test!
That's absurd!
INTUITIVELY, given that we know the student has a 99% chance of being a drug user (prior), a positive result from a reasonably accurate test (90% in this case) confirming the prior should SLIDE the probability even higher (say, 99.xx%) and we should be more sure of this student being a drug user with the test result.
Hopefully, this example will prevent us giving another seemingly logical, but completely absurd answer again.
Essentially, this is saying
- P(tested +| drug user) != P(drug user | tested +)
Will elaborate further in next post.