+ All Categories
Home > Documents > Probability Chapter 2 The journey continues… Independence and all that brings! The reverend Bayes...

Probability Chapter 2 The journey continues… Independence and all that brings! The reverend Bayes...

Date post: 30-Dec-2015
Category:
Upload: lily-gray
View: 219 times
Download: 3 times
Share this document with a friend
39
Probability Chapter 2 The journey continues… Independence and all that brings! The reverend Bayes and his theorem Chapter 2C
Transcript

ProbabilityChapter 2

The journey continues…

Independence and all that brings!

The reverend Bayes and his theorem

Chapter 2C

2-6 Independence

Definition (two events)

knowledge that the outcome of an experiment is in event A does not affect the probability that the outcome is in event B.

Independent Events

Tossing two dice where A is the outcome from one die and B the outcome from another die

Repeated tosses of a coin toss 10 heads in a row – the probability of a head on

the next toss is still .5 (fair coin) Sampling with replacement

50 items, 10 defective. Probability of a selecting a defect remains 1/5 for each item selected

Random sampling from an infinite population The probability of an individual having an IQ greater

than 130 is .025

Two Independent EventsNinety percent of all life insurance applications are correctly

submitted to the home office. 1. What is the probability that the next two applications to

be processed by the home office will be incorrect? 2. That at least one will be incorrect?

Let Ai = the event, the ith application is incorrectly submittedGiven: P(Ai) = .10 and the Ai are independent

1. Required: P(A1 A2) = P(A1) P(A2) = (.10) (.10) = .01

2. Required: P(A1 A2) = P(A1) + P(A2) - P(A1) P(A2) = .10 + .10 - (.10) (.10) = .2 - .01= .19

Two Independent Events and the addition rule

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

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

If A and B are independent

I would welcome another example of this important

modification to the addition rule.

On Target

The probability of hitting a target with a bow and arrow is 2/3. What is the probability of hitting the target with two arrows?

Let’s see, the probability of

hitting the target with two tries is 2/3 + 2/3 = 4/3?

A = event, first arrow hits target

B = event, second arrow hits target

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

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

= 2/3 + 2/3 – (2/3)(2/3) = 8/9 = .889

Example 2-34

2-6 Multiplication rule for Independent events

Definition (multiple events)

Multiple Independent Events

Five percent of the population suffer from a some form of lung disease. If ten individuals are to be selected at random to participate in a breathing endurance experiment, what is the probability that none of them will have a lung disease?

Let Ai = the event, the ith individual selected does not have a lung disease.

Given: P(Ai) = .95

Required: P(A1 A2 … A10)

= P(A1) P(A2) … P(An) = .9510 = .5987

What is the probability at least one of the individuals selectedsuffers from a lung disease?Required: P(Ac

1 Ac2 … Ac

10) = 1 - P(A1 A2 … A10) = 1 - .5987 = .4013

Problem 2-107

The probability that a lab specimen contains high levels of contamination is 0.10. Five samples are checked and the samples are independent.

Let Hi = {the ith sample contains high levels of contamination}

a) What is the probability that no sample contains high levels of contamination?

P(H’1 H’2 H’3 H’4 H’5)

= P(H’1)P(H’2)P(H’3)P(H’4)P(H’5) = (1-0.10)5 = (0.90)5

= 0.59

Problem 2-107 Cont’d

b) What is the probability that exactly one sample contains high levels of contamination?

A1 = (H1 H’2 H’3 H’4 H’5)

A2 = (H’1 H2 H’3 H’4 H’5)

A3 = (H’1 H’2 H3 H’4 H’5)

A4 = (H1 H’2 H’3 H4 H’5)

A5 = (H1 H’2 H’3 H’4 H5)

P(Ai) = (0.9)4(0.1) = 0.0656

P(A1 A2 A3 A4 A5) = 5 x (0.0656) = 0.328

Problem 2-107 Cont’d

c) What is the probability that at least one sample contains high levels of contamination?

B = {no sample contains high levels of contamination}

From part a, P(B) = 0.59

P(B’) = 1 – P(B) = 1 – 0.59 = 0.41

A Reliability ProblemAll devices are independent, what is the probability the

