43
Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event.

Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Embed Size (px)

Citation preview

Page 1: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

ProbabilityChapter 2

Towards a theory of probability…

Chapter 2B

Will the apple fall? It is a random event.

Page 2: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Today’s Menu

2-0 Complementary Rule

2-2 Axioms – one more time

Page 3: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

2-2.2 Axioms of Probability

Page 4: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Mutually Exclusive EventsA Generalization

A collection of events is mutually exclusive if for all pairs i and k, Ei Ek =

For a collection of mutually exclusive events,

We often rely on mutually exclusive events in a sample space They partition the space They make many computations feasible and simple

P(E1 E2 . . . Ek) = P(E1) + P(E2) + . . . + P(Ek)

Page 5: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Complimentary Rule

Either an event will occur or it will not occur.

That is P(E) + P(Ec) = 1OrP(E) = 1 – P(Ec)

It follows fromE Ec = S and E, Ec are mutually exclusiveP(E) + P(Ec) = P(S) = 1

I knew that.

Page 6: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Complimentary Rule

Four members of the ENM faculty agree to go to one of 6 Los Vegas gambling casinos. What is the probability that at least two will end up in the same casino?

Let E = the event, at least two meet, then

Ec = the event, none meet

P(at least two meet) = 1 – P(none meet)

P(E) = 1 - P(Ec)

Page 7: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Picking your CasinoSampling with replacement

I have 6 choices

I have 6 choices

I have 6 choices

I have 6 choices

6 x 6 x 6 x6 = 64

Page 8: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Picking your CasinoSampling without replacement

I have 6 choices

Page 9: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Picking your CasinoSampling without replacement

I choose

Now I only have 5 choices

Page 10: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Picking your CasinoSampling without replacement

I choose

I choose

and I now have 4 choices

Page 11: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Picking your CasinoSampling without replacement

I choose

I choose

I choose

and I now have 3 choices

6 x 5 x 4 x 3 = P(6,4)

Page 12: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Complimentary Rule

P(at least two meet) = 1 – P(none meet)

4 4

P(6,4) 6! P(none meet) = = = .2778

6 2!6P(at least 2 meet) =1-.2778 =.7222

P(E) = 1 - P(Ec)

Page 13: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Birthday Problem

The Enlightened Company gives each of its employees the day off on their birthday. What is the probability that at least two workers in the same office will be off on their birthdays the same day.

Assume every day of the year is equally likely. Let n = the number of workers in an office and A = the event

at least two people have a common birthday; then Ac is the event that none do.

(365, ) (365, )( ) ; ( ) 1

365 365c

n n

P n P nP A P A

n 4 16 23 32 40 56P(n) 0.02 0.28 0.51 0.75 0.89 0.99P(A)

Page 14: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

More Birthday Problems

How many people are needed in order to have a better than 50% chance that two people have a birthday within k days of each other?

within k days # people required

0 23

1 14

2 11

3 9

4 8

5 7

7 6

Page 15: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

2-3 The Addition RuleIn general,

P(A B) = P(A) + P(B) – P(A B)

A B

S

If A & B do not intersect, i.e., P(A B) = 0 P(A B) = P(A) + P(B)

A & B are mutually exclusive

Basically, we avoid double counting the

overlap area

Page 16: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Addition Rule – Example 1

Random process: draw a card at random from a deck of 52 playing cards

Let A = the event, draw a spade: P(A) = 13/52 =1/4

let B = the event draw an ace: P(B) = 4/52 = 1/13P(A B) = 1/52

P(A B) = P(A) + P(B) - P(A B)

= 13/52 + 4/52 – 1/52 = 16/52 = .3077

Page 17: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Addition Rule – Example 2

In studying the cause of power failures, these data have been gathered: 20% are due to transformer damage (event A) 70% are due to line damage (event B) 2% involve both problems

What is the probability that a given power failure involves transformer or line damage?

P(A B) = P(A) + P(B) – P(A B) = .20 + .70 -.02 = .88

Page 18: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The three-event case

A B

C

S

Page 19: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

A three-event example The Pandemonium Company (TPC) produces powdered laundry

detergent (SOPE). During final inspection a box of sope may be found to be underweight (Event A), not correctly labeled (Event B) or not properly sealed (Event C). Quality Control has provided the following data:

1. (easy) Underweight or incorrectly labeled boxes are rejected.* What fraction falls In this category?

2. (harder) What fraction of the boxes have no problems?

*unsealed boxes are resealed and shipped to the customers.

Event ProbabilityA 5%B 7%C 12%A and B 3%A and C 4%B and C 5%A and B and C 1%

Page 20: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

A three-event example solved

2. P(Ac Bc Cc) = 1 - P(Ac

Bc Cc)c =1 – P(A B C) = 1 – [ P(A) + P(B) + P(C) – P(A B) – P(A C) – P(B C) + P(A B C)] = 1 – [.05 + .07 + .12 - .03 - .04 - .05 + .1]= 1 - .13 = .87

