Conditional Probability Explained: P(A | B) with Real-World Examples
A clear introduction to conditional probability for grades 10–12: the formula P(A | B), independent vs. dependent events, the multiplication rule, and a worked Bayes example.
What is conditional probability?
Conditional probability is the probability that one event happens given that another event has already happened. We write it , read "the probability of given ."
The formula is
where is the probability that both and happen. Knowing that already occurred shrinks the sample space — instead of looking at all outcomes, we only look at outcomes inside , and ask what fraction of those also lie inside .
A first example. A standard deck has 52 cards. Let = the card is a Queen and = the card is a face card (Jack, Queen, or King — 12 cards total). Then
Among face cards, exactly one third are Queens — exactly what intuition says.
The multiplication rule
Rearranging the formula above gives the multiplication rule for the joint probability:
This is how you combine probabilities when events happen in sequence.
Example. A bag has 5 red and 3 blue marbles. You draw two marbles without replacement. What is the probability both are red?
- .
- After taking a red, 4 reds remain out of 7 total, so .
- .
The conditional probability captures the fact that the first draw changes what is left in the bag.
Independent vs. dependent events
Two events are independent when knowing one happened tells you nothing about the other. Formally, and are independent when
Either condition implies the other, so you can use whichever is easier to check.
Example. Roll a fair six-sided die twice. Let = the first roll is a 4 and = the second roll is even. The two rolls do not affect each other, so
If two events are not independent, they are dependent. The marble example above is a classic dependent case: the second draw depends on what you already removed from the bag.
Bayes' theorem
Sometimes you know but want . Bayes' theorem flips a conditional:
Here is the prior (what you believed about before seeing ), is the likelihood of the evidence under , and is the posterior (your updated belief).
Example: medical testing. A disease occurs in of a population. A test is sensitive (it gives a positive result of the time when the disease is present) and has a false-positive rate (it gives a positive result of the time when the disease is absent). If a random person tests positive, what is the probability they actually have the disease?
Let = "has disease" and = "tests positive." We want .
- Total probability of a positive test: .
- Apply Bayes' theorem: .
So even after a positive result, there is only about a chance the person has the disease. The takeaway: when a condition is rare, even an accurate test produces many false positives compared to true positives. This is the kind of result Bayes' theorem makes precise.
A quick recipe
When a problem gives you conditional information, work through it in this order:
- Identify the events. Name them , , , , etc., so the formulas don't get muddled.
- Write down what you know in symbols — , , etc.
- Decide which formula you need: definition of , multiplication rule, or Bayes' theorem.
- Plug in and simplify. Always sanity-check that probabilities are between and .
Common mistakes
- Confusing with . They are different in general — Bayes' theorem is exactly the bridge between them.
- Assuming independence. "With replacement" or "the two trials don't influence each other" usually means independent. "Without replacement" or sequential physical processes usually do not.
- Forgetting the denominator . You can only condition on events that actually have positive probability.
- Adding instead of multiplying. Use addition for " or "; use multiplication (with a conditional) for " and in sequence."
Practice Yourself
Try each one on paper first, then click Show answer to check your work.
- 1Practice problem 1
A bag has 4 red and 6 green balls. You draw two balls without replacement. What is the probability both are green?
Show answerHide answer
. After taking one green, 5 greens remain out of 9: . So .
- 2Practice problem 2
If , , and , are and independent?
Show answerHide answer
Check . This equals , so yes, and are independent.
- 3Practice problem 3
Given and , find .
Show answerHide answer
Apply the definition: .
- 4Practice problem 4
A factory has two machines. Machine 1 produces of parts and is defective of the time. Machine 2 produces and is defective of the time. A part is chosen at random and is defective. What is the probability it came from Machine 2?
Show answerHide answer
Let , be the machines and be defective. Total defect rate: . Then .
- 5Practice problem 5
You roll two fair dice. Given that the first die shows a , what is the probability the sum is ?
Show answerHide answer
Conditioning on the first die being , only outcomes where the second die equals give a sum of . So .
Related Topics
Frequently Asked Questions
What does $P(A \mid B)$ mean in plain English?
"The probability of happening, given that we already know happened." Knowing shrinks the sample space to just the outcomes inside .
When can I assume two events are independent?
When the physical setup makes one event genuinely not affect the other — separate dice rolls, drawing with replacement, or unrelated random processes. Otherwise compute and check whether it equals .
What is the difference between conditional probability and joint probability?
is the joint probability — the chance that both happen. is the conditional probability — the chance of once you already know . They are related by .
Why does a positive medical test not mean you have the disease?
When a disease is rare, the small false-positive rate is multiplied by a much larger healthy population. Bayes' theorem balances those two pieces and shows the posterior probability can be much lower than the test's sensitivity.
Is the multiplication rule the same as Bayes' theorem?
They are closely related. The multiplication rule writes as . Bayes' theorem rearranges that identity to recover from , , and .
Want to keep going?
Try a different problem with the AI Math Solver, browse the practice library, or return to High School Math.