circuit operates?

0.9 0.9

0.9

0.8

0.95 0.95

A = {upper devices function}B = {lower devices function}P(A) = (0.9)(0.9)(0.8) = 0.648P(B) = (0.95)(0.95)(0.9) = 0.8123P(A B) = (0.648)(0.8123) = 0.5263P(A B) = P(A) + P(B) – P(A B) = 0.934

Testing for IndependenceA study of the smoking habits and incidence of lung

cancer in a group of men showed the following results: Cancer No Cancer totals

Smoker 0.03 0.72 0.75Nonsmoker 0.005 0.245 0.25totals 0.035 0.965

Would you conclude that smoking and lung cancer areindependent events?

Let S = the event, a smoker C = the event, has lung cancerGiven: P(S C) = .03, P(S Cc) = .72, P(Sc C) = .005, P(Sc Cc) = .245P(S) = .75, P(C) = .035Required: P(S|C) = P(S C)/ P(C) = .03/.035 = .8571 P(S) = .75therefore not independent!

Another Test for Independence

A B

.752

P(A) = .06

A = the event, circuit board has failedB = the event, circuit board experienced excessive vibrationGiven: P(A) = .06, P(B) = .20, P(Ac Bc) = .752

P(B) = .20

Ye Olde Solution box:P(Ac Bc) = P(A B)c = 1 - P(A B) = .752P(A B) = P(A) + P(B) - P(A B) = .248P(A B) = .06 + .20 - .248 =.012 = (.06)(.20) = P(A) P(B)Therefore independent events!

Bayes’ Theorem

Experience the joy of computing conditional probabilities from other conditional probabilities

Thomas Bayes

Born: 1702 in London, EnglandDied: 17 April 1761 in Tunbridge Wells, Kent, England

Mathematician who first used probability inductively and established a mathematical basis for probability inference (a means of calculating, from the number of times an event has not occurred, the probability that it will occur in future trials). He set down his findings on probability in "Essay Towards Solving a Problem in the Doctrine of Chances" (1763), published posthumously in the Philosophical Transactions of the Royal Society of London. Bayes' contributions are immortalized by naming a fundamental proposition in probability, called Bayes Rule, after him.

Bayes Theorem

Sometimes we know one conditional probability, P(A|B) and would like to know the opposite conditional probability, P(B|A). We know

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

Equating the second and fourth terms, P(A|B)P(B) = P(B|A)P(A) P(B|A) = P(A|B)P(B)/P(A), for P(A) > 0

Or P(A|B) = P(B|A)P(A)/P(B), for P(B) > 0

This is a very useful result and can be generalized.

2-7 Bayes’ Theorem – 2 events

Definition

( ) ( | ) ( )( | )

( ) ( | ) ( ) ( | ) ( )c c

P A B P B A P AP A B

P B P B A P A P B A P A

False Positives on Medical Tests

Suppose a medical test gives a positive result if you have a certain disease 99% of the time.

Further, that test gives a positive result if you are OK (do not have disease ) 2% of the time.

The percentage of people in the population having this disease is 1%.

Assume you take the test and get a positive response. What is the likelihood that you have the disease ?

Let A = the event, have disease and B = the event, test is positiveGiven: P(B|A) = .99, P(B|Ac) = .02, P(A) = .01Required: P(A|B) = ?

.99 .01( | ) ( )( | ) .333

( | ) ( ) ( | ) ( ) .99 .01 .02 .99c c

P B A P AP A B

P B A P A P B A P A

False Negatives on Medical Tests

Suppose a certain test gives a positive result if you have a certain disease 99% of the time.

Further, that test gives a positive result if you are OK (do not have disease ) 2% of the time.

The percentage of people in the population having this disease is 1%.

Assume you take the test and get a negative response. What is the likelihood that you do not have the disease ?

Let A = the event, have disease and B = the event, test is positiveGiven: P(B|A) = .99, P(B|Ac) = .02, P(A) = .01Required: P(Ac |Bc ) = ?P(Bc|A) = .01, P(Bc|Ac) = .98, P(Ac) = .99

.98 .99( | ) ( )( | ) .99989694

( | ) ( ) ( | ) ( ) .98 .99 .01 .01

