M2StatisticsCore

Conditional Probability

Learning something changes a probability. P(A∣B)P(A \mid B) — "the probability of AA given\textbf{given} BB" — is the probability of AA once you already know BB has happened. The effect is simply that the sample space has shrunk to BB.

35 min Probability

The big picture

Reading the notation as "restrict the sample space" rather than memorising a formula makes the whole topic easier and prevents its most damaging error. P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) are different quantities and can differ enormously — the probability that someone has a disease given a positive test is not the probability of a positive test given the disease. That confusion has real consequences in medicine and in law, where it is common enough to have a name, and the specification examines it because getting it right requires understanding rather than recall.

What you'll be able to do

  • Interpret P(A∣B)P(A \mid B) as a probability within a restricted sample space
  • Use the conditional probability formula in both directions
  • Read conditional probabilities from Venn diagrams and two-way tables
  • Distinguish P(A∣B)P(A \mid B) from P(B∣A)P(B \mid A) and explain why they differ
1

Restricting the sample space

Knowing that BB has occurred rules out every outcome outside BB. So instead of asking what fraction of the whole sample space is AA, you ask what fraction of B\textbf{B} is also AA.

That gives the formula directly: the outcomes in both, divided by the outcomes in BB. Dividing by P(B)P(B) is what rescales the reduced space so its probabilities still sum to 1.

On a Venn diagram, P(A∣B)P(A \mid B) means covering everything outside the BB circle and asking what proportion of what remains lies in the overlap.

P(A∣B)=P(A∩B)P(B)P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}
Both, divided by the new sample space.
P(A∩B)=P(B) P(A∣B)P(A \cap B) = P(B)\,P(A \mid B)
The multiplication law, rearranged.
Example 1A die shows an even number. Find the probability it is greater than 3.
1The sample space shrinks to {2,4,6}\left\{2,4,6\right\} — three outcomes.
2Of those, {4,6}\left\{4,6\right\} exceed 3.
3P=23P = \tfrac{2}{3}.
Answer23\tfrac{2}{3}
Why this works

Unconditionally, P(greater than 3)=12P(\text{greater than }3) = \tfrac12. Knowing the number is even raises it to 23\tfrac23, because the information removed two low outcomes and only one high one. Conditioning can move a probability up or down.

2

Two-way tables

A two-way table is often the fastest route. The conditioning event selects a row or column, and the answer is one cell divided by that row or column total — rather than by the grand total.

Getting the denominator right is the whole skill. Dividing by the grand total gives P(A∩B)P(A \cap B), not P(A∣B)P(A \mid B), and the two answers can look equally plausible.

Example 1Of 200 students, 120 study maths, of whom 45 also study physics. 30 of the 80 non-maths students study physics. Find P(physics∣maths)P(\text{physics} \mid \text{maths}) and P(maths∣physics)P(\text{maths} \mid \text{physics}).
1P(physics∣maths)P(\text{physics}\mid\text{maths}): restrict to the 120 maths students, of whom 45 do physics — 45120\tfrac{45}{120}.
2Total studying physics: 45+30=7545 + 30 = 75.
3P(maths∣physics)P(\text{maths}\mid\text{physics}): restrict to those 75, of whom 45 do maths — 4575\tfrac{45}{75}.
AnswerP(physics∣maths)=0.375P(\text{physics}\mid\text{maths}) = 0.375; P(maths∣physics)=0.6P(\text{maths}\mid\text{physics}) = 0.6.

Tip — Both answers share the numerator 45 and differ only in the denominator. That is the clearest possible illustration that the conditioning event picks the denominator.

3

Why the two directions differ

The numerator P(A∩B)P(A \cap B) is the same for both directions; only the denominator changes. When both conditioning events have positive probability and their intersection has positive probability, the two conditional probabilities are equal exactly when P(A)=P(B)P(A)=P(B). If the intersection is empty, both conditionals are zero even when the marginal probabilities differ.

When the two events have very different overall probabilities, the conditionals can differ dramatically. If a rare condition is almost always accompanied by a common symptom, then P(symptom∣condition)P(\text{symptom} \mid \text{condition}) is near 1 while P(condition∣symptom)P(\text{condition} \mid \text{symptom}) may be tiny, because the symptom has many other causes.

The general relationship between the two directions is obtained by writing P(A∩B)P(A \cap B) two ways and equating.

P(A∣B) P(B)=P(B∣A) P(A)P(A\mid B)\,P(B) = P(B \mid A)\,P(A)
Both equal P(A∩B)P(A\cap B).
Example 1A test is positive for 99% of people with a condition. 1% of the population has the condition, and the test is positive for 5% of those without it. In a population of 10 000, find the probability that someone testing positive has the condition.
1With the condition: 100100 people, of whom 9999 test positive.
2Without: 99009900 people, of whom 5%5\%, i.e. 495495, test positive.
3Total positives: 99+495=59499 + 495 = 594.
4P(condition∣positive)=99594P(\text{condition}\mid\text{positive}) = \tfrac{99}{594}.
AnswerAbout 0.1670.167 — only around one in six positives is a true case.
Why this works

