If two events are not independent, then the outcome of one event can change the probability of the second event occurring. Understanding the connection between these helps us make better predictions and decisions based on specific situations. Use this resource to learn about the concept of conditional probability.
Conditional probability is the chance that something happens, given that another event has already occurred.
Pulling different coloured marbles from a bag without replacing them is a good example to demonstrate conditional probability. Image by InspiredImages, via Pixabay
Dependent events
Conditional probability often involves dependent events. Two events are dependent if the outcome or occurrence of the first affects the probability of the second.
For example, if you draw a card from a deck and don't replace it, the probability of drawing a second card of a certain type depends on the first draw.
In the same way, if you know that it is raining, the chance of carrying an umbrella might be higher.
When two events, \(A\) and \(B\), are dependent, the probability of both occurring is given by:
\[\Pr(A\textrm{ and }B)=\Pr(A\cap B)=\Pr(A)\times \Pr(B|A)\]
We can rearrange this rule to find conditional probability. The probability of \(B\) given that \(A\) has occurred already is given by \(\Pr(B|A)\), where:
\[\Pr(B|A)=\dfrac{\Pr(A\cap B)}{\Pr(A)}\]
The probability of \(A\) given that \(B\) has occurred already is given by \(\Pr(A|B)\), where:
\[\Pr(A|B)=\dfrac{\Pr(A\cap B)}{\Pr(B)}\]
Example 1 – calculating conditional probability
A card is chosen at random from a pack. If the first card chosen is the jack of diamonds and it is not replaced, what is the probability that the second card is:
a diamond?
a jack?
the queen of clubs?
Because the first card was the jack of diamonds and not replaced, there is one less diamond in the pack and one less card in the pack. There are \(12\) diamonds remaining in the deck of \(51\) cards. Here, the second event is dependent on the first event because there is no replacement of cards.
\[\begin{align*} \Pr(\diamondsuit_{2}|J\diamondsuit_{1}) & = \frac{12}{51}\\
& = \frac{4}{17}
\end{align*}\]
After a jack of diamonds is drawn, there are \(3\) jacks remaining in the deck of \(51\) cards. Here, the second event is also dependent on the first event because there is no replacement of cards
\[\begin{align*} \Pr(J_{2}|J\diamondsuit_{1}) & = \frac{3}{51}\\
& = \frac{1}{17}
\end{align*}\]
There is only \(1\) queen of clubs in the remaining deck of \(51\) cards. Here, the second event is independent of the first event.
\[\Pr(Q\clubsuit_{2}|J\diamondsuit_{1}) = \frac{1}{51}\]
Find the probability of obtaining two jacks if two cards are drawn is succession from a pack:
with replacement
without replacement.
If the cards are replaced, then the events are independent.
\[\begin{align*} \Pr(J_{1}\cap J_{2}) & = \Pr(J_{1})\times Pr(J_{2})\\
& = \frac{4}{52}\times\frac{4}{52}\\
& = \frac{1}{169}
\end{align*}\]
If the cards are not replaced, then the probability of the second draw depends on the first draw—that is, they are dependent and the probability is conditional.
\[\begin{align*} \Pr(J_{1}\cap J_{2}) & = \Pr(J_{1})\times \Pr(J_{2}|J_{1})\\
& = \frac{4}{52}\times\frac{3}{51}\\
& = \frac{1}{221}
\end{align*}\]
Find the \(\Pr(A|B)\) if \(\Pr(A)=0.7\), \(\Pr(B)=0.5\) and \(\Pr(A\cup B)=0.8\).
Then, we can use the conditional probability equation:
\[\begin{align*} \Pr(A|B) & = \frac{\Pr(A\cap B)}{\Pr(B)}\\
& = \frac{0.4}{0.5}\\
& = 0.8
\end{align*}\]
In a class of \(15\) girls and \(12\) boys, two students are to be randomly chosen to collect homework. What is the probability that both students chosen are girls?
If one girl is chosen first, there will be \(14\) girls out of the remaining \(26\) students to pick from. This probability is conditional.
\[\begin{align*} \Pr(G_{1}\cap G_{2}) & = \Pr(G_{1})\times \Pr(G_{2}|G_{1})\\
& = \frac{15}{27}\times\frac{14}{26}\\
& = \frac{210}{702}\\
& = \frac{35}{117}
\end{align*}\]
Given the information in the following table, find the probability that someone was sunburnt given that they were not wearing a hat.
Sunburnt
Not sunburnt
Hat
\(3\)
\(77\)
\(80\)
No hat
\(12\)
\(8\)
\(20\)
\(15\)
\(85\)
\(100\)
We can let \(H'\) be the event where a person is not wearing a hat. We are looking for \(\Pr(S|H')\), the probability that a person is sunburnt, given that they were not wearing a hat.
Another way to do conditional probability is to reduce the sample space. The total sample space is \(100\) people. We can reduce this by excluding people wearing a hat. The sample space becomes \(20\).
Of this \(20\), \(12\) got sunburnt, so:
\[\begin{align*} \Pr(S|H') & = \frac{12}{20}\\
& = \frac{3}{5}
\end{align*}\]
Exercise – calculating conditional probability
The results of a survey of music preferences are shown in the Venn diagram. Music Survey, by RMIT is licensed under CC BY 4.0
Find the probability that a student likes live music given that they like karaoke.
Three cards are chosen at random from a pack without replacement. What is the probability of choosing \(3\) aces?
In a maths class of \(20\) students, \(5\) failed the final exam. If \(2\) students are chosen at random without replacement, what is the probability that the first passed but the second failed?
If \(\Pr(X)=0.5\), \(\Pr(Y)=0.5\) and \(\Pr(X\cap Y)=0.2\), find the probability of:
\(\Pr(X|Y)\)
\(\Pr(X\cup Y)\)
\(\Pr(X)\times \Pr(Y|X)\)
In a family with three children, what is the probability that all three children will be girls given that the first child is a girl?