---
title: "Conditional Probability"
canonical: "https://modelassist.epixanalytics.com/space/EA/26574945/Conditional%20Probability"
format: markdown
---
If *A* and *B* are two events, the probability that B will occur given A has already occurred is written as *P(B|A)*, which reads probability B given A. It is called the conditional probability of *B* given *A*.


If *A* and *B* are independent, the occurrence of *B* will not affect the probability of *A*, and vice versa, in which case:


*            P(B*|*A)* = *P(B)*             and                          *P(A*|*B)* = *P(A)*


The probability of both *A* and *B* occurring, denoted P(A ∩ B) is given by:

![image](media://a9ccda4e-6463-437d-8678-f1681de79e56)


> Macro (mathblock)


but if *A* and *B* are independent;

![image](media://034d885b-f428-4c85-b85f-f18c72b37516)

> Macro (mathblock)


This can be extended to several events, e.g.:

![image](media://a319a8fc-93f7-45bc-bbff-9628c928c380)

> Macro (mathblock)


and if *A*, *B*, and *C* are independent:

![image](media://f0d8f9b0-3fd5-41c2-a6e9-bb8d8bc7c79c)

> Macro (mathblock)

### ***Example***

A box contains 5 yellow balls and 2 green balls. What is the probability that three balls randomly taken from the box (without replacement) will all be yellow?


*A* = first ball is yellow

*B* = second ball is yellow

*C* = third ball is yellow

![image](media://93155f34-53b6-42e6-a18d-b0e2c623c961)


> Macro (mathblock)


                         

> Macro (inline-media-image)

              i.e. 5 yellow balls in a box of 7

> Macro (mathinline)




               

> Macro (inline-media-image)

            i.e. 4 yellow balls left in a box of 6

> Macro (mathinline)



            

> Macro (inline-media-image)

           i.e. 3 yellow balls left in a box of 5

> Macro (mathinline)




Thus:

![image](media://477a5bfc-b3e8-4b74-9221-da2b27f20338)

> Macro (mathblock)


If the balls were replaced after each draw, then each draw's results would be independent of the others, and we would have P(A) = P(B) = P(C ) = 5/7, and

![image](media://2c8dd40a-af93-4d96-95d2-f2a600de7965)

> Macro (mathblock)

### ***Example***

In a certain country, 10% of all people own a motorcycle of 500cc or more, 15% of all people own a leather jacket and 51% are female. What is the probability that a randomly selected person from that country: a) owns a leather jacket and a motorcycle of 500cc or more, b) owns a leather jacket and a motorcycle of 500cc or more and is male?


If we ignored conditional probabilities, we might say:

a)    Probability = 15% * 10% = 1.5%

b)    Probability = 15% * 10% * 49% = 0.74%


However, intuitively, we know that *the vast majority* of all riders of large motorcycles are male and that the vast majority of *them* would never dream of going without a leather jacket. In other words, the probabilities of selection are strongly conditional. We need to work out:


a)    Probability = P(owns large motorcycle)*P(owns leather jacket|owns large motorcycle) » P(owns large motorcycle) = 10%

b)    Probability = P(owns large motorcycle)*P(owns leather jacket|owns large motorcycle)*P(male|owns leather jacket *and* owns large motorcycle) » P(owns large motorcycle) = 10%


In both cases, the motorcycle sub-population was the smallest we could choose, and so provides us with the best estimate. However, we could do a lot better if we were to survey the motorcycle owners and find out what proportion are female and what proportion of both sexes own a leather jacket.




---