Maths › Statistics › Conditional probability

Conditional probability

Conditional probability is the probability of one event given that another has occurred, calculated by restricting the sample space to that event. Use the formula for P(A|B), tree diagrams and two-way tables, and apply the conditional test for independence.

Builds on Probability and Venn diagrams.

IN THIS TOPIC

  • Calculate conditional probabilities from the formula, from Venn diagrams and from two-way tables.
  • Build tree diagrams for successive events, including sampling without replacement.
  • Use P(A|B) = P(A) as a test of independence.
  • Criticise the assumptions behind a probability model and state the direction in which the answer would change.

COMMON MISCONCEPTION

P(A|B) and P(B|A) are the same thing written two ways.

The two divide the same P(A ∩ B) by different denominators, P(B) for the first and P(A) for the second, so they are generally unequal. They agree only when P(A) = P(B), or when the overlap has probability zero and both are zero. The probability that a chess player is a grandmaster is small; the probability that a grandmaster plays chess is 1.

Restricting the sample space

P(A|B)=P(A∩B)P(B)P(A|B) = \frac{P(A ∩ B)}{P(B)}NOT IN THE BOOKLET: LEARN IT
On the left, a full sample space holding overlapping circles A and B; on the right, only circle B survives and the question becomes what fraction of B is also A: 0.2 over 0.4, giving 0.5.
FIG. 1Given B, the sample space is restricted to B, and P(A|B) is the proportion of B that also lies in A.

P(A|B) reads “the probability of A given B” and is defined for P(B) > 0. Conditioning restricts attention to outcomes in B and rescales their probabilities, which is what the formula does: the probability of the part of A inside B, divided by P(B) rather than by 1. With P(A ∩ B) = 0.2 and P(B) = 0.4, P(A|B) = 0.5, which equals P(A) = 0.5; that equality is the conditional test for independence given below.

The order of the two events matters: P(A|B) and P(B|A) divide the same P(A ∩ B) by different denominators and are generally unequal. The probability that a chess player is a grandmaster is small; the probability that a grandmaster plays chess is 1.

Multiplying up gives P(A ∩ B) = P(A|B) × P(B), which is the calculation performed when multiplying along a path of a tree diagram.

Check the current formula booklet for your awarding organisation. Where a conditional probability result is supplied it is often the product form P(A ∩ B) = P(A)P(B|A), together with Bayes' theorem; the quotient above is a rearrangement of the product rule.

Trees, and drawing without replacement

A two-stage tree for drawing counters without replacement: first-draw branches 3/5 and 2/5, second-draw branches adjusted to the four remaining counters, and end probabilities 3/10, 3/10, 3/10 and 1/10 that sum to one.
FIG. 2Second-draw branches carry conditional probabilities: four counters remain, so each second-draw probability is out of 4.

A tree diagram displays conditional probabilities as branches. Multiply along a path and add between paths. In sampling without replacement, the probabilities on the second-stage branches depend on the outcome of the first draw.

WORKED EXAMPLE

Two counters, no replacement

A bag holds 3 red and 2 blue counters. Two are drawn without replacement. Find the probability of exactly one red.

Two routes. Red then blue is 3/5 × 2/4 = 6/20, and blue then red is 2/5 × 3/4 = 6/20.

Add the routes: 6/20 + 6/20 = 12/20 = 3/5.

Check against the tree's other ends. Both red is 3/10 and both blue is 1/10, and 3/10 + 1/10 + 3/5 = 1, as it must.

Tables, and the independence test

A two-way table makes the calculation direct. Given “the student is in Year 12”, restrict to that row and divide the cell entry by the row total. This is the formula applied to counts: the numerator comes from the intersection and the denominator from the conditioning event.

Where P(B) > 0, A and B are independent exactly when P(A|B) = P(A). This is equivalent to the multiplication test P(A ∩ B) = P(A)P(B); either may be used, provided the comparison is written out.

The model behind the numbers

Every probability calculation rests on a model, and questions may ask for a criticism of it. Treating successive days' weather as independent, assuming a spinner is fair, or ignoring that survey respondents may differ from non-respondents are all assumptions that affect the result.

A complete criticism names the assumption and states the direction in which the answer would change without it. Rainy days tend to occur in runs, so assuming independence understates the probability of a week of rain.

ASSESSMENT FOCUS

  • Write the conditional probability formula before substituting values.
  • Without replacement, each second-stage denominator is one less than the first-stage total; adjust the numerators for the item removed.
  • From a table, condition by restricting to one row or column and dividing by its total.
  • For “show that A and B are not independent”, compare P(A|B) with P(A), or P(A ∩ B) with P(A)P(B), and state the conclusion in a sentence.

CHECK YOURSELF

P(A ∩ B) = 0.12 and P(B) = 0.4. Find P(A|B), and state what P(A) would have to equal for A and B to be independent.

Show a hint

Overlap over condition.

Show the answer

P(A|B) = 0.12/0.4 = 0.3.

Independence needs P(A|B) = P(A), so P(A) would have to be 0.3.

To condition, divide P(A ∩ B) by the probability of the conditioning event, which must be non-zero.

On a tree, multiply along a path and add between paths; without replacement the second-stage denominators are reduced by one.

WORKBOOK

Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.

15 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the conditional probability questions page.

CHECK YOUR PROGRESS

Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.

  • Calculate conditional probabilities from the formula, from Venn diagrams and from two-way tables.
  • Build tree diagrams for successive events, including sampling without replacement.
  • Use P(A|B) = P(A) as a test of independence.
  • Criticise the assumptions behind a probability model and state the direction in which the answer would change.

Open the full revision checklist to see every objective in the course in one place.