Back to homeMathematics · AP Statistics · Change subject
Start for free
AP Stats · Mathematics
Chance and Probability · Probability

Conditional Probability

Before you start, make sure you know: Contingency tables (Algebra 2)
Before you start, make sure you know: Events (Algebra 2)

At a high school, what is the probability that a randomly chosen student drives to school? Now suppose you also know that the student has a part-time job. Is the probability still the same? Extra information changes which outcomes are possible, so it changes the probability. That idea, conditional probability, is the key to reading any problem that crosses two categories, and it is the foundation for independence and for the inference you will do later in AP Statistics.

Conditional Probability: P(A | B)

When you learn that event $B$ has happened, you stop counting every outcome. You only count the outcomes inside $B$. Event $B$ becomes your new sample space.

Venn diagram of events S (plays a sport) and B (is in band); given B, the sample space shrinks to circle B. entire sample space S only B only S∩B Given B, the sample space shrinks to circle B

Because $A$ either happens or it doesn't, once you are inside $B$ the two cases cover everything.

Practice★☆☆Not started
A study has been carried out on the reading habits of a group of students. The probability that a student reads digital news is $P(L) = 0,45$. The probability that they…

A study has been carried out on the reading habits of a group of students. The probability that a student reads digital news is $P(L) = 0,45$. The probability that they read digital news and also listen to news podcasts is $P(L \cap S) = 0,18$.

Find the probability that a student listens to news podcasts, given that they are a reader of digital news.

Solve
Practice★☆☆Not started
On a streaming content platform, it is known that the probability of a user watching a science fiction series is $P(S) = 0,6$ and the probability of them watching a…

On a streaming content platform, it is known that the probability of a user watching a science fiction series is $P(S) = 0,6$ and the probability of them watching a documentary is $P(D) = 0,4$. Furthermore, the probability of them watching both types of content is $P(S \cap D) = 0,15$.

Calculate the probability that a user watches a documentary if we know they have already watched a science fiction series.

Solve
Practice★☆☆Not started
In a sportswear store, $60 \%$ of sales are running shoes ($Z$) and $40 \%$ are basketball shoes ($B$). $20 \%$ of the buyers of running shoes also purchase technical…

In a sportswear store, $60 \%$ of sales are running shoes ($Z$) and $40 \%$ are basketball shoes ($B$). $20 \%$ of the buyers of running shoes also purchase technical socks ($C$).

If a customer has bought running shoes, what is the probability that they have not bought technical socks? (Remember the property of the complementary event in conditional probability).

Solve

The Multiplication Rule

Multiply both sides of the definition by $P(A)$ and you get a rule for finding $P(A \cap B)$ one stage at a time.

Tree diagram for drawing two songs without replacement from 12 songs, 7 of them hip-hop; the path hip-hop then hip-hop is highlighted. 7/12 5/12 H N 6/11 5/11 6/11 5/11 H then H: 7/12 · 6/11 H then N N then H N then N

The tree shows the idea. Multiply along a branch to get the probability of that whole path.

Practice★☆☆Not started
In a pencil case there are 5 highlighters: 3 are yellow and 2 are pink. We draw two highlighters consecutively and without replacement (without returning the first one…

In a pencil case there are 5 highlighters: 3 are yellow and 2 are pink. We draw two highlighters consecutively and without replacement (without returning the first one to the pencil case).

Represent the situation using a tree diagram and calculate the probability that the second highlighter drawn is pink, given that the first was yellow.

1st Draw 2nd Draw 2/5 2/4 3/4 1/4 3/5 2/4 A₁ R₁ A₂ R₂ A₂ R₂ 3A, 2R 2A, 2R 3A, 1R P(R₂|A₁) = 2/4
Solve
Practice★★☆Not started
A high school senior has prepared 18 of the 25 topics that make up the final History exam. The exam consists of choosing two topics at random from the total and writing…

A high school senior has prepared 18 of the 25 topics that make up the final History exam. The exam consists of choosing two topics at random from the total and writing about one of them.

  1. a) Calculate the probability that the student knows both drawn topics.
  2. b) Calculate the probability that the student passes the exam (that is, they know at least one of the two topics).
