3.5 Conditional Probability
LEARNING OBJECTIVES
- Calculate conditional probabilities.
- Determine if two events are independent.
A conditional probability is the probability of an event [latex]A[/latex] given that another event [latex]B[/latex] has already occurred. The idea behind conditional probability is that it reduces the sample space to the part of the sample space that involves just the given event [latex]B[/latex]—except for the event [latex]B[/latex], everything else in the sample space is thrown away. Once the sample space is reduced to the given event [latex]B[/latex], we calculate the probability of [latex]A[/latex] occurring within the reduced sample space.
The conditional probability of [latex]A[/latex] given [latex]B[/latex] is written as [latex]P(A|B)[/latex] and is read as “the probability of [latex]A[/latex] given [latex]B[/latex].”
Recognizing a conditional probability and identifying which event is the given event can be challenging. The following sentences are all asking the same conditional probability, just in different ways:
- What is the probability a student has a smartphone, given that the student has a tablet?
- If a student has a tablet, what is the probability the student has a smartphone?
- What is the probability that a student with a tablet has a smartphone?
The given event is “has a tablet,” so in calculating the conditional probability, we would restrict the sample space to just those students who have a tablet and then find the probability a student has a smartphone from among just those students with a tablet.
NOTE
The conditional probability [latex]P(A|B)[/latex] is NOT the same as [latex]P(A\text{ and }B)[/latex].
- In the conditional probability [latex]P(A|B)[/latex], we want to find the probability of [latex]A[/latex] occurring after [latex]B[/latex] has already happened. In the conditional probability, the sample space is restricted to just event [latex]B[/latex] before we calculate the probability of [latex]A[/latex] in the restricted sample space.
- In [latex]P(A\text{ and }B)[/latex,] we want to find the probability of events [latex]A[/latex] and [latex]B[/latex] happening at the same time in the unrestricted sample space.
EXAMPLE
Suppose a study of speeding violations and drivers who use cell phones produced the following fictional data:
Cell Phone Use | Speeding violation in the last year | No speeding violation in the last year | Total |
---|---|---|---|
Cell phone user | 25 | 280 | 305 |
Not a cell phone user | 45 | 405 | 450 |
Total | 70 | 685 | 755 |
- What is the probability that a randomly selected person is a cell phone user, given that they had no speeding violations in the last year?
- If a randomly selected person does not have a cell phone, what is the probability they had a speeding violation last year?
- What is the probability that someone with a cell phone did not have a speeding violation last year?
Solution
- The given event is "no speeding violations," so we restrict the table to just the column involving "no speeding violations." With this restriction, the table would look like this:
Cell Phone Use No speeding violation in the last year Cell phone user 280 Not a cell phone user 405 Total 685 Now, we want to find the probability a person is a cell phone user in this restricted sample space:
[latex]\begin{eqnarray*}P(\text{cell phone}|\text{no violations})&=&\frac{\text{number of cell phone users in restricted sample space}}{\text{total number in restricted sample space}}\\&=&\frac{280}{685}\\\\\end{eqnarray*}[/latex]
- The given event is "no cell phone," so we restrict the table to just the row involving "no cell phone." With this restriction, the table would look like this:
Cell Phone Use Speeding violation in the last year No speeding violation in the last year Total Not a cell phone user 45 405 450 Now, we want to find the probability a person has a speeding violation in the last year in this restricted sample space:
[latex]\begin{eqnarray*}P(\text{violation}|\text{no cell phone})&=&\frac{\text{number of violations in restricted sample space}}{\text{total number in restricted sample space}}\\&=&\frac{45}{450}\\\\\end{eqnarray*}[/latex]
- The given event is "cell phone," so we restrict the table to just the row involving "cell phone." With this restriction, the table would look like this:
Cell Phone Use Speeding violation in the last year No speeding violation in the last year Total Cell phone user 25 280 305 Now, we want to find the probability a person does not have a speeding violation in the last year in this restricted sample space:
[latex]\\\begin{eqnarray*}P(\text{no violations}|\text{cell phone})&=&\frac{\text{number with no violations in restricted sample space}}{\text{total number in restricted sample space}}\\&=&\frac{280}{305}\end{eqnarray*}[/latex]
NOTE
The conditional probability [latex]P(A|B)[/latex] does not equal the conditional probability [latex]P(B|A)[/latex]. In the above example, [latex]\displaystyle{P(\text{cell phone}|\text{no violations})=\frac{280}{685}}[/latex] does not equal [latex]\displaystyle{P(\text{no violations}|\text{cell phone})=\frac{280}{305}}[/latex].
TRY IT
This table shows the number of athletes who stretch before exercising and how many had injuries within the past year.
Stretching Practice | Injury in last year | No injury in last year | Total |
---|---|---|---|
Stretches | 55 | 295 | 350 |
Does not stretch | 231 | 219 | 450 |
Total | 286 | 514 | 800 |
- What is the probability that a randomly selected athlete stretches before exercising, given that they had an injury last year?
- What is the probability that a randomly selected athlete who had no injuries in the last year does not stretch before exercising?
- If a randomly selected athlete does not stretch before exercising, what is the probability they had an injury in the last year?
Click to see Solution
- [latex]\displaystyle{\text{Probability}=\frac{55}{286}}[/latex]
- [latex]\displaystyle{\text{Probability}=\frac{219}{514}}[/latex]
- [latex]\displaystyle{\text{Probability}=\frac{231}{450}}[/latex]
Calculating Conditional Probabilities Using the Formula
When working with a contingency table as in the above examples, we can simply calculate conditional probabilities by restricting the table to the given event and then finding the required probability in the restricted sample space. Depending on the situation, it might not be possible to work out a conditional probability this way. In these situations, we can use the following formula to find a conditional probability:
[latex]\begin{eqnarray*}\\P(A|B)&=&\frac{P(A\text{ and }B)}{P(B)}\\\\\end{eqnarray*}[/latex]
EXAMPLE
At a local language school, [latex]40\%[/latex] of the students are learning Spanish, [latex]20\%[/latex] of the students are learning German, and [latex]8\%[/latex] of the students are learning both Spanish and German.
- What is the probability that a randomly selected student is learning Spanish given that they are learning German?
- What is the probability that a randomly selected Spanish student is learning German?
Solution
- [latex]\displaystyle{P(\text{Spanish}|\text{German})=\frac{P(\text{Spanish and German})}{P(\text{German})}=\frac{0.08}{0.2}=0.4}[/latex]
- [latex]\displaystyle{P(\text{German}|\text{Spanish})=\frac{P(\text{Spanish and German})}{P(\text{Spanish})}=\frac{0.08}{0.4}=0.2}[/latex]
EXAMPLE
There are [latex]50[/latex] students enrolled in the second year of a business degree program. During this semester, the students have to take some elective courses. [latex]18[/latex] students decide to take an elective in psychology, [latex]27[/latex] students decide to take an elective in philosophy, and [latex]10[/latex] students decide to take an elective in both psychology and philosophy.
- What is the probability that a student takes an elective in psychology given that they take an elective in philosophy?
- If a student takes an elective in psychology, what is the probability that they take an elective in philosophy?
Solution
- [latex]\displaystyle{P(\text{psychology}|\text{philosohpy})=\frac{P(\text{psychology and philosophy})}{P(\text{philosophy})}=\frac{\frac{10}{50}}{\frac{27}{50}}=0.3704}[/latex]
- [latex]\displaystyle{P(\text{philosophy}|\text{psychology})=\frac{P(\text{psychology and philosophy})}{P(\text{philosophy})}=\frac{\frac{10}{50}}{\frac{18}{50}}=0.5556}[/latex]
TRY IT
At a local basketball game, [latex]70\%[/latex] of the fans are cheering for the home team, [latex]25\%[/latex] of the fans are wearing blue, and [latex]12\%[/latex] of the fans are cheering for the home team and wearing blue.
- What is the probability that a randomly selected fan is cheering for the home team, given that they are wearing blue?
- If a randomly selected fan is cheering for the home team, what is the probability they are wearing blue?
Click to see Solution
- [latex]\displaystyle{P(\text{home team}|\text{blue})=\frac{0.12}{0.25}=0.48}[/latex]
- [latex]\displaystyle{P(\text{blue}|\text{home team})=\frac{0.12}{0.7}=0.1714}[/latex]
Independent Events
Two events are independent if the probability of the occurrence of one of the events does not affect the probability of the occurrence of the other event. In other words, two events, [latex]A[/latex] and [latex]B[/latex] are independent if the knowledge that one of the events occurred does not affect the chance the other event occurs. For example, the outcomes of two roles of a fair die are independent events—the outcome of the first roll does not change the probability of the outcome of the second roll. If two events are not independent, then we say the events are dependent.
We can test two events [latex]A[/latex] and [latex]B[/latex] for independence by comparing [latex]P(A)[/latex] and [latex]P(A|B)[/latex]:
- If [latex]P(A)=P(A|B)[/latex], then the events [latex]A[/latex] and [latex]B[/latex] are independent.
- If [latex]P(A)\neq P(A|B)[/latex], then the events [latex]A[/latex] and [latex]B[/latex] are dependent.
EXAMPLE
At a local language school, [latex]40\%[/latex] of the students are learning Spanish, [latex]20\%[/latex] of the students are learning German, and [latex]8\%[/latex] of the students are learning both Spanish and German. Are the events "Spanish" and "German" independent? Explain.
Solution
To check for independence, we need to check two probabilities: [latex]P(\text{Spanish})[/latex] and [latex]P(\text{Spanish}|\text{German})[/latex]. If these probabilities are equal, the events are independent. If the probabilities are not equal, the events are dependent.
From the information provided in the question, [latex]P(\text{Spanish})=0.4[/latex]. Previously, we calculated [latex]P(\text{Spanish}|\text{German})[/latex]:
[latex]\begin{eqnarray*}\\P(\text{Spanish}|\text{German})&=&\frac{P(\text{Spanish and German})}{P(\text{German})}\\&=&\frac{0.08}{0.2}\\&=&0.4\\\\\end{eqnarray*}[/latex]
We can see that [latex]P(\text{Spanish})=P(\text{Spanish}|\text{German})[/latex]. Because these two probabilities are equal, the events "Spanish" and "German" are independent. This means that the probability a student is taking Spanish does not affect the probability a student is taking German.
EXAMPLE
Suppose a study of speeding violations and drivers who use cell phones produced the following fictional data:
Cell Phone Use | Speeding violation in the last year | No speeding violation in the last year | Total |
---|---|---|---|
Cell phone user | 25 | 280 | 305 |
Not a cell phone user | 45 | 405 | 450 |
Total | 70 | 685 | 755 |
Are the events "cell phone user" and "speeding violation in the last year" independent? Explain.
Solution
To check for independence, we need to check two probabilities: [latex]P(\text{cell phone})[/latex] and [latex]P(\text{cell phone}|\text{speeding violation})[/latex]. If these probabilities are equal, the events are independent. If the probabilities are not equal, the events are dependent.
[latex]\begin{eqnarray*}\\P(\text{cell phone})&=&\frac{305}{755}\\&=&0.4040\\\\P(\text{cell phone}|\text{speeding violation})&=&\frac{25}{70}\\&=&0.03571\\\\\end{eqnarray*}[/latex]
We can see that [latex]P(\text{cell phone}) \neq P(\text{cell phone}|\text{speeding violation})[/latex]. Because these probabilities are not equal, the events "cell phone user" and "speeding violation" are dependent. This means that the probability a person is a cell phone user does affect the probability the person had a speeding violation in the last year.
TRY IT
At a local basketball game, [latex]70\%[/latex] of the fans are cheering for the home team, [latex]25\%[/latex] of the fans are wearing blue, and [latex]12\%[/latex] of the fans are cheering for the home team and wearing blue. Are the events "cheering for the home team" and "wearing blue" independent? Explain.
Click to see Solution
Because [latex]\displaystyle{P(\text{home team})=0.7}[/latex] does not equal [latex]\displaystyle{P(\text{home team}|\text{blue})=\frac{0.12}{0.25}=0.48}[/latex], the events "cheering for the home team" and "wearing blue" are dependent.
TRY IT
This table shows the number of athletes who stretch before exercising and how many had injuries within the past year.
Stretching Practice | Injury in last year | No injury in last year | Total |
---|---|---|---|
Stretches | 55 | 295 | 350 |
Does not stretch | 231 | 219 | 450 |
Total | 286 | 514 | 800 |
Are the events "does not stretch" and "injury in last year" independent? Explain.
Click to see Solution
Because [latex]\displaystyle{P(\text{no stretch})=\frac{450}{800}=0.5625}[/latex] does not equal [latex]\displaystyle{P(\text{no stretch}|\text{injury})=\frac{231}{286}=0.8077}[/latex], the events "does not stretch" and "injury in last year" are dependent.
Sampling may be done with replacement or without replacement, which effects whether or not events are considered independent or dependent.
- With replacement: If each member of a population is replaced after it is picked, then that member has the possibility of being chosen more than once. When sampling is done with replacement, then events are considered to be independent because the result of the first pick will not change the probabilities for the second pick.
- Without replacement: When sampling is done without replacement, each member of a population may be chosen only once. In this case, the probabilities for the second pick are affected by the result of the first pick. Depending on the situation, the events are considered to be dependent or not independent.
Video: "Calculating conditional probability | Probability and Statistics | Khan Academy" by Khan Academy [6:43] is licensed under the Standard YouTube License.Transcript and closed captions available on YouTube.
Video: "Conditional probability and independence | Probability | AP Statistics | Khan Academy" by Khan Academy [4:07] is licensed under the Standard YouTube License.Transcript and closed captions available on YouTube.
Exercises
- A recent survey asked people about home ownership and annual income. A total of [latex]750[/latex] people were surveyed. Of the [latex]750[/latex] people surveyed, [latex]425[/latex] owned a home, [latex]338[/latex] people had an annual income of [latex]\$60,000[/latex] or more, and [latex]293[/latex] people owned a home and had an annual income of [latex]\$60,000[/latex] or more.
- what is the probability that one of the people in the survey owned a home, given that they had an annual income of [latex]\$60,000[/latex] or more?
- Are the events "owned a home" and "annual income of [latex]\$60,000[/latex] or more" independent? Explain.
Click to see Answer
- [latex]0.8669[/latex]
- Dependent because [latex]P(\text{owned home})\neq P(\text{owned home}|\text{annual income of }\$60,000\text{ or more})[/latex].
- A local college surveyed its recent graduates about their overall satisfaction with their college experience and employment status post-graduation. In the survey, [latex]75\%[/latex] of respondents said they were satisfied with their college experience, [latex]64\%[/latex] of respondents said they found full-time jobs after graduation, and [latex]52\%[/latex] of respondents said they were satisfied with their college experience and found full-time jobs after graduation.
- What is the probability that a respondent was satisfied with their college experience, given that they found full-time jobs after graduation?
- Are the events "satisfied with college experience" and "found full-time job" independent? Explain.
Click to see Answer
- [latex]0.8125[/latex]
- Dependent because [latex]P(\text{cell satisfied with college experience})\neq P(\text{satisfied with college experience}|\text{found full-time job})[/latex],
- [latex]U[/latex] and [latex]V[/latex]are mutually exclusive events. [latex]P(U)=0.26[/latex]; [latex]P(V)=0.37[/latex]. Find [latex]P(U|V)[/latex]
Click to see Answer
[latex]0[/latex]
- At a local college, [latex]20\%[/latex] of the students are studying business, [latex]40\%[/latex] of the students are studying mathematics, and [latex]8\%[/latex] of the students are studying both business and mathematics.
- What is the probability that a randomly selected student studies business, given that they study mathematics?
- What is the probability that a randomly selected business student studies mathematics?
- Are the events "business" and "mathematics" independent? Explain.
Click to see Answer
- [latex]0.2[/latex]
- [latex]0.4[/latex]
- Independent because [latex]P(\text{business})=P(\text{business}|\text{mathematics})[/latex].
- In a collection of eight cards, five cards are green, and three cards are yellow. The five green cards are numbered 1, 2, 3, 4, and 5. The three yellow cards are numbered 1, 2, and 3. The cards are well shuffled. One card is selected at random.
- What is the probability the card is green, given that the card has an even number on it?
- Are the events "green" and "even" independent? Explain.
- What is the probability that a yellow card has an odd number on it?
- Are the events "yellow" and "odd" independent? Explain.
Click to see Answer
- [latex]0.4[/latex]
- Dependent because [latex]P(\text{green})\neq P(\text{green}|\text{even})[/latex].
- [latex]0.6667[/latex]
- Dependent because [latex]P(\text{odd})\neq P(\text{odd}|\text{yellow})[/latex].
- At a college, [latex]72\%[/latex] of courses have final exams, [latex]46\%[/latex] of courses require research papers, and [latex]32\%[/latex] of courses have both a research paper and a final exam.
- Find the probability that a course has a final exam, given that it has a research project.
- Are the events "final exam" and "research project" independent? Explain.
Click to see Answer
- [latex]0.6957[/latex]
- Dependent because [latex]P(\text{final exam})\neq P(\text{final exam}|\text{research project})[/latex].
- In a box of assorted cookies, [latex]36\%[/latex] contain chocolate, [latex]12\%[/latex] contain nuts, and [latex]8\%[/latex] contain both chocolate and nuts. Sean is allergic to both chocolate and nuts.
- If Sean selects a cookie that contains chocolate, what is the probability that the cookie contains nuts?
- Are the events "chocolate" and "nuts" independent? Explain.
Click to see Answer
- [latex]0.2222[/latex]
- Dependent because [latex]P(\text{nuts})\neq P(\text{nuts}|\text{chocolate})[/latex].
- A previous year, the weights, in pounds, of the members of the San Francisco 49ers and the Dallas Cowboys were published in the San Jose Mercury News. The factual data are compiled into the table.
Shirt Number At most 210 211–250 251–290 More than 290 Total 1–33 21 5 0 0 26 34–66 6 18 7 4 35 67–99 6 12 22 5 45 Total 33 35 29 9 106 For the following, suppose that one player from these two teams is selected at random.
- What is the probability that the player's weighs at most 210 pounds, given that the player has a shirt number in the 67-99 category?
- What is the probability that the player in the 34-66 category weighs between 251 and 290 pounds?
- If a player weighs more than 290 pounds, what is the probability the player has a shirt number in the 34-66 category?
- Are the events "1-33" and "211-250" independent? Explain
Click to see Answer
- [latex]0.1333[/latex]
- [latex]0.2[/latex]
- [latex]0.4444[/latex]
- Dependent because [latex]P(\text{1-33})\neq P(\text{1-33}|\text{211-250})[/latex].
- The following table of data obtained from www.baseball-almanac.com shows hit information for four players. Suppose that one hit from the table is randomly selected.
Name Single Double Triple Home Run Total Hits Babe Ruth 1,517 506 136 714 2,873 Jackie Robinson 1,054 273 54 137 1,518 Ty Cobb 3,603 174 295 114 4,189 Hank Aaron 2,294 624 98 755 3,771 Total 8,471 1,577 583 1,720 12,351 - What is the probability that a hit was made by Jackie Robinson, given that the hit was a double?
- If the hit was made by Hank Aaron, what is the probability that the hit was a single?
- What is the probability that a triple was hit by Babe Ruth?
- Are the events "Ty Cobb" and "home run" independent? Explain.
Click to see Answer
- [latex]0.1731[/latex]
- [latex]0.6083[/latex]
- [latex]0.2333[/latex]
- Dependent because [latex]P(\text{Ty Cobb})\neq P(\text{Ty Cobb}|\text{home run})[/latex].
- The table shows a random sample of musicians and how they learned to play their instruments.
Gender Self-taught Studied in School Private Instruction Total Female 12 38 22 72 Male 19 24 15 58 Total 31 62 37 130 - Find the probability a musician is male, given that they are self-taught.
- Find the probability that a female musician studied in school.
- If the musician had private lessons, find the probability the musician is female.
- Are the events "male" and "studied in school" independent? Explain.
Click to see Answer
- [latex]0.6129[/latex]
- [latex]0.5278[/latex]
- [latex]0.5946[/latex]
- Dependent because [latex]P(\text{male})\neq P(\text{male}|\text{studied in school})[/latex].
- The table below identifies a group of children by one of four hair colours and by type of hair.
Hair Type Brown Blond Black Red Totals Wavy 20 5 15 3 43 Straight 80 15 65 12 172 Totals 100 20 80 15 215 - What is the probability that a randomly selected child has wavy hair, given that they have black hair?
- What is the probability that a randomly selected child with straight hair has blond hair?
- If a child has red hair, what is the probability the child has wavy hair?
- Are the events "straight" or "brown" independent? Explain.
Click to see Answer
- [latex]0.1875[/latex]
- [latex]0.0872[/latex]
- [latex]0.2[/latex]
- Independent because [latex]P(\text{straight})=P(\text{straight}|\text{brown})[/latex].
- [latex]E[/latex] and [latex]F[/latex] are mutually exclusive events. [latex]P(E)=0.4[/latex] and [latex]P(F)=0.5[/latex]. Find [latex]P(E∣F)[/latex].
Click to see Answer
[latex]0[/latex]
- [latex]J[/latex] and [latex]K[/latex] are independent events. [latex]P(J|K)=0.3[/latex]. Find [latex]P(J)[/latex].
Click to see Answer
[latex]0.3[/latex]
- [latex]Q[/latex] and [latex]R[/latex] are independent events. [latex]P(Q)=0.4[/latex] and [latex]P(Q\text{ and }R)=0.1[/latex]. Find [latex]P(R)[/latex].
Click to see Answer
[latex]0.25[/latex]
- Suppose [latex]P(C)=0.4[/latex], [latex]P(D)=0.5[/latex] and [latex]P(C|D)=0.6[/latex].
- Find [latex]P(C\text{ and }D)[/latex].
- Are [latex]C[/latex] and[latex]D[/latex] mutually exclusive? Why or why not?
- Are [latex]C[/latex] and [latex]D[/latex] independent events? Why or why not?
- Find [latex]P(\text{ or }D)[/latex].
- Find [latex]P(D|C)[/latex].
Click to see Answer
- [latex]0.3[/latex]
- No because [latex]P(C\text{ and }D)\neq 0[/latex]
- Dependent because [latex]P(C)\neq P(C|D)[/latex].
- [latex]0.6[/latex]
- [latex]0.75[/latex]
- A college finds that [latex]10\%[/latex] of students have taken a distance learning class and that [latex]40\%[/latex] of students are part-time students. Of the part-time students, [latex]20\%[/latex] have taken a distance learning class.
- Find the probability that a student takes a distance learning class and is a part-time student.
- Find the probability that a student is a part-time student, given that they take a distance learning class.
- Find the probability that the student is a part-time student or takes a distance learning class.
- Are the events "distance learning" and "part-time" independent? Explain.
Click to see Answer
- [latex]0.08[/latex]
- [latex]0.8[/latex]
- [latex]0.42[/latex]
- Dependent because [latex]P(\text{distance learning})\neq P(\text{distance learning}|\text{part-time})[/latex].
"3.6 Conditional Probability" and “3.8 Exercises” from Introduction to Statistics by Valerie Watts is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.