Top Banner
Conditional Probability I P (A|B ) means “the probability of A, given B
37

Math 180 - Probability

Feb 03, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Math 180 - Probability

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.

Page 2: Math 180 - Probability

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.

Page 3: Math 180 - Probability

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.

Page 4: Math 180 - Probability

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.

Page 5: Math 180 - Probability

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.

Page 6: Math 180 - Probability

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?

Page 7: Math 180 - Probability

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?

Page 8: Math 180 - Probability

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?

Page 9: Math 180 - Probability

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)

Page 10: Math 180 - Probability

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)

Page 11: Math 180 - Probability

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)

Page 12: Math 180 - Probability

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)

Page 13: Math 180 - Probability

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!!

Page 14: Math 180 - Probability

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!!

Page 15: Math 180 - Probability

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!!

Page 16: Math 180 - Probability

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!!

Page 17: Math 180 - Probability

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!!

Page 18: Math 180 - Probability

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?

Page 19: Math 180 - Probability

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?

Page 20: Math 180 - Probability

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?

Page 21: Math 180 - Probability

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.

Page 22: Math 180 - Probability

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.

Page 23: Math 180 - Probability

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.

Page 24: Math 180 - Probability

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.

Page 25: Math 180 - Probability

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.

Page 26: Math 180 - Probability

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.

Page 27: Math 180 - Probability

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.

Page 28: Math 180 - Probability

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.

Page 29: Math 180 - Probability

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.

Page 30: Math 180 - Probability

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.

Page 31: Math 180 - Probability

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.

Page 32: Math 180 - Probability

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.

Page 33: Math 180 - Probability

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.

Page 34: Math 180 - Probability

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.

Page 35: Math 180 - Probability

Testing for a Disease

I How do we rule out false positives?

I Test Again.I See Handout #4.

Page 36: Math 180 - Probability

Testing for a Disease

I How do we rule out false positives?I Test Again.

I See Handout #4.

Page 37: Math 180 - Probability

Testing for a Disease

I How do we rule out false positives?I Test Again.I See Handout #4.