c c cc c

c c c c

P B A P AP A B

P B A P A P B A P A

Bayes Theorem - General

1

( | ) ( )| ; 1, 2,...,

( | ) ( )

j jj n

i ii

P B A P AP A B j n

P B A P A

BA1

A3

A2

P B A P B A P A( ) ( | ) ( ) 3 3 3

P B A P B A P A( ) ( | ) ( ) 1 1 1 P B A P B A P A( ) ( | ) ( ) 2 2 2

2-7 Bayes’ Theorem

Bayes’ Theorem

Yet Another Bayesian Problem

A company receives parts from three suppliers with the following data collected over the last several months.

If a defective item is found, what is the probability it came from supplier A? B? C?

Supplier % Supplied Fractrion defectiveA 0.15 0.02B 0.8 0.01C 0.05 0.03

Bayes – the tabular way

Supplier (Si)

Fraction Supplied P(Si)

Fraction defective P(D|Si) P(Si D) P(Si|D)

A 0.15 0.02 0.003 0.24B 0.8 0.01 0.008 0.64C 0.05 0.03 0.0015 0.12

P(D) = 0.0125

3 3

1 1

( ) ( ) ( | ) ( )i i ii i

P D P S D P D S P S

( | ) ( ) ( )( | )

( ) ( )i i i

i

P D S P S P S DP S D

P D P D

The Tabular Way - Generalized

Event Ei

(partition)

Probability P(Ei)

ConditionalP(B|Ei)

Joint ProbP(Ei B)

Conditional: P(Ei|B)

= P(Ei B) / P(B)

E1 P(E1) P(B|E1) P(E1 B) P(E1|B)

E2 P(E2) P(B|E2) P(E2 B) P(E2|B)

::

::

::

::

::

En P(En) P(B|En) P(En B) P(En|B)

Totals 1.0 n/a P(B) 1.0

1

( | ) ( )( | ) ; 1,...,

( | ) ( )

j jj n

i ii

P B E P EP B E j n

P B E P E

Example of the Tabular Way Five students: Molly, Martha, Mike, Mary, and Mitch have agreed to

take turns attending the ENM 500 distance learning class with Molly attending 30% of the time, Martha 15%, Mike 20%, Mary 25% and Mitch 10%. Before each class, a number is drawn random from a bowl containing the numbers 1 – 100 to determine who will attend that class. That person then logs into the session as “M.”

Historically, when asked a question by the professor, Molly answers correctly 90% of the time, Martha 70% of the time, Mike 50% of the time, Mary 80% of the time, and Mitch 40% of the time.

Given the student known as “M” answered the question correctly, what is the probability that it was Molly, Martha, Mike, Mary, or Mitch?

Molly reviewingher midterm exam.

Random Number student attending class 1 - 30 Molly31 - 45 Martha46 - 65 Mike66 - 90 Mary91 - 100 Mitch

The Solution using the Tabular Way

Ei = the event, student i attends the classB = the event, student answers question correctly

Ei events partition P(Ei) P(B|Ei)

P(Ei B) = P(B|Ei) P(Ei) P(Ei|B)

Molly 0.30 0.9 0.270 0.378Martha 0.15 0.7 0.105 0.147

Mike 0.20 0.5 0.100 0.140Mary 0.25 0.8 0.200 0.280Mitch 0.10 0.4 0.040 0.056

totals 1 0.715 1

Mitch eager to attend class

Summary

( ) 1 ( )

( ) ( ) ( ) ( )

( ) ( ) ( | ) ( )

( )( | )

( )

( | ) ( ) 0 if mutually exclusive

( | ) ( ) if independent

( ) ( ) ( ) if independent

cP A P A

P A B P A P B P A B

P A P B P B A P A

P A BP A B

P B

P A B P A B

P A B P A

P A B P A P B

Truly, a great

summary.

Adventures in Discrete Probability

An eclectic set of probability problems that will tickle your fancy and enhance your learning process.

Problem #1

A manufactured part passes inspection 75% of the time. Four percent of the parts are rejected because of both substandard material and exceeding tolerances. Ninety percent of the parts are produced within tolerances. What is the probability a part is within tolerances but substandard?