1. P(A B) = P(A) + P(B) - P(A B) = .05 + .07 - .03 = .09

1. (easy) Underweight or incorrectly labeled boxes are rejected. What fraction falls In this category?

2. (harder) What fraction of the boxes have no problems?

Event ProbabilityA 5%B 7%C 12%A and B 3%A and C 4%B and C 5%A and B and C 1%

Page 21: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

2-4 Conditional Probability Conditional Probabilities are based upon a

reduced sample space P(B|A) is the probability B occurs given that

A has occurred.

A B

S

Page 22: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

More Conditional Probability

A B

NT

NBNA

NAB

P(A) = NA/NT

P(A B) = NAB/NT

P(B|A) = P(A B) / P(A)

= (NAB/NT)/(NA/NT)

= NAB/ NA

Let Ni = the number of equally likely outcomes in event I NT = total number of outcomes in the sample space

Page 23: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

A Conditional Example

In a study of waters near power plants and other industrial plants, 5% showed signs of both chemical and thermal pollution. 40% showed signs of chemical pollution (event A) 30% showed signs of thermal pollution. (event B)

What is the probability that a stream showing chemical pollution will show signs of thermal pollution? Desired: P(B|A) Given: P(A) = .4, P(B) = .3, P(A B) = P(B A) = .05

P(B|A) = P(B A)/ P(A) = .05 / .40 = 1/8 = .125

Page 24: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

ComplementaryLaw

( ) ( )( | ) ( | )

( ) ( )

( ) ( )( | ) ( | )

( )

( ) ( ) ( ) ( )1

( ) ( ) ( ) ( )

cc

cc

c c

P A B P A BP B A and P B A

P A P A

P A B P A BP B A P B A

P A

P A B A B P A B B P A S P A

P A P A P A P A

( | ) ( | ) 1cP B A P B A

A B

S

(A B)

(A Bc)

Page 25: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

More of A Conditional Example

In a study of waters near power plants and other industrial plants, 5% showed signs of chemical and thermal pollution. 40% showed signs of chemical pollution (event A) 30% showed signs of thermal pollution. (event B)

What is the probability that a stream showing chemical pollution will not show signs of thermal pollution? Desired: P(Bc |A)

P(BC|A) = 1 - P(B|A) = 1-.125 = .875

Page 26: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

A another conditional probabilityA company has 150 employees that are categorized according to their education and work assignment.

An employee is selected at random:

1. What is the probability that the employee has a Master’s degree?

2. What is the probability that the employee works in sales given that the employee has a Master’s degree?

3. Given that the employee works in the office, what is probability the employee has a 2-yr technical degree?

Education Production Office Staff Sales totals

High School 25 2 0 272-yr tech school 14 20 8 424-yr college degree 45 18 2 65Masters degree 0 12 4 16totals 84 52 14 150

Page 27: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

2-5 The Multiplication Rule

P(A B) = P(A|B) P(B)

Since P(A|B) = P(B A) / P(B)And P(B A) = P(A B)

Page 28: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Multiplication Rule Example 1A parts bin contains 5 defective items from among 20 items in

the bin. If 2 are selected at random, what is the probability that both are defective?

Let Ai = the event, the ith item selected is defective. Desired P(A1 A2)

Since P(A1 A2 ) = P(A2 A1 ) = P(A2|A1) P(A1)

P(A1) = 5/20 and P(A2|A1) = 4/19

Therefore

P(A1 A2 ) = P(A2|A1) P(A1) = (5/20) (4/19) = .0526

I selected poorly.

Is there an alternate approach to this problem?

Page 29: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

An Alternate Approach

A parts bin contains 5 defective items from among 20 items in the bin. If 2 are selected at random, what is the probability that both are defective?

Let Ai = the event, the ith item selected is defective. Desired P(A1 A2)

P(A1 A2 ) = P(A2|A1) P(A1) = (5/20) (4/19) = .0526

5 15

10 12 0(both defective) .0526

20 190

2

P

Page 30: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Multiplication Rule Example 2

Following aircraft accidents, a detailed investigation is conducted. The probability that an accident due to structural failure is correctly identified is .9.

If 25% of all accidents are due to structural failures, find the probability that an aircraft accident is due to structural failure and is diagnosed as due to structural failure.

Define: A = the event, structural failure and B = the event, diagnosed correctly

Given: P(B|A) = .9 and P(A) = .25 Required: P(A B )= P(B|A) P(A) = (.9) (.25) = .225

Page 31: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Multiplication Rule Example 3

In a machine shop, there are four automatic screw machines. Past inspection reports yields the following data:

MachinePercent

Production

Percent Defectives Produced

1 15 42 30 33 20 54 35 2

If a screw is randomly picked from inventory, what is the probability that It will be from machine 3 and be defective?

I’m a non-defective

machine 3 screw.

Let Ei = the event screw came from machine i D = the event, screw is defectiveGiven: P(E3) = .20 and P(D | E3) = .05Required: P(E3 D) = (.05) (.20) = .01