1st Draw 2nd Draw Outcomes 18/25 7/25 17/24 7/24 18/24 6/24 S₁ N₁ S₂ N₂ S₂ N₂ S₁ ∩ S₂ S₁ ∩ N₂ N₁ ∩ S₂ N₁ ∩ N₂ PASS PASS PASS FAIL S: Knows the topic N: Does not know the topic Total: 25 topics (18 prep. / 7 not prep.)
Solve

Reading P(A | B) from a Two-Way Table

A two-way table is the easiest place to see the shrinking sample space.

Two-way table of 200 students by job and driving; the row of students with a job is highlighted, showing P(D given J) = 60 over 100. Drives (D) Doesn't drive Total Has job (J) No job Total 60 40 100 30 70 100 90 110 200 P(D | J) = 60 / 100, not 60 / 200
Practice★☆☆Not started
A survey on the use of glasses and the gender of the students has been carried out in a high school senior class. The results are shown in the following contingency…

A survey on the use of glasses and the gender of the students has been carried out in a high school senior class. The results are shown in the following contingency table:

Glasses No Glasses Total Girls Boys Total 8 12 20 6 14 20 14 26 40

If we select a student at random, calculate:

  1. a) The probability that they are a boy, given that they wear glasses.
  2. b) The probability that they wear glasses, given that they are a girl.
Solve
Practice★★☆Not started
In a survey of 200 high school students about the use of social networks, it was observed that 120 use TikTok, 100 use Instagram, and 60 use both platforms. If we select…

In a survey of 200 high school students about the use of social networks, it was observed that 120 use TikTok, 100 use Instagram, and 60 use both platforms. If we select a student at random, calculate:

  1. a) The probability that they use Instagram given that they already use TikTok.
  2. b) The probability that they do not use TikTok if we know they use Instagram.
  3. c) Are the events "being a TikTok user" and "being an Instagram user" independent? Justify your answer mathematically.
Universal set (E) = 200 students TikTok (120) Instagram (100) 60 Only TikTok 60 Both 40 Only Inst. Neither 40
Solve
Practice★★☆Not started
A sports training center classifies its athletes according to their diet (Balanced or Deficient) and their performance in the last quarter (High or Low). The data is…

A sports training center classifies its athletes according to their diet (Balanced or Deficient) and their performance in the last quarter (High or Low). The data is collected in the following contingency table:

High Performance ($R$) Low Performance ($\bar{R}$)
Balanced Diet ($D$) 45 15
Deficient Diet ($\bar{D}$) 10 30

Calculate:

  1. a) $P(R | D)$
  2. b) $P(\bar{D} | \bar{R})$
  3. c) Determine whether having a balanced diet and having a high performance are independent events.
Solve

Combining Information: Union, Complement and Overlap

Real problems rarely hand you $P(A \mid B)$ directly. They give you pieces, such as $P(A)$, $P(B)$ and the union or the "neither" probability, and you work out the rest.

Venn diagram of two overlapping events showing A only, both, B only, and the region outside both circles. A only A∩B B only A only = P(A) − P(A∩B) B only = P(B) − P(A∩B) outside both circles: P(neither) = 1 − P(A∪B)

Sometimes you are given two conditional probabilities instead. Turn each one into an intersection with the multiplication rule, then set up equations.

Practice★☆☆Not started
Let $A$ and $B$ be two events of a random experiment such that the probability of $A$ is $P(A) = 0,5$, that of $B$ is $P(B) = 0,3$ and the probability of their union is…

Let $A$ and $B$ be two events of a random experiment such that the probability of $A$ is $P(A) = 0,5$, that of $B$ is $P(B) = 0,3$ and the probability of their union is $P(A \cup B) = 0,65$.

From the following Venn diagram, identify the shaded area and calculate $P(A|B)$.

E A B
Solve
Practice★★☆Not started
On a streaming platform, $70\%$ of subscribers watch action series and $45\%$ watch documentaries. Furthermore, it is known that $30\%$ of users watch both types of…

On a streaming platform, $70\%$ of subscribers watch action series and $45\%$ watch documentaries. Furthermore, it is known that $30\%$ of users watch both types of content. If we select a user who we know does not watch documentaries, what is the probability that they do watch action series?

