Today’s Agenda

  • Law of Total Probability
  • Bayes Theorem

Conditional Probability

Recall the definition of conditional probability

\[ P(A|B) = \frac{P(A \text{ and } B)}{P(B)}\]

From which we can easily rearrange to get:

\[P(A|B)\cdot P(B) = P(A \text{ and } B)\]

and

\[P(A|B^c)\cdot P(B^c) = P(A \text{ and } B^c)\]

Law of Total Probability

\[ P(A) = P(A \text{ and } B) + P(A \text{ and } B^c) = P(A|B)\cdot P(B) + P(A|B^c)\cdot P(B^c)\]

Bayes Theorem

\[ P(A |B ) = \frac{P(A \text{ and } B)}{P(B)} = \frac{ P(B|A) \cdot P(A)}{P(B|A) \cdot P(A) + P(B|A^c) \cdot P(A^c)}\]

  1. Lupus is a medical phenomenon where antibiotics that are supposed to attack foreign cells to prevent infections instead see plasma proteins as foreign bodies, leading to a high risk of blood clotting. It is believed that 2% of the popularion suffer form this disease. The test is 98% accurate if a person actually has the disease. The test is 74% accurate if a person does not have the disease. There is a line from the TV show “House” where after a person tests positive for lupus the doctor says: “It’s never lupus”. Find the probability that someone has lupus given that they tested positive for lupus.
(.98)*(.02)/((.98)*(.02) + (.26)*(.98))
## [1] 0.07142857
# IF you test positive for Lupus, there is only a 7% chance that you actually have.
  1. The accuracy of the lie detector polygraph test is often questioned. Several reports say that a polygraph is about \(95 \%\) accurate at determining if a person is telling a truth or a lie. Let’s assume these reports are correct. Let’s also assume that people are generally honest, so there is only a \(1/1000\) chance they are lying. A randomly chosen person takes the test and is determined to be lying, what is the probability that they actually lied?

  2. Suppose \(0.1 \%\) of the population have a new Covid variant and there is a test that is \(96 \%\) accurate. Suppose you test positive, what is the probability you have it?

  3. After an intro to stats course \(80 \%\) of people can draw a box plot. Of those that can draw a boxplot, \(86 \%\) passed while only \(65 \%\) of students that couldn’t draw a boxplot passed. Find the probability that a student who passed can draw a boxplot.