Solution box: Let T = the event, exceeds tolerances S = the event, substandardGiven: P(T) = .10; P(T S) = .04; P(T S)c = .75Required: P(S Tc) since P(Tc) = P[(S Tc) (Sc Tc)] = P(S Tc) + P(Sc Tc)and P(Sc Tc) = P(T S)c = .75 .90 = P(S Tc) + .75 or P(S Tc) = .90 - .75 = .15

Problem #1 – the Venn diagram wayLet T = the event, exceeds tolerances S = the event, substandardGiven: P(T) = .10; P(T S) = .04; P(T S)c = .75Required: P(S Tc) = .15

T S

.75

.04.06

.90

Problem #2

Six laptops computers were turned in to the University computer center. Two of the laptops were inoperable but not identified as such. The Engineering Management Department was given 3 of the 6 laptops. What is the probability that at least one of the 3 is inoperable?

P(one or more) = 1 – P(0)

4 2

3 0# (4)(1) 1(0)

6 (20) 5

3

41 (0) .8

5

FavorableP

total

P

Problem #3 Not Another Bayesian Problem

Herman awakes in the middle of the night with a headache and stumbles into the bathroom without turning on the light. In the dark, he grabs one of 3 bottles containing pills and takes a pill from the selected bottle. One hour later he is feeling much worse and recalls that one of the 3 bottles contained birth control pills and the other two aspirin. Herman quickly consults his handy medical text and finds that 80 percent of normal males show his symptoms after taking birth control pills and only 5 percent have these symptoms after taking aspirin.

Given his symptoms, what is the probability that Herman took a birth control pill?

Given his symptoms, what is the probability that Herman took aspirin?

Solving Herman’s Problem with aprobability tree

Aspirin

Birth controlpills

2/3

1/3

symptoms

symptoms

no symptoms

no symptoms

.05

.80

.20

.95

A = event, aspirinS = event, symptoms

P(S|A)P(A)=(.05) (2/3)=.0333

P(Sc|A)P(A)=(.95)(2/3)=.6333

P(S|Ac)P(Ac)=(.8)(1/3)=.2667

P(Sc|Ac)P(Ac)=(.2)(1/3)=.0667

1.0000P(Ac|S) = P(Ac S) / [P(Ac S) + P(A S)]= .2667 / [.2667 + .0333] = .889

Problem #4

A used car salesman is able to sell a car, on the average, once in every 5 customers. If the salesman has 4 customers on a given day, what is the probability of

(a) no sales?

(b) of exactly one sale?

(c) one or more sales?

(d) 4 sales?

Let Si = the event, a car is sold to the ith customerGiven: P(Si) = .2 and independence

Problem #4 solutionLet Si = the event, a car is sold to the ith customerGiven: P(Si) = .2 and independence

(a) no sales? P(Sc1 Sc

2 Sc3 Sc

4 )

= P(Sc1) P(Sc

2) P(Sc3) P(Sc

4) = .84 = .4096

(b) of exactly one sale? P(S1) P(Sc2) P(Sc

3) P(Sc4) + P(Sc

1) P(S2) P(Sc

3) P(Sc4) + P(Sc

1) P(Sc2) P(S3) P(Sc

4) + P(Sc1) P(Sc

2) P(Sc

3) P(S4) = 4(.2)(.8)3 = .4096

(c) one or more sales? 1 - .4096 = .5904

(d) 4 sales? P(S1 S2 S3 S4 ) = .24 = .0016

More of Problem #4 Exactly two sales? P(S1) P(S2) P(Sc

3) P(Sc4) + etc.

= C(4,2) (.2)2 (.8)2 = (6)(.04)(.64) = .1536

Exactly three sales? P(S1) P(S2) P(S3) P(Sc4) + P(S1)

P(S2) P(Sc3) P(S4) + P(S1) P(Sc

2) P(S3) P(S4) + P(Sc1)

P(S2) P(S3) P(S4) = 4(.2)3 (.8) = .0256

Number sales Probability0 0.40961 0.40962 0.15363 0.02564 0.0016

total 1

There must be a better

way?

Next Week

A Better Way

Doing it with random variables

A Random Variable


Recommended