copyright © 2014, 2011 pearson education, inc. 1 chapter 8 conditional probability

39
Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditio nal Probabil ity

Upload: hubert-curtis

Post on 31-Dec-2015

243 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 1

Chapter 8Conditional Probability

Page 2: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 2

8.1 From Tables to Probabilities

How does education affect income?

Percentages computed within rows or columns of a contingency table correspond to conditional probabilities

Conditional probabilities allow us to answer questions like how education affects income

Page 3: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 3

8.1 From Tables to Probabilities

Contingency Table (Counts) for Amazon.com

Page 4: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 4

8.1 From Tables to Probabilities

Converting Counts to Probabilities

Assume the next visitor to Amazon.com behaves like a random choice from the 28,975 cases in the contingency table

Divide each count by 28,975 to get fractions (probabilities)

Page 5: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 5

8.1 From Tables to Probabilities

Probabilities for Amazon.com

Page 6: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 6

8.1 From Tables to Probabilities

Joint Probability

Displayed in cells of a contingency table

Represent the probability of an intersection of two or more events (combination of attributes)

For Amazon.com there are six joint probabilities; e.g., P(Yes and Comcast) = 0.001

Page 7: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 7

8.1 From Tables to Probabilities

Marginal Probability

Displayed in the margins of a contingency table

Is the probability of observing an outcome with a single attribute, regardless of its other attributes

For Amazon.com there are five marginal probabilities, e.g., P(Comcast) = 0.009 + 0.001 = 0.010

Page 8: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 8

8.1 From Tables to Probabilities

Conditional Probability

P(A І B), the conditional probability of A given B, is P(A and B) / P(B)

To obtain a conditional probability, we restrict the sample space to a particular row or column

Page 9: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 9

8.1 From Tables to Probabilities

Conditional Probability

Of interest to Amazon.com is the question “which host will deliver the best visitors, those who are more likely to make a purchase?”

Find conditional probabilities to answer questions like “among visitors from Comcast, what is the chance a purchase is made?”

Page 10: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 10

8.1 From Tables to Probabilities

Conditional Probability – Restrict Sample Space to Comcast

Page 11: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 11

8.1 From Tables to Probabilities

Conditional Probability – Compute Percentages in Comcast Column

Page 12: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 12

8.1 From Tables to Probabilities

Conditional Probabilities –Purchases more likely from Comcast

P(Yes І Comcast) = P(Yes and Comcast)P(Comcast)

= 0.001 / 0.010 = 0.100

P(Yes І Google) = 0.033P(Yes І Nextag) = 0.042

Page 13: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 13

8.2 Dependent Events

Definition

Events that are not independent; for dependent events P(A and B) ≠ P(A)×P(B)

or P(A) ≠ P(A І B)

Page 14: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 14

8.2 Dependent Events

The Multiplication Rule

Events in business tend to be dependent (e.g., probability of purchasing a service given an ad for the service is seen)

Order matters: Generally, P(A І B) ≠ P(B І A)

Page 15: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 15

8.2 Dependent Events

The Multiplication Rule

The joint probability of two events A and B is the product of the marginal probability of one times the conditional probability of the other

P(A and B) = P(A) × P(B І A)P(A and B) = P(B) × P(A І B)

Page 16: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 16

8.2 Dependent Events

The Multiplication Rule

Disjoint events are never independent

If A and B are disjoint, then P(A І B) = P(A and B) / P(B)

= 0 / P(B) = 0≠ P(A)

Page 17: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 17

8.3 Organizing Probabilities

Probability Trees (Tree Diagrams)

Graphical depiction of conditional probabilities (helpful for large problems)

Shows sequence of events as paths that suggest branches of a tree

Page 18: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 18

8.3 Organizing Probabilities

Success of Advertising on TVPrograms Viewed on Sunday Evening

Page 19: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 19

8.3 Organizing Probabilities

Success of Advertising on TVWhether or Not Viewer Sees Ad

