Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

103
Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability

Transcript of Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Page 1: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103

Chapter 6

Probability

Page 2: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 2 of 103

Outline

6.1 Introduction6.2 Experiments, Outcomes, and Events6.3 Assignment of Probabilities6.4 Calculating Probabilities of Events6.5 Conditional Probability and Independence6.6 Tree Diagrams6.7 Bayes’ Theorem6.8 Simulation

Page 3: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 3 of 103

6.1 Introduction

1. Mathematical Probability

2. Probability of an Event

3. An Example Problem

Page 4: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 4 of 103

Mathematical Probability

Many events in the world exhibit a random character. Yet, by repeated observations of such events we can often discern long-term patterns that persist despite random, short-term fluctuations. Probability is the branch of mathematics devoted to the study of such events.

Page 5: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 5 of 103

Probability of an Event

The probability of an event is a number between 0 and 1 that expresses the long-run likelihood that the event will occur. An event having probability .1 is rather unlikely to occur.An event with probability .9 is very likely to occur.An event with probability .5 is just as likely to occur as not.

Page 6: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 6 of 103

An Example Problem

Medical Diagnosis A clinic tests for active pulmonary tuberculosis. If a person has tuberculosis, the probability of a positive test result is .98. If a person does not have tuberculosis, the probability of a negative test result is .99. The incidence of tuberculosis in a certain city is 2 cases per 10,000 population. What is the probability that an individual who tests positive actually has pulmonary tuberculosis?

Page 7: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 7 of 103

6.2 Experiments, Outcomes, and Events

1. Experiment, Trial and Outcome

2. Sample Space

3. Event

4. Special Events

5. Events As Sets

6. Mutually Exclusive Events

Page 8: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 8 of 103

Experiment, Trial and Outcome

An experiment is an activity with an observable outcome. Each repetition of the experiment is called a trial. In each trial we observe the outcome of the experiment.

Page 9: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 9 of 103

Example Experiment, Trial and Outcome

Experiment 1: Flip a coin

Trial: One coin flip Outcome: Heads

Experiment 2: Allow a conditioned rat to run a maze containing three possible paths

Trial: One run Outcome: Path 1

Experiment 3: Tabulate the amount of rainfall in New York, NY in a year

Trial: One year Outcome: 37.23 in.

Page 10: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 10 of 103

Sample Space

The set of all possible outcomes of an experiment is called the sample space of the experiment. So each outcome is an element of the sample space.

Page 11: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 11 of 103

Example Sample Space

An experiment consists of throwing two dice, one red and one green, and observing the numbers on the uppermost face on each. What is the sample space S of this experiment?

Each outcome of the experiment can be regarded as an ordered pair of numbers, the first representing the number on the red die and the second the number on the green die.

Page 12: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 12 of 103

Example Sample Space (2)

S = {(1,1), (1,2), (1,3), (1,4), (1,5), (1,6) (2,1), (2,2), (2,3), (2,4), (2,5), (2,6) (3,1), (3,2), (3,3), (3,4), (3,5), (3,6) (4,1), (4,2), (4,3), (4,4), (4,5), (4,6) (5,1), (5,2), (5,3), (5,4), (5,5), (5,6) (6,1), (6,2), (6,3), (6,4), (6,5), (6,6)}

Page 13: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 13 of 103

Event

An event E is a subset of the sample space. We say that the event occurs when the outcome of the experiment is an element of E.

Page 14: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 14 of 103

Example Event

For the experiment of rolling two dice, describe the events

E1 = {The sum of the numbers is greater than 9};

E2 = {The sum of the numbers is 7 or 11}.

E1 = {(4,6), (5,5), (5,6), (6,4), (6,5), (6,6)}

E2 = {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1), (5,6),

(6,5)}

Page 15: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 15 of 103

Special Events

Let S be the sample space of an experiment.

The event corresponding to the empty set, , is called the impossible event, since it can never occur.

The event corresponding to the sample space itself, S, is called the certain event because the outcome must be in S.

Page 16: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 16 of 103

Events As Sets

Let E and F be two events of the sample space S.

The event where either E or F or both occurs is designated by EF.

