Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 Lecture 4: Conditional Probability 1 Conditional Probability, Total Probability Rule Instructor: Kaveh Zamani Course material mainly developed.

Similar presentations


Presentation on theme: "Lecture 4 Lecture 4: Conditional Probability 1 Conditional Probability, Total Probability Rule Instructor: Kaveh Zamani Course material mainly developed."— Presentation transcript:

1 Lecture 4 Lecture 4: Conditional Probability 1 Conditional Probability, Total Probability Rule Instructor: Kaveh Zamani Course material mainly developed by previous instructors: Profs. Mokhtarian and Kendall, Ms. Reardon

2 Reminder Lecture 4: Conditional Probability 2 Previous Lecture: - Axioms of probability P(S) =1 0  P(A)  1 A 1 and A 2 with A 1 ∩ A 2 = ∅ P(A 1 ∪ A 2 ) = P(A 1 ) + P(A 2 ) - Probability of multiplication - Mutually exclusive events Next session:  Reading: section 2.7 text book  HW #2: posted on SmartSite problems:

3 Definition Lecture 4: Conditional Probability 3  Sometimes probabilities need to be reevaluated as additional information becomes available  The probability of an event B under the knowledge that the outcome will be in event A is denoted as: P(B|A)  This is called the conditional probability of B given A

4 Example 1,2 Lecture 4: Conditional Probability 4  A: event of rainy day in May B: event of day colder than 40 °F in May P(A|B) > P(A) Chance of rain in a cold weather is higher than the average chance of rain!  A: event of certain heart disease in people older than 60 B: event of abdominal obesity in people older than 60 P(A)= 10% Probability of the heart disease P(B)= 30% Probability of abdominal obesity P(B’)=1-P(B) Probability of being slim P(A|B)= 20% probability of the heart disease given that the person is fat P(A|B) > P(A), P(A|B’)< P(A)

5 Example 3: Welding (Page 41) Lecture 4: Conditional Probability 5  Automatic welding devices have error rates of 1/1000  Errors are rare, but when they occur, because of wearing of the device, they tend to occur in groups that affect many consecutive welds  If a single weld is performed, we might assume the probability of an error as 1/1000  However, if the previous welding was wrong, because of the wearing, we might believe that the probability that the next welding is wrong is greater than 1/1000, [P(W i+1 |W i )>1/1000]

6 Example 4: Manufacturing (Page 42) Lecture 4: Conditional Probability 6 D : a part of a steel column is defective F : a part of a steel column has a surface defect, P(F) = 0.10, P(D|F) = 0.25 and P(D|F’) = 0.05

7 Conditional Probability Lecture 4: Conditional Probability 7 The conditional probability of an event B given an event A, denoted as P(B|A), is P(B|A) = P(B ∩ A) / P(A) for P(A)>0 Therefore, P(B|A) can be interpreted as the relative frequency of event B among the trials that produce an outcome in event A It is like scaling down to a smaller sample space

8 Example 4 Lecture 4: Conditional Probability 8 D = a part is defective F = a part has a surface flaw [ P(F) = 0.10 ] P(D|F) = 0.25 and P(D|F’) = 0.05 P(D|F) = P(D ∩ F) / P(F) = 0.025 / 0.1 = 0.25

9 Example 5: (2-78, Page 45) Lecture 4: Conditional Probability 9 100 samples of a cast aluminum part are summarized as: P(A) = 82/100 = 0.82 P(B) = 90/100 = 0.90 P(B|A)= 80/82 = 0.9756 P(A|C)= 2/10 = 0.2 P(A|B)= 80/90 = 0.889

10 Exercise 2-85 (Page 46) Lecture 4: Conditional Probability 10  A batch of 350 steel bars contains 8 that are defective, 2 are selected, at random, without replacement from the batch  What is the probability that … : 1) both are defective? P(D 1 ∩ D 2 ) = P(D 1 |D 2 ) P(D 2 ) = P(D 1 ) P(D 2 ) = 8/350 ⋅ 7/349 = 0.000458 2) the second one selected is defective given that the first one was defective? P(D 2 |D 1 ) = P(D 2 ∩ D 1 ) / P(D 1 ) = 0.000458/(8/350) = 0.020057 = (7/349) 3) both are acceptable? P(D 1 ’ ∩ D 2 ’) = P(D1’|D2’) P(D2’) = P(D1’) P(D2’)= 342/350 ⋅ 341/349 = 0.954744

