13.3: Conditional Probability and Intersections of Events
Events A and B are independent events if the probability of Event B occurring is the same whether or not Event A occurs.
Suppose we flipped a coin and rolled a die, and wanted to know the probability of getting a head on the coin and a 6 on the die.
Solution
We could list all possible outcomes: \(\{H1,H2,H3,H4,H5,H6,T1,T2,T3,T4,T5,T6\}\).
Notice there are \(2 \cdot 6=12\) total outcomes. Out of these, only 1 is the desired outcome \(\{H6\}\), so the probability is \(\frac{1}{12}\).
Are these events independent?
- A fair coin is tossed two times. The two events are (1) first toss is a head and (2) second toss is a head.
- The two events (1) "It will rain tomorrow in Houston" and (2) "It will rain tomorrow in Galveston” (a city near Houston).
- You draw a card from a deck, then draw a second card without replacing the first.
Solution
- The probability that a head comes up on the second toss is \(\frac{1}{2}\) regardless of whether or not a head came up on the first toss, so these events are independent.
- These events are not independent because it is more likely that it will rain in Galveston on days it rains in Houston than on days it does not.
- The probability of the second card being red depends on whether the first card is red or not, so these events are not independent.
When two events are independent, the probability of both occurring is the product of the probabilities of the individual events.
If events \(A\) and \(B\) are independent, then the probability of both \(A\) and \(B\) occurring is \(P(A \text { and } B)=P(A) \cdot P(B)\)
If you look back at the coin and die example from earlier, you can see how the number of outcomes of the first event multiplied by the number of outcomes in the second event equals the total number of possible outcomes in the combined event.
In your drawer you have 10 pairs of socks, 6 of which are white, and 7 tee shirts, 3 of which are white. If you randomly reach in and pull out a pair of socks and a tee shirt, what is the probability both are white?
Solution
The probability of choosing a white pair of socks is \(\frac{6}{10}\).
The probability of choosing a white tee shirt is \(\frac{3}{7}\).
The probability of both being white is \(\frac{6}{10} \cdot \frac{3}{7}=\frac{18}{70}=\frac{9}{35}\)
A card is pulled a deck of cards and noted. The card is then replaced, the deck is shuffled, and a second card is removed and noted. What is the probability that both cards are Aces?
- Answer
-
Since the second draw is made after replacing the first card, these events are independent. The probability of an ace on each draw is \(\frac{4}{52}=\frac{1}{13},\) so the probability of an Ace on both \(\operatorname{draws}\) is \(\frac{1}{13} \cdot \frac{1}{13}=\frac{1}{169}\)
The table below shows the number of survey subjects who have received and not received a speeding ticket in the last year, and the color of their car. Find the probability that a randomly chosen person:
- Has a red car and got a speeding ticket
- Has a red car or got a speeding ticket.
\(\begin{array}{|l|l|l|l|}
\hline & \begin{array}{l}
\text { Speeding } \\
\text { ticket }
\end{array} & \begin{array}{l}
\text { No speeding } \\
\text { ticket }
\end{array} & \text { Total } \\
\hline \text { Red car } & 15 & 135 & 150 \\
\hline \text { Not red car } & 45 & 470 & 515 \\
\hline \text { Total } & 60 & 605 & 665 \\
\hline
\end{array}\)
Solution
We can see that 15 people of the 665 surveyed had both a red car and got a speeding ticket, so the probability is \(\frac{15}{665} \approx 0.0226\).
Notice that having a red car and getting a speeding ticket are not independent events, so the probability of both of them occurring is not simply the product of probabilities of each one occurring.
We could answer this question by simply adding up the numbers: 15 people with red cars and speeding tickets + 135 with red cars but no ticket + 45 with a ticket but no red car = 195 people. So the probability is \(\frac{195}{665} \approx 0.2932\).
We also could have found this probability by:
\(\mathrm{P}(\text {had a red car})+\mathrm{P}(\text {got a speeding ticket})-\mathrm{P}(\text {had a red car and got a speeding ticket}) =\frac{150}{665}+\frac{60}{665}-\frac{15}{665}=\frac{195}{665} \nonumber\)
Conditional Probability
Often it is required to compute the probability of an event given that another event has occurred.
What is the probability that two cards drawn at random from a deck of playing cards without replacement will both be aces?
Solution
It might seem that you could use the formula for the probability of two independent events and simply multiply \(\frac{4}{52} \cdot \frac{4}{52}=\frac{1}{169}\). This would be incorrect, however, because the two events are not independent. If the first card drawn is an ace, then the probability that the second card is also an ace would be lower because we did not replace the first ace and therefore there would only be three aces left in the deck.
Once the first card chosen is an ace, the probability that the second card chosen is also an ace is called the conditional probability of drawing an ace. In this case the "condition" is that the first card is an ace. Symbolically, we write this as:
\(P\)(ace on second draw | an ace on the first draw).
The vertical bar "|" is read as "given," so the above expression is short for "The probability that an ace is drawn on the second draw given that an ace was drawn on the first draw." What is this probability? After an ace is drawn on the first draw, there are 3 aces out of 51 total cards left. This means that the conditional probability of drawing an ace after one ace has already been drawn is \(\frac{3}{51}=\frac{1}{17}\).
Thus, the probability of both cards being aces is \(\frac{4}{52} \cdot \frac{3}{51}=\frac{12}{2652}=\frac{1}{221}\).
The probability the event \(B\) occurs, given that event \(A\) has happened, is represented as
\(P(B | A)\)
This is read as “the probability of \(B\) given \(A\)”
Find the probability that a die rolled shows a 6, given that a flipped coin shows a head.
Solution
These are two independent events, so the probability of the die rolling a 6 is \(\frac{1}{6}\), regardless of the result of the coin flip.
The table below shows the number of survey subjects who have received and not received a speeding ticket in the last year, and the color of their car. Find the probability that a randomly chosen person:
a) Has a speeding ticket given they have a red car
b) Has a red car given they have a speeding ticket
\(\begin{array}{|l|l|l|l|}
\hline & \begin{array}{l}
\text { Speeding } \\
\text { ticket }
\end{array} & \begin{array}{l}
\text { No speeding } \\
\text { ticket }
\end{array} & \text { Total } \\
\hline \text { Red car } & 15 & 135 & 150 \\
\hline \text { Not red car } & 45 & 470 & 515 \\
\hline \text { Total } & 60 & 605 & 665 \\
\hline
\end{array}\)
Solution
a) Since we know the person has a red car, we are only considering the 150 people in the first row of the table. Of those, 15 have a speeding ticket, so
P(ticket | red car) = \(\frac{15}{150}=\frac{1}{10}=0.1\)
b) Since we know the person has a speeding ticket, we are only considering the 60 people in the first column of the table. Of those, 15 have a red car, so
P(red car | ticket) = \(\frac{15}{60}=\frac{1}{4}=0.25\).
Notice from the last example that \(P(B | A)\) is not equal to \(P(A | B)\).
These kinds of conditional probabilities are what insurance companies use to determine your insurance rates. They look at the conditional probability of you having accident, given your age, your car, your car color, your driving history, etc., and price your policy based on that likelihood.
If Events \(A\) and \(B\) are not independent, then
\(P(A \text { and } B)=P(A) \cdot P(B | A)\)
If you pull 2 cards out of a deck without replacement, what is the probability that both are spades?
Solution
The probability that the first card is a spade is \(\frac{13}{52}\).
The probability that the second card is a spade, given the first was a spade, is \(\frac{12}{51}\), since there is one less spade in the deck, and one less total cards.
The probability that both cards are spades is\(\frac{13}{52} \cdot \frac{12}{51}=\frac{156}{2652} \approx 0.0588\)
If you draw two cards from a deck without replacement, what is the probability that you will get the Ace of Diamonds and a black card?
Solution
You can satisfy this condition by having Case A or Case B, as follows:
Case A) you can get the Ace of Diamonds first and then a black card or
Case B) you can get a black card first and then the Ace of Diamonds.
Let's calculate the probability of Case A. The probability that the first card is the Ace of Diamonds is \(\frac{1}{52}\). The probability that the second card is black given that the first card is the Ace of Diamonds is \(\frac{26}{51}\) because 26 of the remaining 51 cards are black. The probability is therefore \(\frac{1}{52} \cdot \frac{26}{51}=\frac{1}{102}\).
Now for Case B: the probability that the first card is black is \(\frac{26}{52}=\frac{1}{2}\). The probability that the second card is the Ace of Diamonds given that the first card is black is \(\frac{1}{51}\). The probability of Case B is therefore \(\frac{1}{2} \cdot \frac{1}{51}=\frac{1}{102}\), the same as the probability of Case 1.
Recall that the probability of \(A\) or \(B\) is \(P(\mathrm{A})+P(\mathrm{B})-P(\mathrm{A} \text { and } \mathrm{B})\). In this problem, \(P(\mathrm{A} \text { and } \mathrm{B}) = 0\) since the first card cannot be the Ace of Diamonds and be a black card. Therefore, the probability of Case A or Case B is \(\frac{1}{102}+\frac{1}{102}=\frac{2}{102}=\frac{1}{51}\). The probability that you will get the Ace of Diamonds and a black card when drawing two cards from a deck is \(\frac{1}{51}\).
In your drawer you have 10 pairs of socks, 6 of which are white. If you reach in and randomly grab two pairs of socks without replacement, what is the probability that both are white?
- Answer
-
\(\frac{6}{10} \cdot \frac{5}{9}=\frac{30}{90}=\frac{1}{3}\)
A home pregnancy test was given to women, then pregnancy was verified through blood tests. The following table shows the home pregnancy test results. Find
a) \(P\)(not pregnant | positive test result)
b) \(P\)(positive test result | not pregnant)
\(\begin{array}{|l|l|l|l|}
\hline & \begin{array}{l}
\text { Positive } \\
\text { test }
\end{array} & \text { Negative test } & \text { Total } \\
\hline \text { Pregnant } & 70 & 4 & 74 \\
\hline \text { Not Pregnant } & 5 & 14 & 19 \\
\hline \text { Total } & 75 & 18 & 93 \\
\hline
\end{array}\)
Solution
a) Since we know the test result was positive, we’re limited to the 75 women in the first column, of which 5 were not pregnant. \(P\)(not pregnant | positive test result) = \(\frac{5}{75} \approx 0.067\).
b) Since we know the woman is not pregnant, we are limited to the 19 women in the second row, of which 5 had a positive test. \(P\)(positive test result | not pregnant) = \(\frac{5}{19} \approx 0.263\).
The second result is what is usually called a false positive: A positive result when the woman is not actually pregnant.