The event where both E and F occurs is designated by EF.

The event where E does not occur is designated by E '.

Page 17: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 17 of 103

Example Events As Sets

For the experiment of rolling two dice, letE1 = “The sum of the numbers is greater than 9” and E3 = “The numbers on the two dice are equal”.Determine the setsE1E3, E1E3, and (E1E3)'.

Page 18: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 18 of 103

Example Events As Sets (2)

E1 = {(4,6), (5,5), (5,6), (6,4), (6,5), (6,6)} E3 = {(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)}E1E3 = {(1,1), (2,2), (3,3), (4,4), (4,6), (5,5),

(5,6), (6,4), (6,5), (6,6)}

E1E3 = {(5,5), (6,6)}

(E1E3)' = {(1,2), (1,3), (1,4), (1,5), (1,6), (2,1),

(2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,4), (3,5), (3,6), (4,1), (4,2), (4,3), (4,5), (5,1), (5,2), (5,3), (5,4), (6,1), (6,2), (6,3)}

Page 19: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 19 of 103

Mutually Exclusive Events

Let E and F be events in a sample space S. Then E and F are mutually exclusive (or disjoint) if EF = .If E and F are mutually exclusive, then E and F cannot simultaneously occur; if E occurs, then F does not; and if F occurs, then E does not.

Page 20: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 20 of 103

Example Mutually Exclusive Events

For the experiment of rolling two dice, which of the following events are mutually exclusive?E1 = “The sum of the dots is greater than 9”E2 = “The sum of the dots is 7 or 11”E3 = “The dots on the two dice are equal”

Page 21: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 21 of 103

Example Mutually Exclusive Events (2)

E1 = {(4,6), (5,5), (5,6), (6,4), (6,5), (6,6)}

E2 = {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1), (5,6),

(6,5)}

E3 = {(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)}

E1E2 = {(5,6), (6,5)} - Not mutually exclusive

E1E3 = {(5,5), (6,6)} - Not mutually exclusive

E2E3 = - Mutually exclusive

Page 22: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 22 of 103

The sample space of an experiment is the set of all possible outcomes of the experiment. Each subset of the sample space is called an event. We say that an event occurs when the outcome is an element of the event. The event EF occurs when either E or F or both occurs. The event EF occurs when both E and F occur. The event E' occurs when E does not occur.

Summary Section 6.2 - Part 1

Page 23: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 23 of 103

Two events are mutually exclusive if they cannot both occur at the same time.

Summary Section 6.2 - Part 2

Page 24: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 24 of 103

6.3 Assignment of Probabilities

1. Probability of an Outcome

2. Experimental Probability

3. Fundamental Properties of Probabilities

4. Addition Principle

5. Inclusion-Exclusion Principle

6. Odds

Page 25: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 25 of 103

Probability of an Outcome

Let a sample space S consist of a finite number of outcomes s1, s2, … ,sN. To each outcome we associate a number, called the probability of the outcome, which represents the relative likelihood that the outcome will occur. A chart showing the outcomes and the assigned probability is called the probability distribution for the experiment.

Page 26: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 26 of 103

Example Probability of an Outcome

Toss an unbiased coin and observe the side that faces upward. Determine the probability distribution for this experiment.

Since the coin is unbiased, each outcome is equally likely to occur.

Outcome Probability

Heads ½

Tails ½

Page 27: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 27 of 103

Experimental Probability

Let a sample space S consist of a finite number of outcomes s1, s2, … ,sN. The relative frequency, or experimental probability, of each outcome is calculated after many trials.

The experimental probability could be different for a different set of trials and different from the probability of the events.

Page 28: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 28 of 103

Example Experimental Probability

Traffic engineers measure the volume of traffic on a major highway during the rush hour. Generate a probability distribution using the data generated over 300 consecutive weekdays.

Page 29: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 29 of 103

Example Experimental Probability

We will use the experimental probability for the distribution.

Page 30: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 30 of 103

Fundamental Properties of Probabilities

Let an experiment have outcomes s1, s2, … , sN with probabilities p1, p2, … , pN. Then the numbers p1, p2, … , pN must satisfy:

Fundamental Property 1 Each of the numbers p1, p2, … , pN is between 0 and 1;

Fundamental Property 2 p1 + p2 + … + pN = 1.

Page 31: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 31 of 103

Example Fundamental Properties

Verify the fundamental properties for the following distribution.

All probabilities are between 0 and 1

Total: 1.00

Page 32: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 32 of 103

Addition Principle

Addition Principle Suppose that an event E consists of the finite number of outcomes s, t, u, … ,z. That is E = {s, t, u, … ,z }.

Then

Pr(E) = Pr(s) + Pr(t) + Pr(u) + … + Pr(z),

where Pr(A) is the probability of event A.

Page 33: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 33 of 103

Example Addition Principle

Suppose that we toss a red die and a green die and observe the numbers on the sides that face upward.a) Calculate the probabilities of the elementary events.b) Calculate the probability that the two dice show the same number.

Page 34: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 34 of 103

a)As shown previously, the sample space consists of 36 pairs of numbers

S = {(1,1), (1,2), … , (6,5), (6,6)}.

Each of these pairs is equally likely to occur.

The probability of each pair is

b) E = {(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)}

Example Addition Principle (2)

1 .36

1 1 1 1 1 1 1Pr( )

36 36 36 36 36 36 6E

Page 35: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 35 of 103

Inclusion-Exclusion Principle

Pr( ) Pr( ) Pr( ) Pr( ).E F E F E F

Let E and F be any events. Then

If E and F are mutually exclusive, then

Pr( ) Pr( ) Pr( ).E F E F

Page 36: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 36 of 103

Example Inclusion-Exclusion Principle

A factory needs two raw materials. The probability of not having an adequate supply of material A is .05 and the probability of not having an adequate supply of material B is .03. A study determines that the probability of a shortage of both materials is .01. What proportion of the time will the factory not be able to operate from lack of materials?

Page 37: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 37 of 103

Example Inclusion-Exclusion Principle (2)

The factory will not operate 7% of the time.

Pr( ) Pr( ) Pr( ) Pr( )

.05 .03 .01

.07

A B A B A B

Page 38: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 38 of 103

Odds

If the odds in favor of an event E are a to b, then

Pr( ) and Pr( ) .a b

E Ea b a b

On average, for every a + b trials, E will occur a times and E will not occur b times.

Page 39: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 39 of 103

Example Odds

In the two dice problem, what are the odds of rolling a pair with the same number on the faces?The probability of obtaining a pair with the same number on the faces is 1/6.The probability of not obtaining a pair with the same number on the faces is 5/6.The odds are 1 16 or 1 to 5.

5 56

Page 40: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 40 of 103

Summary Section 6.3 - Part 1

A probability distribution for a finite sample space associates a probability with each outcome of the sample space. Each probability is a number between 0 and 1, and the sum of the probabilities is 1. The probability of an event is the sum of the probabilities of outcomes in the event.

Page 41: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 41 of 103

Summary Section 6.3 - Part 2

The inclusion-exclusion principle states that the probability of the union of two events is the sum of the probabilities of the events minus the probability of their intersection. If the two events are mutually exclusive, the probability of the union is just the sum of the probabilities of the events.

Page 42: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 42 of 103

Summary Section 6.3 - Part 3

We say that the odds in favor of an event are a to b if the probability of the event is a/(a + b). Intuitively, the event is expected to occur a times for every b times it does not occur.

Page 43: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 43 of 103

6.4 Calculating Probabilities of Events

1. Probability of Equally Likely Outcomes

2. Complement Rule

Page 44: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 44 of 103

Probability of Equally Likely Outcomes

Let S be a sample space consisting of N equally likely outcomes. Let E be any event. Then

number of outcomes in Pr( ) .

EE

N

Page 45: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 45 of 103

Example Equally Likely Outcomes

Suppose that a cruise ship returns to the US from the Far East. Unknown to anyone, 4 of its 600 passengers have contracted a rare disease. Suppose that the Public Health Service screens 20 passengers, selected at random, to see whether the disease is present aboard ship. What is the probability that the presence of the disease will escape detection?