The test is 99% sensitive, yet a positive result means the condition is present only about 17% of the time. The false positives come from a much larger group, so they outnumber the true positives — which is why P(A∣B)P(A\mid B) must never be read as P(B∣A)P(B\mid A).

4

Chains of conditional events

When events happen in sequence, the multiplication law extends: P(A∩B)=P(A)×P(B∣A)P(A \cap B) = P(A) \times P(B \mid A). Each stage is conditioned on everything before it.

Selection without replacement\textbf{without replacement} is the standard example. Removing an item changes both the favourable count and the total for the next draw, so the second probability is genuinely conditional.

With replacement, the conditional probability equals the unconditional one, which is exactly the definition of independence in the next lesson.

Example 1A bag holds 5 red and 3 blue counters. Two are drawn without replacement. Find the probability both are red.
1First red: 58\tfrac{5}{8}.
2Given one red is gone, 4 red remain of 7 counters: 47\tfrac{4}{7}.
3Multiply: 58×47=2056\tfrac{5}{8}\times\tfrac{4}{7} = \tfrac{20}{56}.
Answer514\tfrac{5}{14}

Tip — Without replacement, both the numerator and the denominator drop by one after a success. Changing only one of them is the usual slip.

Think like an examiner

  • State clearly which event you are conditioning on, and show the denominator you used.
  • Read the wording carefully: "given that", "of those who", and "among" all signal conditioning.
  • Never assume P(A∣B)=P(B∣A)P(A\mid B) = P(B\mid A); if a question offers both, they are almost certainly different.
  • For without-replacement problems, show the changed totals at each stage.

Common misconceptions

Dividing by the grand total instead of the conditioning event.
The denominator is P(B)P(B), not 1. Dividing by the total gives P(A∩B)P(A\cap B).
Swapping P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A).
They share a numerator but have different denominators, and can differ enormously.
Keeping the same probabilities for a second draw without replacement.
Both the favourable count and the total change after the first draw.
Reading "5% of those without the condition test positive" as "5% of positives".
Those are different conditionings. Build the frequency table and count.

Conditional probability

P(A∣B)=P(A∩B)P(B)P(A\mid B) = \tfrac{P(A\cap B)}{P(B)}
Restricted sample space.
P(A∩B)=P(B)P(A∣B)P(A\cap B) = P(B)P(A\mid B)
Multiplication law.
P(A∣B)P(B)=P(B∣A)P(A)P(A\mid B)P(B) = P(B\mid A)P(A)
Relating the two directions.
P(A′∣B)=1−P(A∣B)P(A'\mid B) = 1 - P(A\mid B)
Complement within the restricted space.

Stretch yourself

A factory has two machines. Machine X makes 70% of items with a 2% defect rate; machine Y makes 30% with a 6% defect rate. An item is found to be defective. Find the probability it came from machine Y.

Hint — Work with a concrete population — say 1000 items — and count defectives from each machine.

Reveal solution
SolutionTake 1000 items. Machine X makes 700, of which 2%2\%, i.e. 14, are defective. Machine Y makes 300, of which 6%6\%, i.e. 18, are defective. Total defective =14+18=32= 14 + 18 = 32. Restricting to defective items, P(Y∣defective)=1832=0.5625P(Y \mid \text{defective}) = \tfrac{18}{32} = 0.5625. So although machine Y makes less than a third of the output, it accounts for more than half the defects — its higher defect rate outweighs its smaller share. Note how different this is from P(defective∣Y)=0.06P(\text{defective} \mid Y) = 0.06: same numerator idea, entirely different denominator, and answers differing by a factor of nine. ■\blacksquare

Questions students ask

What does the vertical bar mean?
"Given". P(A∣B)P(A\mid B) is the probability of AA given that BB has occurred — not the probability of both, which is P(A∩B)P(A\cap B).
Why divide by P(B)P(B)?
Because the sample space has shrunk to BB. Dividing rescales the reduced space so its probabilities still sum to 1.
Can conditioning make a probability smaller?
Yes. Learning BB can raise or lower the probability of AA depending on how they overlap. If they are mutually exclusive, P(A∣B)=0P(A\mid B) = 0.
Why do medical test questions give such surprising answers?
Because when a condition is rare, the small percentage of false positives is drawn from a very large healthy group and can outnumber the true positives. A frequency table makes this visible immediately.

Key takeaways

  • Conditioning restricts the sample space to the given event.
  • P(A∣B)=P(A∩B)P(B)P(A\mid B) = \tfrac{P(A\cap B)}{P(B)} — the conditioning event supplies the denominator.
  • P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A) share a numerator but differ unless P(A)=P(B)P(A) = P(B).
  • Two-way tables and frequency counts make conditional problems concrete.
  • Without replacement, each stage is conditioned on the previous one.

How this fits the course

Test yourself

Answer a few questions, then review anything you missed.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 3 lessons

Put the methods into practice: see how A-Level maths duels work. An account is required to play; the overview and sample are public.