Year 10 Mathematics | Victorian Curriculum 2.0
Conditional probability
Topic 16 | Statistics & Probability | Practice

What you will learn

  • calculate conditional probabilities using P(A∣B)=P(A and B)P(B)P(A \mid B) = \dfrac{P(A \text{ and } B)}{P(B)}P(A∣B)=P(B)P(A and B)​,
  • interpret the language of conditional probability: “given”, “if”, “of”, “knowing that”,
  • determine whether two events are independent,
  • apply conditional probability to sampling without replacement,
  • read and construct two-way tables to find conditional probabilities,
  • draw tree diagrams with conditional branches for dependent events.
Why conditional probability?

In real life, new information changes probabilities. The chance of rain tomorrow is different if you know a cold front is approaching. The chance of drawing a red card from a deck changes if you know the first card drawn was red. Conditional probability formalises how knowledge updates likelihood, and it underpins medical testing, spam filters, weather forecasting, and legal reasoning.

Where you'll see this
  • Medicine: the probability a patient has a disease given a positive test result (very different from the probability of testing positive given the disease).
  • Insurance: the probability of a claim given the driver is under 25.
  • Quality control: the probability a second item is defective given the first was defective (without replacement).
  • Sport: the probability a team wins the match given they scored first.
Worked example 0 Real-world example: medical testing

A screening test for a rare disease has the following properties: the disease affects 1%1\%1% of the population. If a person has the disease, the test is positive 95%95\%95% of the time. If a person does not have the disease, the test is positive 3%3\%3% of the time (false positive). What is the probability that a person who tests positive actually has the disease?

  1. Let DDD = has disease, T+T^+T+ = tests positive.
  2. P(D)=0.01P(D) = 0.01P(D)=0.01, P(T+∣D)=0.95P(T^+ \mid D) = 0.95P(T+∣D)=0.95, P(T+∣D‾)=0.03P(T^+ \mid \overline{D}) = 0.03P(T+∣D)=0.03.
  3. P(T+)=P(T+∣D)⋅P(D)+P(T+∣D‾)⋅P(D‾)=0.95×0.01+0.03×0.99=0.0095+0.0297=0.0392P(T^+) = P(T^+ \mid D) \cdot P(D) + P(T^+ \mid \overline{D}) \cdot P(\overline{D}) = 0.95 \times 0.01 + 0.03 \times 0.99 = 0.0095 + 0.0297 = 0.0392P(T+)=P(T+∣D)⋅P(D)+P(T+∣D)⋅P(D)=0.95×0.01+0.03×0.99=0.0095+0.0297=0.0392.
  4. P(D∣T+)=P(T+∣D)⋅P(D)P(T+)=0.00950.0392≈0.242P(D \mid T^+) = \dfrac{P(T^+ \mid D) \cdot P(D)}{P(T^+)} = \dfrac{0.0095}{0.0392} \approx 0.242P(D∣T+)=P(T+)P(T+∣D)⋅P(D)​=0.03920.0095​≈0.242.

Key idea: even with an accurate test, only about 24%24\%24% of positive results are true positives when the disease is rare. This is why confirmatory testing exists.

1. Conditional probability

The conditional probability of event AAA given event BBB has occurred is:

Conditional probability

Definition

P(A∣B)=P(A and B)P(B),P(B)>0P(A \mid B) = \dfrac{P(A \text{ and } B)}{P(B)}, \quad P(B) > 0P(A∣B)=P(B)P(A and B)​,P(B)>0

Read P(A∣B)P(A \mid B)P(A∣B) as “the probability of AAA given BBB.”

The vertical bar "∣\mid∣" means “given that” or “knowing that.” Watch for these phrases in word problems:

  • “If a student plays sport, what is the probability they also play music?” means P(music∣sport)P(\text{music} \mid \text{sport})P(music∣sport).
  • “Of those who passed, what fraction studied more than 555 hours?” means P(studied>5∣passed)P(\text{studied} > 5 \mid \text{passed})P(studied>5∣passed).
Worked example 1 Using the formula

In a group of 404040 students, 252525 study maths, 181818 study science, and 101010 study both. Find P(science∣maths)P(\text{science} \mid \text{maths})P(science∣maths).

  1. P(maths)=2540P(\text{maths}) = \dfrac{25}{40}P(maths)=4025​.
  2. P(science and maths)=1040P(\text{science and maths}) = \dfrac{10}{40}P(science and maths)=4010​.
  3. P(science∣maths)=P(science and maths)P(maths)=10/4025/40=1025=25=0.4P(\text{science} \mid \text{maths}) = \dfrac{P(\text{science and maths})}{P(\text{maths})} = \dfrac{10/40}{25/40} = \dfrac{10}{25} = \dfrac{2}{5} = 0.4P(science∣maths)=P(maths)P(science and maths)​=25/4010/40​=2510​=52​=0.4.