Solve
Practice★★★Not started
Let $A$ and $B$ be two events in a sample space such that we know $P(A \cup B) = 0,9$, $P(B|A) = 0,4$ and $P(A|\overline{B}) = 0,8$, where $\overline{B}$ represents the…

Let $A$ and $B$ be two events in a sample space such that we know $P(A \cup B) = 0,9$, $P(B|A) = 0,4$ and $P(A|\overline{B}) = 0,8$, where $\overline{B}$ represents the complementary event of $B$.

Using the properties of the algebra of events and the definition of conditional probability, calculate:

  1. $P(A \cap B)$

  2. $P(A)$

  3. $P(B)$

Hint: Set up a system of equations using the definitions of conditional probability.

Solve

Independent Events

Two events are independent when knowing one happened does not change the probability of the other.

Bar chart comparing P(D) = 0.45 with P(D given J) = 0.60; since they differ, D and J are not independent. P(D) P(D | J) 0.45 0.60 0 1 0.45 ≠ 0.60, so D and J are not independent

In the driving table, $P(D) = \frac{90}{200} = 0.45$ but $P(D \mid J) = \frac{60}{100} = 0.60$. The probabilities differ, so having a job and driving are not independent.

When events are independent, the multiplication rule simplifies to $P(A \cap B) = P(A)P(B)$. Their complements are independent too. That gives a shortcut for "at least one": $P(\text{at least one}) = 1 - P(\text{neither})$.

Practice★☆☆Not started
A social media analyst studies the behavior of teenagers on two applications: TikTok ($T$) and Instagram ($I$). The data indicates that: $70 \%$ of young people use…

A social media analyst studies the behavior of teenagers on two applications: TikTok ($T$) and Instagram ($I$). The data indicates that:

  • $70 \%$ of young people use TikTok.

  • $50 \%$ use Instagram.

  • The probability that a young person uses Instagram given that they use TikTok is $0,4$.

Calculate the probability that a randomly chosen young person uses both applications ($P(T \cap I)$) and determine whether the events are independent.

Solve
Practice★★☆Not started
Let $A$ and $B$ be two events of a random experiment such that $P(A) = 0.4$, $P(B) = 0.6$ and $P(A \cup B) = 0.8$. a) Calculate $P(A | B)$. b) Calculate…

Let $A$ and $B$ be two events of a random experiment such that $P(A) = 0.4$, $P(B) = 0.6$ and $P(A \cup B) = 0.8$.

  1. a) Calculate $P(A | B)$.
  2. b) Calculate $P(B | \bar{A})$.
  3. c) Are $A$ and $B$ mutually exclusive events? Are they independent?
Solve
Practice★★☆Not started
In a cooperative video game, player 1 has a $0.8$ probability of completing their mission. Player 2, independently of the first, has a $0.7$ probability of success. a)…

In a cooperative video game, player 1 has a $0.8$ probability of completing their mission. Player 2, independently of the first, has a $0.7$ probability of success.

  1. a) What is the probability that both complete their missions?
  2. b) Given that at least one of the two has completed their mission, what is the probability that player 1 has completed it?
Solve

Tree Diagrams and the Law of Total Probability

Many problems have two stages: a group first ("which bus?") and then an outcome ("late or not?"). A tree diagram shows every path, and the multiplication rule gives the probability of each one.

Tree diagram: students ride the bus with probability 0.55 or not with 0.45; late probabilities 0.08 and 0.02; the two late branches have probabilities 0.044 and 0.009. 0.55 0.45 Bus Other 0.08 0.92 0.02 0.98 Late: 0.55 × 0.08 = 0.044 On time: 0.506 Late: 0.45 × 0.02 = 0.009 On time: 0.441
Practice★☆☆Not started
In a video game tournament, $40 \%$ of the participants are experts ($E$) and the rest are beginners ($P$). It is known that $80 \%$ of the experts reach the final…

In a video game tournament, $40 \%$ of the participants are experts ($E$) and the rest are beginners ($P$). It is known that $80 \%$ of the experts reach the final ($F$), whereas only $20 \%$ of the beginners achieve this.

