Conditional Probability
Conditional probability is all about updating a probability based on some knowledge of the situation being modeled. For instance, does your personal probability, about carrying an umbrella with you today, change dependent on whether or not it is raining outside?
There is a formula to update a probability based on surrounding contextual information. If this extra information has something to say about the probability of interest, then the probability might change. On the other hand, if the extra information is completely irrelavent, then we expect the probability not to change at all.
Let's first review some notation. For a random variable
The notation and language can vary across different sources. For
example, it's also common just to see
Further, it's common to use language such as the event
This introduction to conditional probability will take these notational and language conveniences, so that we can better understand questions like
What's the conditional probability that the sum of two dice is at least 6, given that one die shows 3?
For this question, the events are the sum of the two dice is at least
Formula
Let
where
Notice that the event claimed to be known is called "given" and
follows the pipe
Example 1
What's the conditional probability that the sum of two dice is at least 6, given that one die shows 3?
Let
Then we are interested in finding
The numerator,
The difference between
On the other hand, for
For the probability of
It is only in the conditional probability that the number of possible
outcomes changes; effectively from
Of the
Example 2
A survey of
Residence\Class | Freshman | Sophomore | Junior | Senior |
---|---|---|---|---|
Dormitory | 89 | 34 | 46 | 15 |
Apartment | 32 | 17 | 22 | 48 |
With Parents | 13 | 31 | 3 | 0 |
Suppose you meet a fellow student of the university from which the survey was taken and you learn that this student lives in an apartment. What is the probability that this student is a sophomore?
Such a scenario is more commonly written as, What is the probability that a student is a sophomore given that the student lives in an apartment?
In either case, this is question about conditional probability.
Let's first define our events. Let
The probability that a student is a sophomore and lives in an
apartment is
The probability that a student (of any class) lives in an apartment is
With these two probabilities, we can compute
Practice
Suppose two fair dice are rolled[3].
a. What is the conditional probability that one turns up two, given they show different numbers?
b. What is the conditional probability that the first turns up six, given that the
sum is
c. What is the conditional probability that at least one turns up six,
given that the sum is
Independence
Two events,
Notice, that
This definition also coincides nicely with the definition of
conditional probability. If
so that indeed, there is no information in
Law of Total Probability
Consider the following picture.
Notice that each
The sets
By the formula for conditional probability, we can write
or
The Law of Total probability says that we can find
Example 1
Suppose we conduct the following experiment[5]. First, we flip a fair
coin. If heads comes up, then we roll one die and take the result. If
tails comes up, then we roll two dice and take the sum of the two
results. What is the probability that this process yields a
Let
Since the coin is fair, we know
Example 2
Suppose[6] the AFC
Bournemouth forward
Justin Kluivert
shoots
Let
We this notation, we have
Bayes' Theorem
Bayes' Theorem is often described as the way to reverse conditional
probabilities, if you have
Symbollically, it's just conditional probability twice, together with the Law of Total Probability:
Example 1
A factory produces electrical components using two machines: Machine
Let
We know that
We can now put these pieces together to get
Example 2
Some doctors recommend that men over the age of
Our goal is to find
Since
The surprising part of this example is the relatively low probability
of having the disease even after a positive test result. The fact is
due to the incredibly low base rate of anybody having the disease,
We can relate the difference between
and to our example of how likely you are to carry an umbrella with you today. The probability describes the probability you will carry an umbrella with you today and it is raining, before you have looked outside. The probability describes the probability your carry an umbrella with you today, after having looked outside and observed that it is raining. âŠī¸ This example was borrowed from Maxie Inigo, Jennifer Jameson, Kathryn Kozak, Maya Lanzetta, & Kim Sonier, taken from the LibreTexts page Conditional Probabilities on 2025-03-24. âŠī¸
This example was borrowed from Paul Pfeiffer, taken from the LibreTexts page Problems on Conditional Probability on 2025-03-24. âŠī¸
The notation
is the set of all integers from to including both and , namely . âŠī¸ This example was borrowed from Eric Lehman, F. Thomson Leighton, and Alberty R. Meyer, taken from the LibreTexts page The Law of Total Probability on 2025-03-31. âŠī¸
All of these numbers are made up. âŠī¸