Interpretation: of the 252525 maths students, 101010 also study science — that is 40%40\%40%.

2. Independent and dependent events

Two events are independent if knowing one occurred does not change the probability of the other:

P(A∣B)=P(A)(independence test)P(A \mid B) = P(A) \quad \text{(independence test)}P(A∣B)=P(A)(independence test)

Equivalently, for independent events: P(A and B)=P(A)×P(B)P(A \text{ and } B) = P(A) \times P(B)P(A and B)=P(A)×P(B).

If P(A∣B)≠P(A)P(A \mid B) \neq P(A)P(A∣B)=P(A), the events are dependent.

Worked example 2 Testing for independence

From the example above: P(science)=1840=0.45P(\text{science}) = \dfrac{18}{40} = 0.45P(science)=4018​=0.45 and P(science∣maths)=0.4P(\text{science} \mid \text{maths}) = 0.4P(science∣maths)=0.4.

Since 0.4≠0.450.4 \neq 0.450.4=0.45, the events “studies science” and “studies maths” are dependent. Knowing a student studies maths slightly decreases the probability they study science.

3. Two-way tables for conditional probability

A two-way table provides all the information needed to calculate conditional probabilities directly from counts.

Worked example 3 Conditional probability from a two-way table

A survey of 200200200 adults records exercise habits and health ratings:

Good healthPoor healthTotal
Exercises regularly9030120
Does not exercise404080
Total13070200

(a) P(good health∣exercises)=90120=34=0.75P(\text{good health} \mid \text{exercises}) = \dfrac{90}{120} = \dfrac{3}{4} = 0.75P(good health∣exercises)=12090​=43​=0.75.

(b) P(good health∣does not exercise)=4080=12=0.5P(\text{good health} \mid \text{does not exercise}) = \dfrac{40}{80} = \dfrac{1}{2} = 0.5P(good health∣does not exercise)=8040​=21​=0.5.

(c) P(exercises∣good health)=90130≈0.692P(\text{exercises} \mid \text{good health}) = \dfrac{90}{130} \approx 0.692P(exercises∣good health)=13090​≈0.692.

Note: P(A∣B)≠P(B∣A)P(A \mid B) \neq P(B \mid A)P(A∣B)=P(B∣A) in general. Part (a) and part (c) have different values.

4. Tree diagrams with conditional branches

When events are dependent, the branches of a tree diagram show conditional probabilities. This is especially useful for sampling without replacement.

Start3/5R2/5B2/42/4RB3/41/4RBRR: 3/5 x 2/4 = 6/20RB: 3/5 x 2/4 = 6/20BR: 2/5 x 3/4 = 6/20BB: 2/5 x 1/4 = 2/201st card2nd card (without replacement)
Tree diagram: drawing 2 cards from a hand of 3 red and 2 black cards without replacement.

The second-draw probabilities are conditional on the first draw’s result. After drawing a red card first, only 222 red and 222 black remain out of 444 total.

Worked example 4 Using the tree diagram

From the tree diagram above, find:

(a) P(at least one red)=P(RR)+P(RB)+P(BR)=620+620+620=1820=910P(\text{at least one red}) = P(RR) + P(RB) + P(BR) = \dfrac{6}{20} + \dfrac{6}{20} + \dfrac{6}{20} = \dfrac{18}{20} = \dfrac{9}{10}P(at least one red)=P(RR)+P(RB)+P(BR)=206​+206​+206​=2018​=109​.

(b) P(2nd card is red∣1st card is black)=34P(\text{2nd card is red} \mid \text{1st card is black}) = \dfrac{3}{4}P(2nd card is red∣1st card is black)=43​.

This can be read directly from the tree: on the lower branch (1st card black), the “R” branch has probability 34\dfrac{3}{4}43​.


Practice

Fluency

