On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Statistics · Grade 9-12

Conditional Probability

Conditional probability is the probability that one event happens given that another event has already happened.

P(A∣B)=P(A∩B)P(B)

Quick Answer

Conditional probability is the probability that one event happens given that another event has already happened. Knowing the condition shrinks the sample space to the cases where it is true, and you count only inside that smaller group: P(A∣B)=P(A∩B)P(B). Use it whenever a question restricts attention with words like given, if, among or of those who, and to read two-way tables, medical tests and survey results. Order matters: P(A∣B) and P(B∣A) usually differ.

Why This Matters

New information changes chances, and conditional probability says by how much. It is how a doctor reads a positive test, how an insurer prices a teenage driver, and how a forecast updates when clouds roll in. Confusing P(A∣B) with P(B∣A) is one of the costliest errors in statistics: for a rare disease, a positive result from an accurate test can still leave a person more likely healthy than sick.

Intuitive Explanation

A school surveys 200 students. Of the 80 who play a sport, 50 also play an instrument; of the 120 who do not play a sport, 40 play an instrument, so 90 students play an instrument in all. Pick a student at random and P(instrument) = 90/200 = 0.45. Now you learn that the student plays a sport. The 120 non-athletes are no longer possible, so the denominator becomes 80, and P(instrument | sport) = 50/80 = 0.625. The condition did not change the overlap of 50; it changed which group you divide by.

The formula says the same thing with probabilities: P(A∣B)=P(A∩B)P(B)=50/20080/200=5080. Dividing by P(B) rescales B so that it becomes the whole sample space. Swap the roles and you divide by a different group: P(sport | instrument) = 50/90 ≈ 0.56, because 90 students play an instrument. Same overlap, different denominator, different answer.

Not every question with two events is conditional. P(sport and instrument) = 50/200 = 0.25 asks about the whole school: what share of all 200 students do both. P(instrument | sport) = 0.625 asks about athletes only. The giveaway is the reference group. If the question narrows attention to a subgroup, such as "of the athletes" or "on rainy days", it is conditional, and that subgroup's size goes in the denominator.

Think of it like this. Zoom a camera onto one section of a stadium: once you know the person is in the student section, you count only the people in that frame and ask what share of them wear red. Zooming changes the group you divide by, not the people in the overlap.

Core idea. Knowing that B happened replaces the original sample space with B itself, so the chance of A becomes the share of B's outcomes that are also in A: P(A∣B)=P(A∩B)P(B), which usually differs from P(B∣A).


When to Use

Use conditional probability when a question gives you a fact first and asks about chances within it: given, if, among, of those who, "what fraction of the players who…". Two-way tables and the second-stage branches of tree diagrams are its usual homes. Find the condition; its total is your denominator. If the question is about everyone, with no restriction, you want the joint probability P(A∩B) or the Multiplication Rule; if knowing the condition changes nothing, the events are independent.

Tip. Ask: Are you told that some condition is already true, so only the cases meeting it count as the new total?

How to Recognize It

Before dividing, decide which group the question has narrowed attention to, because the size of that group becomes your denominator.

  1. Does the question restrict you to part of the population, such as only the students who play music or only the positive test results?

    Yes means the restricted group is the new sample space. If the question is about everyone, as in the chance a random student plays music and a sport, you want a joint probability from the Multiplication Rule.

  2. Can you say which event is known and which one is being asked about?

    The known event goes after the bar and supplies the denominator. Swapping them, as in mixing up the chance a sick person tests positive with the chance a positive tester is sick, gives a different number.

  3. Does knowing the condition actually change the chance of the other event?

    If it does, the events are dependent and the condition carries real information. If P(A∣B) equals P(A), they are Independent Events and the condition can be ignored.

  4. Are the numbers given as counts in a table rather than as probabilities?

    Then divide the cell count by its row or column total, which is a Conditional Relative Frequency. It works as a conditional probability when one person is picked at random from that group.

Conditional Probability vs Multiplication Rule vs Independent Events vs Conditional Relative Frequency

Each involves two events and a fraction built from them, so the chance of A given B, the chance of A and B, and the chance of B given A get swapped. Ask which group is the denominator: the condition, the whole population, or a table row.

Conditional Probability

Meaning
Conditional probability is the chance of one event among only the cases where another event is known to have happened.
Key test
The denominator is the condition's group, not everyone.
Formula
P(A∣B)=P(A∩B)P(B)
Example
Of 50 dog owners in a survey, 20 also own a cat, so P(cat∣dog)=0.4.

Multiplication Rule

Meaning
The multiplication rule finds the chance that two events both happen by multiplying one probability by a conditional probability.
Key test
The denominator is the whole population; the answer is a joint 'and' chance.
Formula
P(A∩B)=P(B) P(A∣B)
Example
If 40% of people own a dog and half of the dog owners own a cat, then P(dog and cat)=0.4×0.5=0.2.