Page 32: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

A harder question

In a machine shop, there are four automatic screw machines. Past inspection reports yields the following data:

MachinePercent

Production

Percent Defectives Produced

1 15 42 30 33 20 54 35 2

If a screw is randomly picked and found to be defective, what is the probability that it was produced by machine 3?

I’m a non-defective

machine 3 screw.

Let Ei = the event screw came from machine i D = the event, screw is defectiveGiven: P(Ei) and P(D | Ei)Required: P(E3 |D) = P(E3 D) / P(D) need P(D)

Page 33: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Continuing with a harder question

Let D = (E1 D) (E2 D) (E3 D) (E4 D)

Then

P(D) = P(E1 D) + P(E2 D) + P(E3 D) + P(E4 D)

= P(D|E1) P(E1) + P(D|E2) P(E2) + P(D|E3) P(E3) + P(D|E4) P(E4)

= (.04)(.15) + (.03)(.30) + (.05)(.20) + (.02)(.35) = .032

MachinePercent

Production

Percent Defectives Produced

1 15 42 30 33 20 54 35 2

Required: P(E3 |D) = P(E3 D) / P(D) = .01/.032 = .3125

Page 34: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

2-5 Multiplication and Total Probability Rules

We must use this power wisely!This is pretty

powerful stuff!

Page 35: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Total Probability Rule (two events)

Page 36: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Total Probability Rule (multiple events)

The events Ei , i = 1,…,k, form a partition

Page 37: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Example Blood type distribution in the United States is Type A 41%,

Type B 9%, Type AB 4%, and Type O 46%. 4% of the Army recruits with Type O are classified as Type A,

4% with Type B are classified as Type A, 10% with Type AB are classified as Type A, and 88% with Type A are classified as Type A

Define the relevant events, express the above as probabilities of these events, and find the probability a recruit is classified as type A.

Let A = event, blood type AB = event, blood type BAB = event, blood typeA BO = event, blood type OT = event, classified as type A

P(A) = .41, P(B) = .09, P(AB) = .04, P(O) = .46

P(T|A) = .88, P(T|O) = .04P(T|AB) = .10, P(T|B) = .04

P(T) = (.88)(.41) + (.04)(.46) + (.04)(.09) + (.10) (.04) = .3868

Page 38: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

The Multiplication Rule applied to the Addition Rule

P(A B) = P(A) + P(B) – P(A B)

= P(A) + P(B) – P(A|B) P(B)

= P(A) + P(B) – P(B|A) P(A)

Gosh, both rules at once.

Page 39: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

But if A and B are mutually exclusive…

P(A B) = P(A) + P(B) – P(A B)

Where P(A B) = and

P(B|A) = P(A B) / P(A) =

A B

Note that Ac and Bc are not mutually exclusive.

Page 40: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

A Two Rule Example The 17th National Bank & Trust Company has observed that customers

who have sufficient funds in their checking accounts postdate their checks, by mistake, once every 200 times.

Customers who write checks on insufficient funds postdate them 95% of the time.

Seven percent of the customers have insufficient funds. What is the probability of the bank receiving a postdated check or a

check from an account having insufficient funds?

Ye Olde Solution BoxLet A = the event, check is postdated B = the event, customer has insufficient fundsGiven: P(A|Bc) = .005, P(A|B) = .95 P(B) = .07Required: P(A B) = P(A) + P(B) – P(A|B) P(B) P(A) = P(A|Bc) P(Bc) + P(A|B)P(B) = (.005)(.93) + (.95)(.07) = .07115P(A B) = .07115 + .07 – (.95)(.07) = .07465

17th P(A B) = P(A) + P(B) – P(B|A) P(A)

Page 41: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

One Last Example

Twenty percent of a shipment of preformatted CD’s contain defects.

Twenty-five percent of the defective CD’s also contain a virus.

Thirty-three percent of the non-defective disks also contain a virus.

What is the probability of selecting at random a non-defective disk without a virus?

Page 42: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

One Last Example

Twenty percent of a shipment of formatted CD’s contain defects. Twenty-five percent of the defective CD’s also contain a virus. Thirty-three percent of the non-defective disks also contain a virus. What is the probability of selecting at random a non-defective disk without a virus?

Ye Olde Solution Box:Let A = the event, CD has a defect B = the event, CD contains a virusGiven: P(A) = .2, P(B|A) = .25, P(B|Ac) = .33Required: P(Ac Bc) = 1 – P(A B) = 1 – [P(A) + P(B) – P(B|A)P(A)]

P(B) = P(B|A)P(A) + P(B|Ac )P(Ac) = (.25)(.2) + (.33)(.8) = .314P(Ac Bc) = 1 – [.2 + .314 – (.25)(.2)] = 1 - .464 = .536

Page 43: Probability Chapter 2 Towards a theory of probability… Chapter 2B Will the apple fall? It is a random event

Towards a Theory of Probability…

This has been great! What do we have to look forward to next

time?

And many more examples!