Tier 1: basic skills

    1. In a class of 303030 students, 121212 play basketball. What is P(basketball)P(\text{basketball})P(basketball)?
    2. Of the 121212 basketball players, 555 are also in the swim team. What is P(swim∣basketball)P(\text{swim} \mid \text{basketball})P(swim∣basketball)?
    3. A bag has 666 red and 444 blue marbles. One marble is drawn and not replaced. If the first marble was red, what is P(red on 2nd draw)P(\text{red on 2nd draw})P(red on 2nd draw)?
    4. Events AAA and BBB satisfy P(A)=0.3P(A) = 0.3P(A)=0.3, P(B)=0.5P(B) = 0.5P(B)=0.5, P(A and B)=0.15P(A \text{ and } B) = 0.15P(A and B)=0.15. Find P(A∣B)P(A \mid B)P(A∣B).
    5. Are AAA and BBB in Q4 independent? Justify.
    6. A two-way table shows: 202020 males own a pet, 151515 males do not, 252525 females own a pet, 101010 females do not. Find P(pet∣male)P(\text{pet} \mid \text{male})P(pet∣male).
    7. Using the same table, find P(male∣pet)P(\text{male} \mid \text{pet})P(male∣pet).
    8. A coin is tossed and a die is rolled. Are the events “heads” and “rolling a 6” independent? Explain.
    9. Two cards are drawn without replacement from a deck of 525252. Find P(2nd card is heart∣1st card is heart)P(\text{2nd card is heart} \mid \text{1st card is heart})P(2nd card is heart∣1st card is heart).
    10. State the formula for P(A∣B)P(A \mid B)P(A∣B).
Reasoning

Tier 2: mixed practice

    1. A box contains 555 green and 333 yellow balls. Two balls are drawn without replacement. Draw a tree diagram with conditional probabilities on each branch, and find P(both green)P(\text{both green})P(both green).

    2. In a school of 400400400 students, 240240240 study French, 180180180 study German, and 808080 study both. Find: (a) P(German∣French)P(\text{German} \mid \text{French})P(German∣French), (b) P(French∣German)P(\text{French} \mid \text{German})P(French∣German).

    3. A survey finds:

      Supports policyOpposes policyTotal
      Under 30453075
      30 and over354075
      Total8070150

      (a) Find P(supports∣under 30)P(\text{supports} \mid \text{under 30})P(supports∣under 30) and P(supports∣30 and over)P(\text{supports} \mid \text{30 and over})P(supports∣30 and over). (b) Is there an association between age group and opinion? Justify.

    4. Events AAA and BBB are such that P(A)=0.6P(A) = 0.6P(A)=0.6, P(B)=0.4P(B) = 0.4P(B)=0.4, and P(A∣B)=0.75P(A \mid B) = 0.75P(A∣B)=0.75. Find P(A and B)P(A \text{ and } B)P(A and B) and determine whether AAA and BBB are independent.

    5. Three machines produce items. Machine X makes 50%50\%50% of items with a 2%2\%2% defect rate. Machine Y makes 30%30\%30% with a 3%3\%3% defect rate. Machine Z makes 20%20\%20% with a 5%5\%5% defect rate. An item is selected at random. Find the probability it is defective.

Reasoning

Tier 3: explain and apply

    1. Using the machine data from Tier 2 Q5, an item is found to be defective. Find the probability it came from Machine Z.
    2. Explain, with a numerical example, why P(A∣B)≠P(B∣A)P(A \mid B) \neq P(B \mid A)P(A∣B)=P(B∣A) in general. Why is confusing these two a common and dangerous error in medical or legal contexts?
    3. A jar contains 444 red and 666 blue marbles. Three marbles are drawn without replacement. Find P(all three are blue)P(\text{all three are blue})P(all three are blue) using a chain of conditional probabilities.
    4. Two events satisfy P(A∣B)=0.5P(A \mid B) = 0.5P(A∣B)=0.5 and P(B∣A)=0.25P(B \mid A) = 0.25P(B∣A)=0.25. If P(B)=0.4P(B) = 0.4P(B)=0.4, find P(A)P(A)P(A).

Challenge

Reasoning

Harder reasoning

    1. A game show has three doors. Behind one door is a prize; behind the other two, nothing. You pick a door. The host, who knows what is behind each door, opens a different door to reveal no prize. You are offered the chance to switch. Using conditional probability, show that switching gives you a 23\dfrac{2}{3}32​ chance of winning.
    2. In a population, 0.5%0.5\%0.5% use a certain drug. A drug test has a 99%99\%99% true positive rate and a 2%2\%2% false positive rate. Find the probability that a person who tests positive actually uses the drug. Comment on the usefulness of the test.
    3. Prove that if AAA and BBB are independent, then AAA and B‾\overline{B}B (the complement of BBB) are also independent.
    4. Five cards are dealt from a standard deck of 525252. Find the probability that all five are spades, using a chain of conditional probabilities.
Year 10 Mathematics study companion | Practice