Page 20: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 20

8.3 Organizing Probabilities

Use Tree Diagram to Find Probabilities

P(Watch game and See Ads) = 0.50 0.50= 0.25

P(See Ads) = 0.15 0.90 + 0.35 0.20 + 0.50 0.50

= 0.455

Page 21: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 21

8.3 Organizing Probabilities

Derive Probability Table from Tree DiagramFill in Marginal Probabilities

Page 22: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 22

8.3 Organizing Probabilities

Derive Probability Table from Tree DiagramFill in First Row of Joint Probabilities

Page 23: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 23

8.3 Organizing Probabilities

Completed Probability Table

Page 24: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 24

8.4 Order in Conditional Probabilities

If a viewer sees the ads, what is the chance she is watching Desperate Housewives?

Find P(Desperate Housewives І See Ads)

= P(Desperate Housewives and See Ads)P(See Ads)

= 0.07 / 0.455 = 0.154

Page 25: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 25

4M Example 8.1: DIAGNOSTIC TESTING

Motivation

If a mammogram indicates that a 55 year old woman tests positive for breast cancer, what is the probability that she in fact has breast cancer?

Page 26: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 26

4M Example 8.1: DIAGNOSTIC TESTING

Method

Past data indicates the following probabilities:

P(Test negative І No cancer) = 0.925P(Test positive І Cancer) = 0.85P(Cancer) = 0.005

Page 27: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 27

4M Example 8.1: DIAGNOSTIC TESTING

Mechanics – Fill in the Probability Table

Page 28: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 28

4M Example 8.1: DIAGNOSTIC TESTING

Mechanics – Fill in the Probability Table

Use Multiplication Rule to obtain joint probabilities

For example, P (Cancer and Test positive) = P (Cancer) P(Test positive І Cancer)= 0.005 0.85 = 0.00425

Page 29: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 29

4M Example 8.1: DIAGNOSTIC TESTING

Mechanics – Completed Probability Table

Page 30: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 30

4M Example 8.1: DIAGNOSTIC TESTING

Message

The chance that a woman who tests positive actually has cancer is small, a bit more than 5%.

Page 31: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 31

8.4 Organizing Probabilities

Bayes’ Rule: Reversing a Conditional Probability Algebraically

P(A І B) = _____P(B І A) P(A)______P(B І A) P(A) + P(B І Ac) P(Ac)

Page 32: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 32

4M Example 8.2: FILTERING JUNK MAIL

Motivation

Is there a way to help workers filter out junk mail from important email messages?

Page 33: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 33

4M Example 8.2: FILTERING JUNK MAIL

Method

Past data indicates the following probabilities:

P(Nigerian general І Junk mail) = 0.20P(Nigerian general І Not Junk mail) = 0.001P(Junk mail) = 0.50

Page 34: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 34

4M Example 8.2: FILTERING JUNK MAIL

Mechanics – Fill in the Probability Table

Page 35: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 35

4M Example 8.2: FILTERING JUNK MAIL

Mechanics – Use Table to find Conditional Probability

P (Junk mail І Nigerian general) = 0.1 / 0.1005= 0.995

Page 36: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 36

4M Example 8.2: FILTERING JUNK MAIL

Message

Email messages to this employee with the phrase “Nigerian general” have a high probability (more than 99%) of being spam.

Page 37: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 37

Best Practices

Think conditionally.

Presume events are dependent and use the Multiplication Rule.

Use tables to organize probabilities.

Page 38: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 38

Best Practices (Continued)

Use probability trees for sequences of conditional probabilities.

Check that you have included all of the events.

Use Bayes’ Rule to reverse the order of conditioning.

Page 39: Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 8 Conditional Probability

Copyright © 2014, 2011 Pearson Education, Inc. 39

Pitfalls

Do not confuse P(A І B) for P(B І A).

Don’t think that “mutually exclusive” means the same thing as “independent.”

Do not confuse counts with probabilities.