Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conditional Probability Brian Carrico Nov 5, 2009.

Similar presentations


Presentation on theme: "Conditional Probability Brian Carrico Nov 5, 2009."— Presentation transcript:

1 Conditional Probability Brian Carrico Nov 5, 2009

2 What is Probability? Predicting a random event – A random event is one in which individual outcomes are uncertain but the long-term pattern of many individual outcomes is predictable and every possible outcome can be described prior to its performance We can use the long-term patterns to predict individual outcomes

3 What is Conditional Probability? In some situations current or previous conditions have an impact on the probability Examples: – Weather – Stock Market – Genetics – Card games

4 What sort of factors can impact probability? What is the probability of rolling an even number on a fair six-sided die? – 1/2 What if you’re told the roll was less than 4? – 1/3 How did you come up with that?

5 Basic Formula for Conditional Probability P(A|B) = P(A∩B) P(B)

6 Some Practice P(Female) P(Female|Democrat) P(Republican) P(Republican|Male) 47/100 = 0.47 21/39 = 0.538 42/100 = 0.42 24/53 = 0.453 DemRepIndTotal Female2118847 Male18241153 Total394219100

7 Law of Total Probability If A is some event and {B 1, B 2, … B n } forms a partition of the sample space then: P(A)=ΣP(A|B i )*P(B i )

8 Proving P(A)=ΣP(A|B i )*P(B i ) U{B 1, B 2,…, B n } = S P(A) = P(A∩S) P(A) = P(A∩(U{B 1, B 2,…, B n } )) P(A) = P(U{A∩B 1, A∩B 2,…, A∩B n }) P(A) = ΣP(A∩B i ) P(A) = ΣP(A|B i )*P(B i )

9 Using the Law of Total Probability Suppose you have two urns containing balls colored green and red. Urn I contains 4 green balls and 6 red balls, Urn II contains 6 green balls and 3 red balls. A ball is moved from Urn I to Urn II at random then a ball is drawn from Urn II. Find the probability that the ball drawn from Urn II is green.

10 Urn Problem Continued Events: – G 1 =Ball transferred from Urn I to Urn II is Green – R 1 =Ball transferred from Urn I to Urn II is Red – G 2 =Ball drawn from Urn II is Green We want P(G 2 ) We have – P(G 2 )= P(G 2 |G 1 )*P(G 1 ) + P(G 2 |R 1 )*P(R 1 ) – P(G 2 )=(7/10)*(4/10) + (6/10)*(6/10) – P(G 2 )=28/100+36/100=64/100

11 Bayes’ Rule If A is some event and {B 1, B 2, … B n } forms a partition of the sample space then: P(B j |A)= _P(A|B j )*P(B j ) ΣP(A|B i )*P(B i )

12 Using Bayes’ Rule You are tested for a disease that occurs in 0.1% of the population. Your physician tells you that the test is 99% accurate. If the test comes back positive, what is the probability that you have the disease? Events: – T=positive testD=you have the disease

13 Test result continued Given Probabilities: – P(D)=0.001P(T|D)=0.99P(T|D c )=0.01 We want P(D|T) From Bayes’ Rule we know – P(D|T)= P(T|D)*P(D)___ P(T|D)*P(D)+ P(T|D c )*P(D c ) – P(D|T)= (0.99*0.001)_ (0.99*0.001)+(0.01*0.999) – P(D|T)=0.09

14 Testing Independence If A and B are two independent events then P(A|B)=P(A) Using formulas from earlier we can see that P(A|B)=P(A∩B)=P(A) P(B) So, P(A∩B)=P(A)*P(B)

15 A test of Independence A fair coin is tossed twice. Are the following events independent? – A= 1 st toss lands heads B= 2 nd toss lands heads S={HH,HT,TH,TT} P(A)=1/2 P(B)=1/2 P(A∩B)=1/4 P(A)*P(B)=1/2*1/2=1/4=P(A∩B)

16 Homework

17 Sources Probability Models by John Haigh 2002 Probability by Larry Leemis 2009


Download ppt "Conditional Probability Brian Carrico Nov 5, 2009."

Similar presentations


Ads by Google