What does the test say?
A doctor suspects a disease in their patient, so they run a medical test. The test's manufacturer claims that 99% of sick patients test positive, while the doctor has observed that the test comes back positive in 2% of all cases. The suspected disease is quite rare: only 1 in 1000 people suffer from it.
The test result came back positive. What is the probability that the patient is indeed sick? You can use Bayes' Theorem to answer this question. Here is what you should calculate:
$$P(\text{sick}|\text{positive}) = \frac{P(\text{positive}|\text{sick}) * P(\text{sick})}{P(\text{positive})}$$
Feel free to do the calculations in the console.
This exercise is part of the course
Bayesian Data Analysis in Python
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