Page 46: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 46 of 103

Example Equally Likely Outcomes (2)

The sample space consists of samples of 20 drawn from among the 600 passengers.

N = C(600, 20)

There are 600 - 4 = 596 non infected passengers. The disease is not detected if the 20 passengers are chosen from this group.

Let E be the event that the disease is not detected.

Page 47: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 47 of 103

Example Equally Likely Outcomes (3)

The number of outcomes in E is n (E ) = C(596, 20).

Thus, Pr (E) = n (E) / N = .87

Page 48: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 48 of 103

Complement Rule

Complement Rule Let E be any event, E ' its complement. Then

Pr(E) = 1 - Pr(E ').

Page 49: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 49 of 103

Example Complement Rule

A group of 5 people is to be selected at random. What is the probability that 2 or more of them have the same birthday?

For simplicity we will ignore leap years and assume that each of the 365 days of the year are equally likely.

Choosing a person at random is equivalent to choosing a birthday at random.

Page 50: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 50 of 103

Example Complement Rule (2)

There are 3655 ways of choosing 5 birthdays.

It will also be easier to first find the probability that the 5 birthdays are different. Let this be E '.

The number of outcomes where the 5 birthdays are different is 365364363362361.

5

365 364 363 362 361Pr( ) .973

365E

Page 51: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 51 of 103

Example Complement Rule (3)

Pr(E) = 1- Pr(E ') = 1 - .973 = .027

This example could be worked for a general group of r people.

In this case365 364 (365 1)

Pr( ) .365r

rE

Probability that, in a randomly selected group of r people, at least two will have the same birthday

r 5 10 15 20 22 23 25 30 40 50

Pr(E) .027 .117 .253 .411 .476 .507 .569 .706 .891 .970

Page 52: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 52 of 103

Summary Section 6.4

For a sample space with a finite number of equally likely outcomes, the probability of an event is the number of elements in the event divided by the number of elements in the sample space. The probability of the complement of an event is 1 minus the probability of the event.

Page 53: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 53 of 103

6.5 Conditional Probability and Independence

1. Conditional Probability2. Conditional Probability of Equally Likely

Outcomes 3. Product Rule4. Independence5. Independence of a Set of Events

Page 54: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 54 of 103

Conditional Probability

Let E and F be events is a sample space S. The conditional probability Pr(E | F) is the probability of event E occurring given the condition that event F has occurred. In calculating this probability, the sample space is restricted to F.

Pr( )Pr( | )

Pr( )

E FE F

F

provided that Pr(F) ≠ 0.

Page 55: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 55 of 103

Example Conditional Probability

Twenty percent of the employees of Acme Steel Company are college graduates. Of all its employees, 25% earn more than $50,000 per year, and 15% are college graduates earning more than $50,000. What is the probability that an employee selected at random earns more than $50,000 per year, given that he or she is a college graduate?

Page 56: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 56 of 103

Example Conditional Probability (2)

Let H = "earns more than $50,000 per year" and C = "college graduate."

From the problem,

Pr(H) = .25 Pr(C) = .20, Pr (H C) = .15.

Therefore,Pr( ) .15 3

Pr( | ) .Pr( ) .20 4

H CH C

C

Page 57: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 57 of 103

Conditional Probability - Equally Likely Outcomes

Conditional Probability in Case of Equally Likely Outcomes

number of outcomes in Pr( | )

number of outcomes in

E FE F

F

provided that [number of outcomes in F] ≠ 0.

Page 58: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 58 of 103

Example Conditional Probability

A sample of two balls are selected from an urn containing 8 white balls and 2 green balls. What is the probability that the second ball selected is white given that the first ball selected was white?

Page 59: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 59 of 103

Example Conditional Probability

The number of outcomes in "the first ball is white" is 89 = 72. That is, the first ball must be among the 8 white balls and the second ball can be any of the 9 balls left.

The number of outcomes in "the first ball is white and the second ball is white" is 87 = 56.

56 7Pr(2 ball is white |1 ball is white)

72 9nd st

Page 60: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 60 of 103

Product Rule

Product Rule If Pr(F) ≠ 0,

Pr (E F) = Pr(F) Pr(E | F).

The product rule can be extended to three events.Pr(E1 E2 E3) = Pr(E1) Pr(E2 | E1) Pr(E3| E1 E2)

Page 61: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 61 of 103

Example Product Rule

A sequence of two playing cards is drawn at random (without replacement) from a standard deck of 52 cards. What is the probability that the first card is red and the second is black?

Let

F = "the first card is red," and

E = "the second card is black."

Page 62: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 62 of 103

Example Product Rule (2)

Pr(F) = ½ since half the deck is red cards.

26Pr( | ) .

51E F

1 26 13Pr( ) .

2 51 51E F

If we know the first card is red, then the probability the second is black is

Therefore,

Page 63: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 63 of 103

Independence

Let E and F be events. We say that E and F are independent provided that

Pr (E F) = Pr(E) Pr (F).

Equivalently, they are independent provided that

Pr(E | F) = Pr(E) and Pr(F | E) = Pr (F).

Page 64: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 64 of 103

Example Independence

Let an experiment consist of observing the results of drawing two consecutive cards from a 52-card deck. Let E = "second card is black" and F = "first card is red". Are these two events independent?From the previous example, Pr(E | F) = 26/51.Note that Pr(E) = 1/2. Since they are not equal, E and F are not independent.

Page 65: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 65 of 103

Independence of a Set of Events

A set of events is said to be independent if, for each collection of events chosen from them, say E1, E2, …, En, we have

Pr(E1 E2… En) = Pr(E1) Pr(E2) … Pr (En).

Page 66: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 66 of 103

Example Independence of a Set

A company manufactures stereo components. Experience shows that defects in manufacture are independent of one another. Quality control studies reveal that2% of CD players are defective, 3% of amplifiers are defective, and 7% of speakers are defective.A system consists of a CD player, an amplifier, and 2 speakers. What is the probability that the system is not defective?

Page 67: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 67 of 103

Example Independence of a Set (2)

Let C, A, S1, and S2 be events corresponding to defective CD player, amplifier, speaker 1, and speaker 2, respectively. Then

Pr(C) = .02, Pr(A) = .03, Pr(S1) = Pr(S2) = .07

Pr(C') = .98, Pr(A') = .97, Pr(S1') = Pr(S2') = .93

Pr(C'A'S1'S2') = .98.97.932 = .822

Page 68: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 68 of 103

Summary Section 6.5 - Part 1

Pr(E|F), the conditional probability that E occurs given that F occurs, is computed as Pr (E F)/Pr (F). For a sample space with a finite number of equally likely outcomes, it can be computed as n (E F) /n (F). The product rule states that if Pr(F) ≠ 0, then Pr (E F) = Pr(F) Pr(E|F).

Page 69: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 69 of 103

Summary Section 6.5 - Part 2

E and F are independent events if Pr (E F) = Pr(F) Pr(E). Equivalently, E and F [with Pr(F) ≠ 0] are independent events if Pr(E|F) = Pr(E). A collection of events is said to be independent if for each collection of events chosen from them, the probability that all the events occur equals the product of the probabilities that each occurs.

Page 70: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 70 of 103

6.6 Tree Diagrams

1. Tree Diagram2. Medical Example3. Quality Control Example

Page 71: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 71 of 103

Tree Diagram

A tree diagram helps us represent the various events and their associated probabilities. The various outcomes of each experiment are represented as branches emanating from a point. Each branch is labeled with the probability of the associated outcome.

For example:

Page 72: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 72 of 103

Tree Diagram (2)

We represent experiments performed one after another by stringing together diagrams of the sort given in the previous slide. The probabilities for the second set of branches are conditional probabilities given the outcome from which the branches are emanating.

Page 73: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 73 of 103

Tree Diagram (3)

For example:

Page 74: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 74 of 103

Example Medical

The reliability of a skin test for active pulmonary tuberculosis (TB) is as follows: Of people with TB, 98% have a positive reaction and 2% have a negative reaction; of people free of TB, 99% have a negative reaction and 1% have a positive reaction. From a large population of which 2 per 10,000 persons have TB, a person is selected at random and given a skin test, which turns out positive. What is the probability that the person has active TB?

Page 75: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 75 of 103

Example Medical (2)

Make a tree diagram using:

Pr(TB) = 2/10000 = .0002,

Pr(not TB) = 1 - .0002 = .9998,

Pr(POS|TB) = .98,

Pr(NEG|TB) = .02,

PR(NEG|not TB) = .99 and

PR(POS|not TB) = .01.

Page 76: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 76 of 103

Example Medical (3)

Pr(TB POS) .000196So Pr(TB|POS) = .02.

Pr(POS) .000196 .009998

Page 77: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 77 of 103

Example Quality Control

A box contains 5 good light bulbs and 2 defective ones. Bulbs are selected one at a time (without replacement) until a good bulb is found. Find the probability that the number of bulbs selected is (i) 1, (ii) 2, (iii) 3.

Page 78: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 78 of 103

Example Quality Control (2)

For the first draw, a bulb selected at random is good (G) with probability 5/7

For the first draw, a bulb selected at random is defective (D) with probability 2/7

Page 79: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 79 of 103

Example Quality Control (3)

If the first bulb was good, the activity stops. If the first bulb was defective, then the second selection is good with probability 5/6 and defective with probability 1/6.

If the second selection was good, the activity stops.

If it was defective, then the third selection is good with probability 1.

Page 80: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 80 of 103

Example Quality Control (4)

The tree diagram is:

5( ) Pr(1)

72 5 5

( ) Pr(2)7 6 212 1 1

( ) Pr(3) 17 6 21

i

ii

iii

Page 81: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 81 of 103

Summary Section 6.6

Tree diagrams provide a useful device for determining probabilities of combined outcomes in a sequence of experiments.

Page 82: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 82 of 103

6.7 Bayes' Theorem

1. Bayes' Theorem (n = 2)2. Bayes' Theorem (n = 3)3. Bayes' Theorem

Page 83: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 83 of 103

If B1 and B2 are mutually exclusive events, and B1 B2 = S, then for any event A in S,

Bayes' Theorem (n = 2)

1 11

1 1 2 2

Pr( )Pr( | )Pr( | ) .

Pr( )Pr( | ) Pr( )Pr( | )

B A BB A

B A B B A B

Page 84: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 84 of 103

Example Bayes' Theorem (n = 2)

Rework the medical problem using Bayes' Theorem.

A = POS, B1 = TB and B2 = not TB

Pr(TB) = .0002,

Pr(not TB) = .9998,

Pr(POS|TB) = .98,

Pr(POS|not TB) = .01,

Page 85: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 85 of 103

Example Bayes' Theorem (n = 2) (2)

1 11

1 1 2 2

Pr( )Pr( | )Pr( | )

Pr( )Pr( | ) Pr( )Pr( | )

.0002 .98Pr(TB | POS) .02

.0002 .98 .9998 .01

B A BB A

B A B B A B

Page 86: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 86 of 103

If B1, B2 and B3 are mutually exclusive events, and B1B2B3 = S, then for any event A in S,

Bayes' Theorem (n = 3)

1 11

1 1 2 2 3 3

Pr( )Pr( | )Pr( | ) .

Pr( )Pr( | ) Pr( )Pr( | ) Pr( ) Pr( | )

B A BB A

B A B B A B B A B

Page 87: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 87 of 103

If B1, B2, …, Bn are mutually exclusive events, and B1B2…Bn = S, then for any event A in S,

Bayes' Theorem

1 11

1 1 2 2

Pr( )Pr( | )Pr( | ) .

Pr( )Pr( | ) Pr( )Pr( | ) Pr( ) Pr( | )n n

B A BB A

B A B B A B B A B

Page 88: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 88 of 103

Example Bayes' Theorem

A printer has seven book-binding machines with the proportion of production and probability of defective binding listed in the following table.

Page 89: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 89 of 103

Example Bayes' Theorem (2)

If a book is selected at random and found to have a defective binding, what is the probability that it was bound by machine 1?

A = "book has a defective binding"

Bi = "book was bound by machine i"

The second column in the table gives Pr(Bi).

The last column in the table gives Pr(A|Bi).

Page 90: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 90 of 103

Example Bayes' Theorem (3)

1 11

1 1 2 2

Pr( )Pr( | )Pr( | )

Pr( )Pr( | ) Pr( )Pr( | ) Pr( ) Pr( | )

.10 .03

.10 .03 .05 .03 .20 .02 .15 .02 .25 .01 .15 .02 .10 .03.15

n n

B A BB A

B A B B A B B A B

Page 91: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 91 of 103

Summary Section 6.7

Bayes' theorem states that if B1, B2, …, Bn are mutually exclusive events whose union is the entire sample space, then for any event A,

1 11

1 1 2 2

Pr( )Pr( | )Pr( | ) .

Pr( )Pr( | ) Pr( )Pr( | ) Pr( ) Pr( | )n n

B A BB A

B A B B A B B A B

Page 92: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 92 of 103

6.8 Simulation

1. Simulation

2. Simulation - Dice

3. Simulation - Balls From Urn

4. Simulation - Free Throw

Page 93: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 93 of 103

Simulation

Simulation is a method of imitating an experiment by using an artificial device to substitute for the real thing.

Page 94: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 94 of 103

1. Simulate the toss of a single die. randInt(1,6) TI-83

rand(6) TI-892. Simulate the toss of a pair of dice.

randInt(1,6) + randInt(1,6) TI-83rand(6) + rand(6) TI-89

3. Simulate ten tosses of a pair of dice. randInt(1,6,10) + randInt(1,6,10)TI-83Seq(rand(6) + rand(6),x,1,10) TI-89

Example Simulation - Dice

Page 95: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 95 of 103

1. Simulate the selection of a ball from an urn containing 7 white balls and 3 red balls.1-7 = white balls and 8-10 = red balls randInt(1,10) TI-83

rand(10) TI-89

Example Simulation - Balls From Urn

Page 96: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 96 of 103

1. Simulate the outcome of a free throw by Michael Jordan, who had an 83% free-throw average.1-83 = succeeded and 84-100 = missed randInt(1,100) TI-83

rand(100) TI-89

Example Simulation - Free Throw

Page 97: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 97 of 103

Customers steadily arrive at a bank during the hour from 9 A.M. to 10 A.M. so that the line of customers is never empty. There are three tellers, and each customer requires a varying amount of time with a teller. Surveys have shown that 40% of the customers need 3 minutes, 50% need 5 minutes, and 10% need 8 minutes. Each customer enters the queue at the end and goes to the first available teller when reaching the front.

Example Simulation - Queue

Page 98: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 98 of 103

Simulate the service process.

(a) Show how many of the first 20 customers each of the tellers is able to service on a random day and in that hour.

(b) If all 20 customers were at the bank when it opened at 9 A.M., what was the average time spent at the bank once it opened?

Example Simulation - Queue (2)

Page 99: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 99 of 103

Example Simulation - Queue (a)

Generate 20 random whole numbers from 1 - 10. The numbers 1-4 represent a customer requiring 3 min., 5-9 represent a customer requiring 5 min., and 10 represent a customer requiring 8 min.

Page 100: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 100 of 103

Example Simulation - Queue (2a)

To determine the schedule, let the tellers be A, B, and C. Then the first customer goes to teller A. Since her random numbers is 10, she requires 8 min. occupying teller A until 9:08. The second customer, with random number 7, goes to teller B and stays till 9:05. The third person goes to teller C and stays till 9:03. The fourth customer goes to teller C at 9 :03 and stays till 9:06. Continue in this fashion until the last customer leaves.

Page 101: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 101 of 103

Example Simulation - Queue (3a)

Page 102: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 102 of 103

Example Simulation - Queue (b)

Total the number of minutes each customer spent in the bank (using End time) and divide by 20.

8 5 3 6 8 11 11 11 14 19 16 19 19 22 24 24 30 32 29 34

2017.25

Page 103: Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 103 Chapter 6 Probability.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 103 of 103

Summary Section 6.8

The ability to generate random numbers allows us to simulate the outcomes of experiments.