Independent Events

Meaning
Two events are independent when the condition makes no difference, so the conditional probability equals the ordinary one.
Key test
Compare P(A∣B) with P(A); if they match, the condition adds nothing.
Formula
P(A∣B)=P(A)
Example
Given that a fair coin landed heads, the chance a die shows 6 is still 16.

Conditional Relative Frequency

Meaning
A conditional relative frequency is the count in one cell of a two-way table divided by its row or column total.
Key test
Describes data already collected; it estimates a conditional probability.
Formula
cell countrow total
Example
In a table, 18 of the 45 seniors drive to school, a conditional relative frequency of 0.4.

Formula & Notation

P(A∣B)=P(A∩B)P(B)
For events A and B with P(B)>0, conditional probability is defined by restricting the sample space to B and measuring the fraction of that restricted space that also lies in A.

How to read it: P(A∣B) reads “the probability of A given B.” The bar ∣ means “given” or “assuming” — it names the event you already know has happened. P(A∩B) is the probability that A and B both happen, and P(B) is the new, smaller denominator: once you know B happened, B’s outcomes are the only ones left to count. So P(A∣B)=P(A∩B)P(B) asks: out of the times B happens, how often does A happen too? P(B∣A) flips the roles — it assumes A happened and divides by P(A) instead, which usually gives a different answer.

Worked Examples

Example 1 — Rain and a late bus

Easy

Over 100 school days it rained on 30. The bus was late on 18 of the rainy days and on 14 of the 70 dry days. Find P(late | rain), P(late | dry) and P(rain | late).
Show the steps and the answer
  1. Build the table: rain and late 18, rain and on time 12, dry and late 14, dry and on time 56. Totals: 30 rainy, 70 dry, 32 late, 68 on time.

    Writing all four cells and every total shows each group you might need to divide by; the four cells add to 100.

  2. Find P(late∣rain)=1830=0.60.

    Given rain, only the 30 rainy days remain, and the bus was late on 18 of them.

  3. Find P(late∣dry)=1470=0.20.

    Rain triples the chance of a late bus, from 0.20 to 0.60, so the two events are not independent.

  4. Find P(rain∣late)=1832≈0.56.

    Now the condition is 'late', so the denominator is the 32 late days. The overlap of 18 is the same, but the answer is not 0.60.

Answer: P(late | rain) = 0.60, P(late | dry) = 0.20, P(rain | late) = 18/32 ≈ 0.56.

Takeaway: Find the condition and divide by its total; changing which event is given changes the denominator.

Example 2 — Joint probability or conditional?

Standard

In a town, 40% of households own a dog and 15% own both a dog and a cat. (a) What is the probability that a random household owns a dog and a cat? (b) Given that a household owns a dog, what is the probability that it also owns a cat?
Show the steps and the answer
  1. (a) The question is about all households, with no condition, so it asks for the joint probability: 0.15.

    'A dog and a cat' measures the overlap out of everyone; nothing narrows the group.

  2. (b) Now the group is dog owners only: P(cat∣dog)=P(cat∩dog)P(dog)=0.150.40=0.375.

    Dividing by 0.40 rescales the dog owners so that they are the whole sample space.

  3. Check with an imaginary town of 1,000 households: 400 own a dog and 150 own both, and 150400=0.375.

    Turning percentages into counts makes the smaller denominator visible.

  4. Note what you cannot find: P(dog∣cat) needs P(cat), which the problem does not give.

    The denominator is always the condition's probability, so a different condition needs a different number.

Answer: (a) 0.15. (b) 0.375, which is 2.5 times the joint probability because it is measured among dog owners only.

Takeaway: 'A and B' is out of everyone; 'A given B' is out of B only. Look for the words that narrow the group.

Example 3 — Find the mistake: flipping the condition

Application

Suppose 1% of people have a certain disease. A test comes back positive for 90% of people who have the disease and for 9% of people who do not. Kim says: "The test is 90% accurate, so if you test positive there is a 90% chance you have the disease." Find the mistake and give the correct probability.
Show the steps and the answer
  1. Name Kim's number: 90% is P(positive∣disease), the share of sick people who test positive.

    Kim needs the reverse, P(disease∣positive), whose denominator is everyone who tests positive.

  2. Imagine 10,000 people: 1% means 100 have the disease and 9,900 do not.

    Whole numbers make both groups of positive results easy to count.

  3. Count the positives: 90% of 100 is 90 true positives, and 9% of 9,900 is 891 false positives, so 981 positives in all.

    Positive results come from both groups, and the healthy group is 99 times larger.

  4. Divide: P(disease∣positive)=90981≈0.092.

    Among people who test positive, the healthy outnumber the sick by 891÷90=9.9 to 1.

Answer: About 9%, not 90%: P(disease∣positive)=90981≈0.092.