If we choose a participant at random and we know they are a beginner, what is the probability that they reach the final? Express the result using conditional probability notation.

Solve
Practice★★★Not started
In an esports tournament, a player must pass two consecutive stages. The probability of passing the first stage is $0,7$. If they pass the first, the probability of…

In an esports tournament, a player must pass two consecutive stages. The probability of passing the first stage is $0,7$. If they pass the first, the probability of passing the second is $0,6$. However, if they do not pass the first stage, they have a "second chance" opportunity where the probability of passing the second stage drops to $0,2$.

  1. Calculate the probability that the player passes the second stage.

  2. Given that the player has passed the second stage, what is the probability that they did NOT originally pass the first stage?

Solve
Practice★★★Not started
In a high school senior classroom, $60 \%$ of the students are female. It is known that $80 \%$ of the females passed the last math exam, whereas the percentage of…

In a high school senior classroom, $60 \%$ of the students are female. It is known that $80 \%$ of the females passed the last math exam, whereas the percentage of passes among the males was $x \%$.

If the probability that a randomly chosen person from the classroom has passed the exam is $0,74$, calculate the value of $x$ (percentage of passes among males). Then, calculate the probability that a randomly chosen person is male, given that they have failed the exam.

Solve

Bayes' Theorem: Reversing the Condition

The tree gave us $P(\text{late} \mid \text{bus})$. A new question: if you know a student was late, how likely is it that the student rides the bus? That is the reverse conditional, $P(\text{bus} \mid \text{late})$. The definition does the work: divide the path probability by the total probability of the condition.

Bar showing how all late students split between bus riders (about 83 percent) and other students (about 17 percent). All late students (5.3% of the school) Bus 83% 17% 0.044 / 0.053 ≈ 0.830 0.009 / 0.053 ≈ 0.170

Notice that $P(B \mid L) \approx 0.83$ is very different from $P(L \mid B) = 0.08$. The reversed condition has a different denominator, and it depends on how large each group is.

Practice★★☆Not started
An urban clothing brand manufactures its hoodies in two different workshops. Workshop $A$ produces $60\%$ of the garments and workshop $B$ produces the rest. It is known…

An urban clothing brand manufactures its hoodies in two different workshops. Workshop $A$ produces $60\%$ of the garments and workshop $B$ produces the rest. It is known that $5\%$ of the hoodies from workshop $A$ have a stitching defect, whereas in workshop $B$ the percentage of defects is $8\%$. A hoodie is chosen at random from the store and turns out to be defective. Calculate the probability that it was manufactured in workshop $A$.

Solve
Practice★★☆Not started
A screening test for a rare disease, which $1\%$ of the population suffers from, tests positive in $96\%$ of sick people (sensitivity). However, it also gives a "false…

A screening test for a rare disease, which $1\%$ of the population suffers from, tests positive in $96\%$ of sick people (sensitivity). However, it also gives a "false positive" in $2\%$ of healthy people.

  1. a) Calculate the probability that a randomly chosen person tests positive.
  2. b) If a person's test has come back positive, what is the actual probability that they are sick?
0.01 0.99 0.96 0.04 0.02 0.98 Sick (E) Healthy (S) Positive (+) Negative (-) Positive (+) Negative (-) 0.01 · 0.96 = 0.0096 0.01 · 0.04 = 0.0004 0.99 · 0.02 = 0.0198 0.99 · 0.98 = 0.9702
Solve
Practice★★★Not started
On a streaming platform, $60 \%$ of users have a "Standard" subscription ($S_1$) and the rest have a "Premium" subscription ($S_2$). It is known that $15 \%$ of users…

On a streaming platform, $60 \%$ of users have a "Standard" subscription ($S_1$) and the rest have a "Premium" subscription ($S_2$). It is known that $15 \%$ of users with a standard subscription cancel their account before the end of the first month, whereas among Premium users, only $5 \%$ cancel in that period.

If we select a random user who has canceled their subscription before the first month, calculate the probability that they had a "Premium" subscription. Illustrate the problem using a tree diagram showing all the probabilities involved.