11 Exercise 2-85 (Cont.) Lecture 4: Conditional Probability 11 Reminder: De Morgan’s rule P(A’)=1-P(A)  The probability that both are acceptable can also be found as follows: P(D 2 ∩ D 1 )=P[(D 2 ∪ D 1 )’]=1-P(D 2 ∪ D 1 ) =1-[P(D 1 )+P(D 2 )-P(P(D 2 ∩ D 1 )] = 1-[8/350+8/350-0.000458]=0.954744  We are looking at the event (D1 or D2), so P(D2) depends on the outcome of the first selection, which can be either defective or acceptable  Therefore, we can use the TOTAL PROBABILITY RULE, to obtain: P(D 2 )=P(D 2 |D 1 )P(D 1 )+P(D 2 |D’ 1 )P(D’ 1 ) =7/349.8/350+8/349.342/350=8/350

12 Multiplication Rule Lecture 4: Conditional Probability 12  When the probability of the intersection is needed: P(A ∩ B) = P(B|A) P(A) = P(A|B) P(B)  Example: a concrete batch passes compressive tests with P(A) = 0.90; a second concrete batch is known to pass the tests if the first already does, with P(B|A) = 0.95 What is the probability P(A ∩ B) that both pass the tests? Ans: P(A ∩ B) = P(B|A) P(A) = 0.95 ⋅ 0.90 = 0.855 Note: it is also true that P(A ∩ B) = P(A|B) P(B), but the Information provided in the question does not match this second formulation

13 Total Probability Rule Lecture 4: Conditional Probability 13  Sometimes, the probability of an event can be recovered by summing up a series of conditional probabilities.  Everyday life example: If a student is undergrad there is 60% chance he/she passes ECI- 114, and if he/she is a grad student there is 70% chance he/she passes Eci-114. P(A): Student is undergrad (55%) P(A’): Student is grad (45%) P(B): he/she passes ECI-114 P(B)= P(B ∩ A) + P(B ∩ A’)= P(B|A) P(A) + P(B|A’) P(A’) = 60/100.55/100+70/100.45/100 = 33/100+31.5/100=64.5/100

14 Total Probability Rule Lecture 4: Conditional Probability 14 For two events we have: P(B) = P(B ∩ A) + P(B ∩ A’) = P(B|A) P(A) + P(B|A’) P(A’)

15 Total Probability Rule for Multiple Events Lecture 4: Conditional Probability 15 For several mutually exclusive and exhaustive events we have: P(B) = P(B ∩ E 1 ) + P(B ∩ E 2 ) +...+ P(B ∩ E k ) = P(B|E 1 )P(E 1 ) + P(B|E 2 ) P(E 2 ) + … + P(B|E k ) P(E k )  Exhaustive Events: E 1 ∪ E 2 ∪ … ∪ E k = S  Mutually Exclusive Event: can NOT happen at the same time P(E i ∩ E j )=0 (i ≠ j)

16 Example 1 (Page 48) Lecture 4: Conditional Probability 16  A member fails when subjected to various stress levels, with the following probability Probability of Failure Level of stressProbability of stress level 0.1High0.2 0.005Not high0.8  Let F: Failure and H: member has high stress level  What is the probability of failure of the member? Ans. P(F) = P(F|H) P(H) + P(F|H’) P(H’) = 0.10 ⋅ 0.20 + 0.005 ⋅ 0.80 = 0.024 Sum is 1

17 Example 2 (Page 48) Lecture 4: Conditional Probability 17  A water treatment unit fails when subjected to various contamination levels, with the following probability Probability of Failure Contamination Level Probability of Level 0.1High0.2 0.01Medium0.3 0.001Low0.5  Let H, M, L = member has high/medium/low contamination level Ans. P(F) = P(F|H) P(H) + P(F|M) P(M) + P(F|L) P(L) = 0.10 ⋅ 0.20 + 0.01 ⋅ 0.30 + 0.001 ⋅ 0.50 = 0.0235

18 Example 2 (Cont.) Lecture 4: Conditional Probability 18  Tree diagram for the same example can be used too:

19 Exercise 2-96 (Page 50) Lecture 4: Conditional Probability 19  Building failures are due to either natural actions N (87%) or M man-made causes (13%)  Natural actions include: earthquakes E (56%), wind W (27%), and snow S (17%)  Man-made causes include: construction errors C (73%) or design errors D (27%) 1)What is the probability of failure due to construction errors? Ans. P(F) = P(C|M) P(M) = 0.73 ⋅ 0.13 = 0.0949 2) What is the probability of failure due to wind or snow? Ans. P(F) = [P(W|N) + P(S|N)] P(N) = [0.27 + 0.17] ⋅ 0.87 = 0.3828

20 Monday before class Lecture 4: Conditional Probability 20  Problems HW set 2  2-51  2-62  2-68  2-69  2-75  2-88  2-95  Reading Bayes’ Theorem (Pages 55-59)


Download ppt "Lecture 4 Lecture 4: Conditional Probability 1 Conditional Probability, Total Probability Rule Instructor: Kaveh Zamani Course material mainly developed."

Similar presentations


Ads by Google