Takeaway: Before quoting a conditional probability, say which group it is out of; P(positive∣disease) and P(disease∣positive) can be wildly different.

Where You'll See It

  • Picking a sock in the dark

    Given that the first sock you grabbed is blue, the probability the next is also blue changes because the drawer now has fewer blue socks — that's conditioning on what already happened.

  • Weather and recess

    P(recess outside | it's raining) is far lower than P(recess outside) overall; knowing it rains narrows the situations you consider.

  • Class survey two-way table

    Given a student plays a sport, the probability they also play an instrument uses only the sport-playing row as the new total, not the whole class.

Common Mistakes

  1. The slip: Keep dividing by the original total even after the condition is known.

    Why it's tempting: The full sample space is what you started with.

    Instead: Conditioning shrinks the sample space to where B is true, so divide by P(B): P(A|B) = P(A and B)/P(B), not by the whole total.

  2. The slip: P(A | B) is the same as P(B | A).

    Why it's tempting: Both involve A and B, so they seem interchangeable.

    Instead: They are usually different: P(rain | clouds) ≠ P(clouds | rain). The condition (after the bar) sets which group is the new total.

  3. The slip: If A and B are related, knowing B always changes A's probability the same way.

    Why it's tempting: Conditioning feels like a fixed adjustment.

    Instead: If A and B are independent, P(A|B) = P(A) — the condition changes nothing; conditional probability differs from the unconditional one only when events are dependent.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. A fair number cube is rolled. Given that the result is even, what is the probability that it is greater than 3?

    Hint: The condition shrinks the sample space. Which outcomes are left?

  2. A school has 60 juniors and 90 seniors. 24 juniors and 54 seniors drive to school. Find P(drives∣senior) and P(senior∣drives).

    Hint: For each one, ask which group you are restricted to; that group's total is the denominator.

  3. P(A)=0.5, P(B)=0.4 and P(A∩B)=0.1. Find P(A∣B) and P(B∣A).

    Hint: Divide the overlap by the probability of the event that is given.

  4. 1% of people have a condition. A test is positive for 90% of people who have it and for 5% of people who do not. In a group of 10,000 people, find P(has condition∣positive).

    Hint: Count the true positives and the false positives separately, then restrict to everyone who tested positive.

  5. A class of 30 has 6 guitar players, and 2 of them are left-handed. A student is picked at random from the whole class. You want P(left-handed and plays guitar). Is this a conditional probability?

    Hint: Is any condition given that shrinks the group before you pick?

  6. In a club of 40 people, 16 are in the band, and 6 of the band members also run track. Omar writes, "P(track∣band)=640=0.15." Correct his work.

    Hint: Which group does "given band" restrict you to?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why does a positive result on a 99% accurate test not mean a 99% chance of having the disease?

The accuracy is P(positive∣sick)P(\text{positive} \mid \text{sick}), but you want P(sick∣positive)P(\text{sick} \mid \text{positive}). Suppose 1 person in 1,000 is sick and the test is wrong 1% of the time. In 100,000 people, 99 of the 100 sick people test positive, but so do about 999 of the 99,900 healthy ones. Only 991098≈9%\frac{99}{1098} \approx 9\% of the positives are actually sick.

Does a high P(A | B) mean that B causes A?

No. A conditional probability only describes how often A happens among the cases where B happened. Among people carrying umbrellas, the chance of rain that day is high, but umbrellas do not cause rain. A high value can come from B causing A, from A causing B, or from a third factor behind both; telling these apart needs an experiment, not just the probability.

How do I find P(B | A) if I only know P(A | B)?

Go through the joint probability. Since P(A∩B)=P(A∣B) P(B)P(A \cap B) = P(A \mid B)\,P(B), you get P(B∣A)=P(A∣B) P(B)P(A)P(B \mid A) = \frac{P(A \mid B)\,P(B)}{P(A)}, a result called Bayes' theorem. If 30% of students take art, 60% of art students also take music, and 45% of all students take music, then P(art∣music)=0.6×0.30.45=0.4P(\text{art} \mid \text{music}) = \frac{0.6 \times 0.3}{0.45} = 0.4.

What happens if the condition can never happen?

The conditional probability is undefined. The formula divides by P(B)P(B), and if B is impossible there are no cases to count inside, so asking what happens given B makes no sense. That is why the definition requires P(B)>0P(B) > 0. In a two-way table it shows up as a row with a total of zero: you cannot ask what fraction of an empty group has some feature.

Learning Path

Conditional Probability

You are here

You need Sample Space, Compound Events (what A and B means) and Two-Way Tables (rows and columns of counts) first. Conditional probability adds restricting to the cases where the condition holds and dividing by that group's size. Next, Independent Events are exactly those with P(A∣B)=P(A), and the Multiplication Rule rearranges the formula into P(A∩B)=P(A) P(B∣A) to find the chance that both happen.

See Also