Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Conditional Probability
I P(A|B) means “the probability of A, given B”
I P(A|B), P(B|A) and P(A ∩ B) all measure the same events.
I For P(A ∩ B) the sample space is the original sample space.I For P(A|B) the sample space is B.I For P(B|A) the sample space is A.
Conditional Probability
I P(A|B) means “the probability of A, given B”I P(A|B), P(B|A) and P(A ∩ B) all measure the same events.
I For P(A ∩ B) the sample space is the original sample space.I For P(A|B) the sample space is B.I For P(B|A) the sample space is A.
Conditional Probability
I P(A|B) means “the probability of A, given B”I P(A|B), P(B|A) and P(A ∩ B) all measure the same events.
I For P(A ∩ B) the sample space is the original sample space.
I For P(A|B) the sample space is B.I For P(B|A) the sample space is A.
Conditional Probability
I P(A|B) means “the probability of A, given B”I P(A|B), P(B|A) and P(A ∩ B) all measure the same events.
I For P(A ∩ B) the sample space is the original sample space.I For P(A|B) the sample space is B.
I For P(B|A) the sample space is A.
Conditional Probability
I P(A|B) means “the probability of A, given B”I P(A|B), P(B|A) and P(A ∩ B) all measure the same events.
I For P(A ∩ B) the sample space is the original sample space.I For P(A|B) the sample space is B.I For P(B|A) the sample space is A.
Life Expectancy
I Suppose that someone who is currently 20 has a 15% chancethat they will live to be 90
I And a 1% chance that they will live to be 100.
I What is the probability that someone who lives to be 90 willlive to be 100?
Life Expectancy
I Suppose that someone who is currently 20 has a 15% chancethat they will live to be 90
I And a 1% chance that they will live to be 100.
I What is the probability that someone who lives to be 90 willlive to be 100?
Life Expectancy
I Suppose that someone who is currently 20 has a 15% chancethat they will live to be 90
I And a 1% chance that they will live to be 100.I What is the probability that someone who lives to be 90 will
live to be 100?
Bayes’ Formula
I Have that P(A|B) = P(A∩B)P(B)
I So P(A|B) · P(B) = P(A ∩ B)
= P(B|A) · P(A).
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
Bayes’ Formula
I Have that P(A|B) = P(A∩B)P(B)
I So P(A|B) · P(B) = P(A ∩ B)
= P(B|A) · P(A).
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
Bayes’ Formula
I Have that P(A|B) = P(A∩B)P(B)
I So P(A|B) · P(B) = P(A ∩ B) = P(B|A) · P(A).
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
Bayes’ Formula
I Have that P(A|B) = P(A∩B)P(B)
I So P(A|B) · P(B) = P(A ∩ B) = P(B|A) · P(A).
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
Bayes’ Formula
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
I We can write P(B) = P(B ∩ A) + P(B ∩ Ac)
= P(B|A) · P(A) + P(B|Ac) · P(Ac)
I Bayes’ Formlua 2:
P(A|B) =P(B|A) · P(A)
P(B|A) · P(A) + P(B|Ac) · P(Ac)
I NOTE: There was an error in the formula last time!!
Bayes’ Formula
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
I We can write P(B) = P(B ∩ A) + P(B ∩ Ac)
= P(B|A) · P(A) + P(B|Ac) · P(Ac)
I Bayes’ Formlua 2:
P(A|B) =P(B|A) · P(A)
P(B|A) · P(A) + P(B|Ac) · P(Ac)
I NOTE: There was an error in the formula last time!!
Bayes’ Formula
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
I We can write P(B) = P(B ∩ A) + P(B ∩ Ac)= P(B|A) · P(A) + P(B|Ac) · P(Ac)
I Bayes’ Formlua 2:
P(A|B) =P(B|A) · P(A)
P(B|A) · P(A) + P(B|Ac) · P(Ac)
I NOTE: There was an error in the formula last time!!
Bayes’ Formula
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
I We can write P(B) = P(B ∩ A) + P(B ∩ Ac)= P(B|A) · P(A) + P(B|Ac) · P(Ac)
I Bayes’ Formlua 2:
P(A|B) =P(B|A) · P(A)
P(B|A) · P(A) + P(B|Ac) · P(Ac)
I NOTE: There was an error in the formula last time!!
Bayes’ Formula
I Bayes’ Formula 1:
P(A|B) =P(B|A) · P(A)
P(B)
I We can write P(B) = P(B ∩ A) + P(B ∩ Ac)= P(B|A) · P(A) + P(B|Ac) · P(Ac)
I Bayes’ Formlua 2:
P(A|B) =P(B|A) · P(A)
P(B|A) · P(A) + P(B|Ac) · P(Ac)
I NOTE: There was an error in the formula last time!!
Testing for a Disease - Revisited
I Consider a disease that affects 11000 people.
I A test produces the results:
I 99% of infected people test positive.“The test is 99% positive”
I 2% of uninfected people also test positive.
I If you test positive, how likely is it that you have the disease?
Testing for a Disease - Revisited
I Consider a disease that affects 11000 people.
I A test produces the results:I 99% of infected people test positive.
“The test is 99% positive”I 2% of uninfected people also test positive.
I If you test positive, how likely is it that you have the disease?
Testing for a Disease - Revisited
I Consider a disease that affects 11000 people.
I A test produces the results:I 99% of infected people test positive.
“The test is 99% positive”I 2% of uninfected people also test positive.
I If you test positive, how likely is it that you have the disease?
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.
I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:
I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:
I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:
I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:
I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease - Revisited
I Let D be the event that the person has the disease.
I Let T be the even that the person tests positive.I We know:
I P(D) = .001I P(T |D) = .99I P(T |Dc) = .02
I We want to know:I P(D|T )
I Using Bayes’ Formula, we get P(D|T ) = .047.
I So if you test positive for the disease, you have a 4.7% chanceof having the disease.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease 99 1Healthy 1998 97902
So there are so many more people are a false positive than peoplewho are a true positive.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease
99 1Healthy 1998 97902
So there are so many more people are a false positive than peoplewho are a true positive.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease 99
1Healthy 1998 97902
So there are so many more people are a false positive than peoplewho are a true positive.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease 99 1Healthy
1998 97902
So there are so many more people are a false positive than peoplewho are a true positive.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease 99 1Healthy 1998
97902
So there are so many more people are a false positive than peoplewho are a true positive.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease 99 1Healthy 1998 97902
So there are so many more people are a false positive than peoplewho are a true positive.
Testing for a Disease
Another way to see this. Consider a sample population of 100, 000.
Tests Positive Tests Negative
Has Disease 99 1Healthy 1998 97902
So there are so many more people are a false positive than peoplewho are a true positive.