2.7 - Bayes' Theorem
2.7 - Bayes' TheoremExample 2-10: Jury Trial
In a jury trial, suppose the probability the defendant is convicted, given guilt, is 0.95, and the probability the defendant is acquitted, given innocence, is 0.95. Suppose that 90% of all defendants truly are guilty. Find the probability the defendant was actually innocent given the defendant is convicted. The video will step you through this example.
Video: Jury Trial Example
Answer
Let Guilty =
Innocent =
Acquitted =
Convicted =
Need to find:
The above example illustrates the use of Bayes' theorem to find "reverse" conditional probabilities.
Suppose we have events
Applying this to just two events A and B we have...
Example 2-11: Screw Manufacturing
A company creates their product using a specially made screw. For financial purposes, the company gets their screws from three different manufacturers. If a screw is defective, it can cause a lot of damage. Here is the table of the proportion of screws from each manufacturer and the probability of obtaining a defective screw.
Manufacturer | Probability of Company's Screws | Probability of Defective Screw |
---|---|---|
A | 0.40 | 0.01 |
B | 0.25 | 0.02 |
C | 0.35 | 0.015 |
If a screw is found to be defective, what is the probability that it came from Manufacturer C?
Answer
Let D denote a defective screw. We want
Practical Application: Bayes' Theorem in Diagnostic Testing
In diagnostic testing (e.g. drug tests), there are five key concepts:
- Prevalence
-
Prevalence is the probability or proportion of occurrence of a disease or behavior in the population at a particular point in time.
- Example: Proportion of bus drives who use illegal drugs
- Sensitivity and Specificity
-
- Sensitivity is the probability of a positive result given person is actually positive.
- Example: the probability of a home pregnancy test coming up positive for a woman who is actually pregnant
- Specificity is the probability of a negative result given person is actually negative.
- Example: the probability of a home pregnancy test coming up negative for a woman who is not pregnant
- Sensitivity is the probability of a positive result given person is actually positive.
- False Positives and False Negatives
-
- False Positives are when results come back positive for someone who is actually negative
- Example: a home pregnancy test coming up positive for a woman who is not pregnant
- False Negatives are when results come back negative for someone who is actually positive
- Example: a home pregnancy test coming up negative for a woman who is actually pregnant
- False Positives are when results come back positive for someone who is actually negative
Example 2-12: Diabetes Screening
Consider the following data on a diabetes screening test based on a non-fasting blood screen test, which is relatively inexpensive and painless.
Diabetes? | Positive | Negative | Total |
---|---|---|---|
Yes | 350 | 150 | 500 |
No | 1900 | 7600 | 9500 |
Total | 2250 | 7750 | 10,000 |
Answer
With these results, we see the Sensitivity is 350 out of 500 or 70% and the specificity is 7600 out of 9500 or 80%. The overall prevalence of diabetes is 500 out of 10000 or 5%.
From this test, how many were “missed” (i.e. actually had diabetes – the false negatives) and how many were incorrectly identified as having the disease (i.e. false positives).
The test missed identifying 150 (a false negative rate of 150/500 or 30%) while the false positive rate was 1900/9500 or 20%.
We can see the importance of getting second opinions. What happens with the second opinion (or second test) is that a more expensive and accurate test is used (e.g. a clinical test for pregnancy or a glucose tolerance test for diabetes that requires fasting and a day at a clinic/hospital/doctor’s office). These additional tests are done to verify results before continuing with what can be expensive and uncomfortable treatments.