Subsection 5.2.1 Conditional Probability
Recall in the previous section we used a contingency table to determine the probability that a pet-owning household has a cat or a dog. We also may wonderwhat percentage of dog-owning households also own a cat? In this case the group that we are interested in isn’t every household surveyed (the grand total), but just those households that own a dog.
| Cat |
52 |
128 |
180 |
| No Cat |
43 |
27 |
70 |
| Total |
95 |
155 |
250 |
We call this a conditional statement because we are only considering the households with a certain condition. If we focus on the column representing the households that own a dog, we see that there is a total of 95 households with a dog, and that 52 of those 95 households also have a cat. Therefore, \(\frac{52}{95} \approx 0.547\) or approximately 54.7% of the households with a dog also have a cat. Another way to phrase this conditional statement is, “What percent of households have a cat given they have a dog.” You will see the word given quite a bit in this chapter and that makes the denominator change.
If \(C\) is the event "owning a cat" and \(D\) is the event "owning a dog", then the probability that someone owns a cat given that you know they own a dog is written \(P(C|D)=\frac{52}{95}\approx 57.7\%.\)
Similarly, we can find the probability that a cat-owning household also owns a dog. In this case, we restrict our attention to the row corresponding to cat owners and find \(P(D|C)=\frac{52}{180}\approx 28.9\%.\)
What does this tell us? According to the poll data, if you see someone with a dog, there is a 54.7% chance that they also have a cat at home. However, if you meet a cat owner, there is only a 28.9% chance that they also have a dog.
Conditional Probability.
\(P(E|F)\) is the probability that event \(E\) occurs given that event \(F\) occurs or occurred.
\begin{equation*}
P(E|F)=\frac{\text{number of elements in }E\cap F}{\text{number of elements in }F}
\end{equation*}
or
\begin{equation*}
P(E|F)=\frac{P(E\cap F)}{P(F)}
\end{equation*}
This is called conditional probability and can be interpreted as the probability of \(E\) with the condition or prior knowledge of \(F\text{.}\)
Example 5.2.1.
Find the probability that a card drawn at random from a standard 52-card deck is a king given that it is a face card.
Solution.
In this situation, we already know that the card drawn is one of the 12 face cards. Of those, four are kings. Therefore, the probability is
\begin{equation*}
P(\text{king}|\text{face card})=\frac{4}{12}=\frac{1}{3}.
\end{equation*}
Example 5.2.2.
Suppose that two cards are drawn at random from a standard 52-card deck without replacement. (This means that the cards are not put back into the deck after being drawn.)
Find the probability that the second card is a heart given that the first card also is a heart.
Find the probability that the second card is a heart given that the first card is not a heart.
Solution.
A standard deck of cards contains 52 cards, thirteen of which are hearts. If the first card draws is a heart, then the total number of cards drops to 51 and the total number of hearts drops to twelve. Therefore,
\begin{equation*}
P(\text{second card is a heart}|\text{first card is a heart})=\frac{12}{51}\approx23.5\%.
\end{equation*}
If the first card is not a heart, then all thirteen hearts still remain in the deck. Therefore,
\begin{equation*}
P(\text{second card is a heart}|{first card is not a heart})=\frac{13}{51}\approx 25.5\%
\end{equation*}
Example 5.2.3.
Two dice are rolled. Find the probability that the second die shows a 5 given that the first die shows a 5.
Solution.
This is something of a trick question because the outcome of the first die is unrelated to the outcome of the second die. The probability that the second die shows a 5 is \(P(5)=\frac{1}{6}\) regardless of what the first die shows.
Subsection 5.2.2 Independent and Dependent Events
Two or more events are called dependent if the occurrence of one affects the probability of the other(s). For example, the probability that a second card drawn from a deck (without replacement) is a heart depends on whether the first card drawn was a heart.
Two or more events are called independent if the occurrence of one has not affect on the the probability of the other(s). For example, the probability that a second die rolled shows a 5 is independent of the result of the first die.
Example 5.2.4.
Determine whether each pair of events is independent or dependent.
A jar has ten blue marbles and four white marbles. Two marbles are drawn with replacement. (This means that after the first marble is drawn, it is put back in the jar before the second marble is drawn.) Event \(E\) is "the first marble is white", and event \(F\) is "the second marble is white".
A jar has ten blue marbles and four white marbles. Two marbles are drawn without replacement. (This means that after the first marble is drawn, it is not put back in the jar.) Event \(E\) is "the first marble is white", and event \(F\) is "the second marble is white".
Three coins are flipped. Event \(E\) is "the first coin shows heads", event \(F\) is "the second coin shows heads", and event \(G\) is "the third coin shows tails".
Solution.
Independent
Dependent
Independent
Probability of Independent Events.
If events \(E\) and \(F\) are independent, then
\begin{equation*}
P(E|F)=P(E).
\end{equation*}
If \(P(E|F)=P(E),\) then events \(E\) and \(F\) are independent.
If \(P(E|F) \ne P(E),\) then the events \(E\) and \(F\) are dependent.
Example 5.2.5.
To determine which online advertisement is more effective, an online retailer conducted an A/B test. Some visitors to a particular social media platform were showed the original advertisement while the others were shown a new advertisement. Then the viewers were tracked to determine whether they subsequently made a purchase from the retailer. The results are shown in the table.
| Made Purchase |
120 |
320 |
440 |
| No Purchase |
972 |
617 |
1589 |
| Total |
1092 |
937 |
2029 |
Are the events "viewed the new advertisement" and "made a purchase" dependent?
Solution.
We will calculate \(P(\text{made a purchase})\) is the same as \(P(\text{made a purchase}|\text{saw new ad})\text{.}\)
\begin{equation*}
P(\text{made a purchase})=\frac{440}{2029}\approx21.7\%
\end{equation*}
\begin{equation*}
P(\text{made a purchase}|\text{new ad})=\frac{320}{937}\approx34.2\%
\end{equation*}
Since the two probabilities are different, we can conclude that the events are dependent.
We also could observe that \(P(\text{made a purchase}|\text{new ad})\gt P(\text{made a purchase}|\text{original ad})\text{,}\) and, therefore, the new advertisement appears to be more effective than the original advertisement.
Example 5.2.6.
A survey of licensed drivers asked whether they had received a speeding ticket in the last year and whether their car is red. The results of the survey are shown in the contingency table to the right.
| Red Car |
15 |
135 |
150 |
| Not Red Car |
45 |
470 |
515 |
| Total |
60 |
605 |
665 |
Determine whether the events "driving a red car" and "received a speeding ticket" are dependent or independent, if possible, and state what that means. The margin of error is three percentage points.
Solution.
Let \(R\) be the event "driving a red car", and let \(S\) be the event "received a speeding ticket". We will calculate \(P(T|R)\) and \(P(T)\) and determine whether the difference is greater than the margin of error.
\begin{equation*}
P(S|R)=\frac{text{number of elements in }S\cap R}{\text{number of elements in }R}=\frac{15}{150}=10\%
\end{equation*}
\begin{equation*}
P(S)=\frac{\text{total number of elements in }S}{\text{total number of elements}}=\frac{60}{665}\approx 9\%
\end{equation*}
Since the two probabilities differ by 1% which is within the margin of error, we cannot conclude that driving a red car and getting a speeding ticket are dependent.
Subsection 5.2.3 Probability of Sequential Events
Consider the experiment of selecting two marbles from a jar without replacement. The jar initially contains two green marbles, which we will call G1 and G2, and two blue marbles, which we will call B1 and B2. Using methods from
Section 5.1, we can find the probability that both marbles are blue as follows.
Using the notation that (B1,G2) represents drawing blue marble B1 followed by green marble G2, we write the sample space.
\begin{align*}
S=\{\amp (B1,B2),(B1,G1),(B1,G2),(B2,B1), \\
\amp (B2,G1),(B2,G2),(G1,B1),(G1,B2), \\
\amp (G1,G2),(G2,B1),(G2,B2),(G2,G1)\}
\end{align*}
There are twelve elements in the sample space. We are interested in the event that both marbles are blue, \(E=\{(B1,B2),(B2,B1)\}.\) Therefore the probability is
\begin{equation*}
P(E)=\frac{2}{12}=\frac{1}{6}.
\end{equation*}
Isn’t there a more efficient way to find this probability? Yes, there is!
The probability that the first marble is blue is \(P(\text{first blue})=\frac{2}{4}=\frac{1}{2}\) because two out of the four marbles are blue. Now, assuming that the first marble was blue, there will be three marbles left in the jar, only one of which is blue. The probability that the second marble also is blue is \(P(\text{second blue}|\text{first blue})=\frac{1}{3}.\)
The probability that both marbles are blue is the product of these two probabilities!
\begin{align*}
P(\text{first blue}\cap \text{second blue})= \amp P(\text{first blue})\cdot P(\text{second blue}|\text{first blue})\\
=\amp \frac{1}{2}\cdot\frac{1}{3}\\
=\amp \frac{1}{6}
\end{align*}
The probability of two or more events in sequence is the the product of the probability that the first event occurs and the probability that the second event occurs given or assuming that the first event occurred.
Probability of Sequential Events.
For any events \(A\) and \(B\text{:}\)
\begin{equation*}
P(A\cap B)=P(A)\cdot P(B|A).
\end{equation*}
If \(A\) and \(B\) are independent, we can simplify to:
\begin{equation*}
P(A\cap B)=P(A)\cdot P(B).
\end{equation*}
For three or more events, we use additional factors as needed.
We will investigate why this rule works later in the chapter.
Example 5.2.7.
Four cards are drawn at random from a standard 52-card deck without replacement. Find the probability that all four are hearts.
Solution.
The solution is the product of \(P(\text{first heart})\text{,}\) \(P(\text{second heart }|\text{ first heart})\text{,}\) \(P(\text{third heart }|\text{ first two hearts})\text{,}\) and \(P(\text{fourth heart }|\text{ first three hearts}).\)
\begin{equation*}
P(\text{all four hearts})= \frac{13}{52} \cdot \frac{12}{51} \cdot \frac{11}{50} \cdot \frac{10}{49} \approx 0.26\%
\end{equation*}
Example 5.2.8.
Four cards are drawn at random from a standard 52-card deck with replacement. This means that each card is replaced in the deck before the next is drawn. Find the probability that all four are hearts.
Solution.
The solution is the product of \(P(\text{first heart})\text{,}\) \(P(\text{second heart }|\text{ first heart})\text{,}\) \(P(\text{third heart }|\text{ first two hearts})\text{,}\) and \(P(\text{fourth heart }|\text{ first three hearts}).\)
However, in this situation, all four probabilities are the same because the cards are replaced. The events are independent!
\begin{equation*}
P(\text{all four hearts})= \frac{13}{52} \cdot \frac{13}{52} \cdot \frac{13}{52} \cdot \frac{13}{52} \approx 0.39\%
\end{equation*}
Example 5.2.9.
Consider the experiment of flipping a coin five times.
Find the probability that all five flips result in heads.
Find the probability that at least one flip results in tails.
Solution.
Each coin flip is an independent event with probability of heads \(\frac{1}{2}\text{.}\) Therefore, the probability that all five flips result in heads is
\begin{equation*}
P(\text{all five heads})=\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{2}=\frac{1}{32}
\end{equation*}
Instead of calculating the probability of getting at least one tails directly, which would be quite onerous, we make use of the fact that "at least one tails" is the complement of "all heads". We can find the answer by subtracting our previous answer from one.
\begin{equation*}
P(\text{at least one tails})=1-P(\text{all heads})=1-\frac{1}{32}=\frac{31}{32}
\end{equation*}
On average, if we repeated this experiment, we can expect to see all five heads once out of every 32 times, and we can expect to see at least one tails the other 31 out of 32 times.
Exercises 5.2.4 Exercises
1.
A recent survey asked a random sample of PCC students if they are currently experiencing food insecurity and if they are currently experiencing housing insecurity. Fill in the missing entries of the contingency table below.
| Housing Insecure |
|
60 |
|
| Not Housing Insecure |
|
460 |
760 |
| Total |
680 |
|
|
2.
A recent survey asked a random sample of PCC students if they have purchased food from the cafeteria in the last week, and if they purchased their textbooks through the bookstore. Fill in the missing entries of the contingency table below.
| Cafeteria |
|
|
375 |
| No Cafeteria |
|
135 |
|
| Total |
630 |
|
850 |
3.
A recent survey asked PCC students if they regularly eat breakfast and if they regularly floss their teeth Use the completed Venn Diagram to fill in the corresponding contingency table.
4.
A recent survey asked PCC students if they used an Apple phone, and if the regularly used a Chromebook outside of school. Use the completed Venn Diagram to fill in the corresponding contingency table.
5.
Use the following information to complete the contingency table:
\(\displaystyle \text{P(A and B)} = 10/75\)
\(\displaystyle \text{P(A)} = 40/75 \)
\(\displaystyle \text{P(not B)} = 45/75\)
6.
Use the following information to complete the contingency table:
7.
A professor gave a test to students in a morning class and the same test to the afternoon class. The grades are summarized below.
| Morning Class |
8 |
18 |
13 |
39 |
| Afternoon Class |
10 |
4 |
12 |
26 |
| Total |
18 |
22 |
25 |
65 |
If one student was chosen at random:
What is the probability they were in the morning class?
What is the probability they earned a C?
What is the probability that they earned an A and they were in the afternoon class?
What is the probability that they earned an A given they were in the morning class?
What is the probability that they were in the morning class or they earned a B?
8.
A professor surveyed students in her morning and afternoon Math 105 class, and asked what their class standing was. The class standings are summarized below:
| Morning Class |
12 |
5 |
7 |
8 |
32 |
| Afternoon Class |
5 |
13 |
8 |
2 |
28 |
| Total |
17 |
18 |
15 |
10 |
60 |
If one student was chosen at random:
What is the probability they were in the morning class?
What is the probability they were a Freshman?
What is the probability that they were a Senior and they were in the afternoon class?
What is the probability that they were a Sophomore given they were in the morning class?
What is the probability that they were in the morning class or they were a Junior?
9.
The contingency table below shows the number of credit cards owned by a group of individuals below the age of 35 and above the age of 35.
Between the ages of 18-35 |
9 |
5 |
19 |
33 |
| Over age 35 |
18 |
10 |
20 |
48 |
| Total |
27 |
15 |
39 |
81 |
If one person was chosen at random:
What is the probability they had no credit cards?
What is the probability they had one credit card?
What is the probability they had no credit cards and is over 35?
What is the probability they are between the ages of 18 and 35, or have zero credit cards?
What is the probability they had no credit cards given that they are between the ages of 18 and 35?
What is the probability they have no credit cards given that they are over age 35?
Does it appear that having no credit cards depends on age? Or are they independent? Use probability to support your claim.
10.
The following contingency table provides data from a sample of 6,224 individuals who were exposed to smallpox in Boston.
| Lived |
238 |
5136 |
5374 |
| Died |
6 |
844 |
850 |
| Total |
244 |
5980 |
6224 |
What is the probability that a person was inoculated?
What is the probability that a person lived?
What is the probability that a person died or was inoculated?
What is the probability that a person died given they were inoculated?
What is the probability that a person died given they were not inoculated?
Does it appear that survival depended on if a person were inoculated? Or are they independent? Use probability to support your claim.
11.
The contingency table below shows the survival data for the passengers of the Titanic.
| Survive |
203 |
118 |
178 |
212 |
711 |
| Not Survive |
122 |
167 |
528 |
673 |
1490 |
| Total |
325 |
285 |
706 |
885 |
2201 |
What is the probability that a passenger did not survive?
What is the probability that a passenger was crew?
What is the probability that a passenger was first class and did not survive?
What is the probability that a passenger did not survive or was crew?
What is the probability that a passenger survived given they were first class?
What is the probability that a passenger survived given they were second class?
What is the probability that a passenger survived given they were third class?
Does it appear that survival depended on the passenger’s class? Or are they independent? Use probability to support your claim.
12.
The following table shows the utility patents granted for a specific year.
| United States |
45% |
2% |
8% |
55% |
| Foreign |
41% |
1% |
3% |
45% |
| Total |
86% |
11% |
3% |
100% |
What is the probability that a patent is foreign and from the government?
What is the probability that a patent is from the U.S. and from a corporation?
What is the probability that a patent is foreign or from the government?
What is the probability that a patent is from the U.S. given it is from an individual?
What is the probability that a patent is foreign given it is from the government?
13.
There is a 15% chance that a shopper entering a computer store will purchase a computer, a 25% chance they will purchase a game/software, and there is a 10% chance they will purchase both a computer and a game/software.
-
Create a contingency table for the information.
| Computer |
|
|
|
| No Computer |
|
|
|
| Total |
|
|
|
What is the probability that a shopper will not purchase a computer and will not purchase a game/software?
What is the probability that a shopper will purchase a computer or purchase a game/software?
What is the probability that a shopper will purchase a game/software given they have purchased a computer?
What is the probability that a shopper will purchase a game/software given they did not purchase a computer?
Does it appear that purchasing a game/software depends on whether the shopper purchased a computer? Or are they independent? Use probability to support your claim.
14.
A fitness center coach kept track over the last year of whether members stretched before they exercised, and whether or not they sustained an injury. Among the 400 members, 322 stretched before they exercised, 327 did not sustain an injury, and 270 both stretched and did not sustain an injury.
-
Create a contingency table for the information.
| Stretched |
|
|
|
| Not Stretched |
|
|
|
| Total |
|
|
|
What is the probability that a member sustained an injury?
What is the probability that a member sustained an injury and did not stretch?
What is the probability that a member stretched or did not sustain an injury?
What is the probability that a member sustained an injury given they stretched?
What is the probability that a member sustained an injury given they did not stretch?
Does it appear that sustaining an injury depends on whether the member stretches before exercising? Or are they independent? Use probability to support your claim.
15.
Among the 95 books on a bookshelf, 72 are fiction, 28 are hardcover, and 87 are fiction or hardcover.
-
Create a contingency table for the information.
What is the probability that a book is non-fiction and paperback?
What is the probability that a book is fiction given it is hardcover?
16.
After finishing the course, among the 32 students in a Math 105 class, 25 could successfully construct a contingency table, 27 passed the class, and 29 could successfully construct a contingency table or passed the class.
-
Create a contingency table for the information.
What is the probability that a student passed and could not successfully construct a contingency table?
What is the probability that a student passed given they could not successfully construct a contingency table?