0,60 0,40 0,15 0,85 0,05 0,95 Standard (S₁) Premium (S₂) Cancels (C) Continues (C') Cancels (C) Continues (C') P(S₁ ∩ C) = 0.09 P(S₁ ∩ C') = 0.51 P(S₂ ∩ C) = 0.02 P(S₂ ∩ C') = 0.38
Solve

Base Rates and Several Causes

Bayes' Theorem has a surprising consequence when the thing you are testing for is rare. The easiest way to see it is to imagine a big group of people and count.

Counting tree for 10,000 people: 100 have a condition, 90 of them test positive; 9,900 do not, and 495 of them also test positive. 10,000 people Has it: 100 Healthy: 9,900 Positive: 90 Negative: 10 Positive: 495 Negative: 9,405 90 true positives 495 false positives P(has it | positive) = 90 / (90 + 495) = 90/585 ≈ 0.154

Why is it so low? The condition is rare, so the healthy people who get false positives vastly outnumber the sick people who get true positives. In a screening program for a rare condition, most positive results are false alarms, and that is why a positive test is usually followed by a second, more accurate test.

Bayes' Theorem also works with more than two causes. Add one product to the denominator for each cause.

Some problems call these a posteriori probabilities, meaning the probabilities of each cause after you see the outcome. They are just the Bayes' Theorem answers from this example.

Practice★★★Not started
A health center conducts a screening test for a food intolerance that affects $2 \%$ of the population. The test is not perfect: it tests positive in $98 \%$ of the…

A health center conducts a screening test for a food intolerance that affects $2 \%$ of the population. The test is not perfect: it tests positive in $98 \%$ of the people who actually suffer from the intolerance, but it also gives a "false positive" in $3 \%$ of healthy people.

If a teenager takes the test and the result is positive:

  1. What is the probability that they are actually intolerant?

  2. Interpret the result obtained in relation to the effectiveness of the test for mass screening in populations where the prevalence of the disease is very low.

0.02 0.98 0.98 0.02 0.03 0.97 Population Intolerant Healthy Test (+) Test (-) Test (+) Test (-) P(I∩+) = 0.02 · 0.98 = 0.0196 (True Positive) P(I∩-) = 0.02 · 0.02 = 0.0004 P(S∩+) = 0.98 · 0.03 = 0.0294 (False Positive) P(S∩-) = 0.98 · 0.97 = 0.9506 Total Positive Cases
Solve
Practice★★★Not started
A factory making components for smartphones uses three machines, $A$, $B$, and $C$, to produce a specific part. Machine $A$ produces $45 \%$ of the total, $B$ produces…

A factory making components for smartphones uses three machines, $A$, $B$, and $C$, to produce a specific part. Machine $A$ produces $45 \%$ of the total, $B$ produces $30 \%$, and $C$ produces the rest. It has been detected that $2 \%$ of the parts from $A$ are defective, $3 \%$ of those from $B$, and $5 \%$ of those from $C$.

If a part is chosen at random and turns out to be defective, determine with reasoning which machine is most likely to have manufactured it. To do this, calculate the three a posteriori probabilities using Bayes' Theorem.

Solve
Practice★★★Not started
We have two opaque urns. Urn $U_A$ contains 4 white balls and 6 black balls. Urn $U_B$ contains 5 white balls and 3 black balls. The experiment consists of drawing a…

We have two opaque urns. Urn $U_A$ contains 4 white balls and 6 black balls. Urn $U_B$ contains 5 white balls and 3 black balls. The experiment consists of drawing a ball from urn $U_A$ and, without looking at its color, placing it into urn $U_B$. Next, two balls are drawn simultaneously from urn $U_B$.

If the two balls drawn from the second urn turn out to be white, what is the probability that the ball transferred from the first urn was black? Express the result as a fraction in lowest terms.

Solve

Back to the beginning: for all 200 surveyed students, $P(D) = \frac{90}{200} = 0.45$. But if you know the student has a part-time job, the sample space shrinks to the 100 students with jobs, and $P(D \mid J) = \frac{60}{100} = 0.60$. Extra information changed the probability.

Summary

See all the exercises in this section