Skip to content
IB Diploma ProgrammeSL & HL

Conditional probability and independence

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Conditional probability and independence notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Conditional probability and independence notes as text: skim, search, and jump between subtopics.

~14 min read

1. The definition of conditional probability

The probability of A given B is written P(A|B). It is the probability that A happens when you already know B has happened. Knowing B shrinks the sample space to B, so the denominator is P(B), the event after the bar.

The numerator is P(A ∩ B), the part of B where A also happens. The formula needs P(B) ≠ 0.

The command term find needs the formula written, the values substituted, then the answer. A correct answer with no method may earn no marks.

P(A|B) = (P(A ∩ B))/(P(B))

P(B|A) = (P(A ∩ B))/(P(A))

Worked example 14 marks

Do not use a calculator. Events A and B are such that P(A) = 0.5, P(B) = 0.3 and P(A ∩ B) = 0.12.

(a) Find P(A|B).

(b) Find P(B|A).

  1. 1

    (a) attempt to use P(A|B) = (P(A ∩ B))/(P(B)) (M1) [1]

  2. 2

    P(A|B) = 0.12/0.3 = 0.4 (A1) [1]

  3. 3

    (b) attempt to use P(B|A) = (P(A ∩ B))/(P(A)) (M1) [1]

  4. 4

    P(B|A) = 0.12/0.5 = 0.24 (A1) [1]

  5. 5

    the two answers differ because the denominators differ: P(B) in part (a), P(A) in part (b)

2. Conditional probability in context

The formula can be turned round to give the probability of both events: P(A ∩ B) = P(B) P(A|B). On a tree diagram this is the product along a path.

In a context question, name the events first. Let A be "is pregnant" and B be "tests positive". Then "the probability that a fox is pregnant, given that it tested positive" is P(A|B), not P(B|A).

The denominator P(B) is the total of every path that ends in the given event, so find it first. A tree diagram or a Venn diagram can organise the paths.

P(A ∩ B) = P(B) P(A|B)

P(B) = P(A ∩ B) + P(A' ∩ B)

Worked example 16 marks

Reyn is investigating the fertility of a group of adult female foxes.

He has developed a clinical test that aims to identify whether or not a given fox is pregnant, and he wants to evaluate the reliability of this test.

Reyn knows that

  • 40% of the foxes in the group are pregnant
  • if a fox is pregnant, the probability that it will test positive is 90%
  • if a fox is not pregnant, the probability it will test positive is 20%.

(a) Find the probability that a randomly selected fox from the group will test positive.

(b) Find the probability that a randomly selected fox from the group is pregnant, given that it tested positive.

  1. 1

    (a) let A = "is pregnant" and B = "produces a positive test result"; a valid initial approach for finding P(B), such as a tree diagram (M1) [1]

  2. 2

    P(B) = 0.4 × 0.9 + 0.6 × 0.2 (A1) [1]

  3. 3

    = 0.48 = 12/25 A1 [1]

  4. 4

    (b) attempt to use the conditional probability formula in context (M1) [1]

  5. 5

    P(pregnant|positive) = (P(pregnant ∩ positive))/(P(positive)) = 0.36/0.48 (A1) [1]

  6. 6

    = 0.75 = 3/4 A1 [1]

  7. 7

    check: 0.36 = 0.4 × 0.9 is the numerator, and 0.9 = P(B|A) is the reverse conditional, not the answer

3. Independent events

Two events are independent when knowing that one has happened does not change the probability of the other. In symbols, P(A|B) = P(A) = P(A|B').

Multiplying the first form by P(B) gives the test used most often: P(A ∩ B) = P(A) P(B). The two forms are equivalent. Use whichever is easier to evaluate.

The command term show that needs every step and a conclusion. The mark scheme for a show-that independence question gives a reasoning mark for the stated conclusion, and it depends on the marks before it.

P(A|B) = P(A) = P(A|B')

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

Worked example 13 marks

Consider events A and B such that P(A') = P(A ∪ B) = 3/4 and P(B|A) = 2/3.

Show that events A and B are independent.

  1. 1

    from part (a): P(A) = 1 - 3/4 = 1/4 and P(A ∩ B) = 2/3 × 1/4 = 1/6

  2. 2

    attempt to use P(A ∪ B) = P(A) + P(B) - P(A ∩ B), or a Venn diagram M1 [1]

  3. 3

    3/4 = 1/4 + P(B) - 1/6, so P(B) = 1/2 + 1/6 = 2/3 A1 [1]

  4. 4

    P(B|A) = P(B) or P(A) P(B) = 1/4 × 2/3 = 1/6 = P(A ∩ B), hence A and B are independent R1 [1]

4. Testing for independence

To test for independence, find P(A), P(B) and P(A ∩ B), then compare P(A ∩ B) with P(A) P(B). If they are equal, the events are independent. If they differ, they are not independent.

With a two-way table, check that P(A|B) = P(A) using counts. One equality is enough, but both sides must be evaluated and shown equal.

A test is a comparison of two numbers, so write both numbers. Writing only "they are independent" earns no reasoning mark.

independent iff P(A ∩ B) = P(A) P(B)

Worked example 14 marks

Do not use a calculator. Events A and B are such that P(A) = 0.6, P(B) = 0.5 and P(A ∪ B) = 0.8.

Show that A and B are independent.

  1. 1

    attempt to find P(A ∩ B) using P(A ∪ B) = P(A) + P(B) - P(A ∩ B) (M1) [1]

  2. 2

    0.8 = 0.6 + 0.5 - P(A ∩ B), so P(A ∩ B) = 0.3 (A1) [1]

  3. 3

    P(A) P(B) = 0.6 × 0.5 = 0.3 (M1) [1]

  4. 4

    P(A ∩ B) = P(A) P(B), hence A and B are independent (R1) [1]

5. Using independence to find an unknown

When a question gives that two events are independent, replace P(A ∩ B) with P(A) P(B). If the probabilities contain an unknown x, this forms an equation in x.

Build each probability from the regions of a Venn diagram. P(A) is the sum of the two regions inside A, and P(B) is the sum of the two regions inside B.

A quadratic can give two roots. Check each against the stated range, and keep both when both fit.

P(A) = P(A ∩ B') + P(A ∩ B)

P(B) = P(A ∩ B) + P(A' ∩ B)

Worked example 19 marks

Consider two events, A and B.

It is given that P(A ∩ B') = (5 + x)/24, P(A ∩ B) = (7 - x)/12 and P(A' ∩ B) = 1/6, where 0 ≤ x ≤ 7.

(a) Show that P(A) = (19 - x)/24.

It is given that A and B are independent.

(b) Find the possible values of x.

  1. 1

    (a) attempt to draw a Venn diagram, or to use P(A) = P(A ∩ B') + P(A ∩ B) (M1) [1]

  2. 2

    P(A) = (5 + x)/24 + (7 - x)/12 (A1) [1]

  3. 3

    = (5 + x)/24 + (2(7 - x))/24 = (19 - x)/24 A1 [1]

  4. 4

    AG

  5. 5

    (b) P(B) = (7 - x)/12 + 1/6 = (9 - x)/12 (A1) [1]

  6. 6

    attempt to use P(A ∩ B) = P(A) P(B) to form an equation in x (M1) [1]

  7. 7

    (7 - x)/12 = (19 - x)/24 × (9 - x)/12 (A1) [1]

  8. 8

    24(7 -x) = (19 - x)(9 - x), so 168 - 24x = x² - 28x + 171, giving x² - 4x + 3 = 0 A1 [1]

  9. 9

    attempt to solve the quadratic equation (M1) [1]

  10. 10

    x = 1, x = 3 A1 [1]

  11. 11

    both values lie in 0 ≤ x ≤ 7, so both are possible

6. Independent is not mutually exclusive

Mutually exclusive events cannot happen together: P(A ∩ B) = 0. Independent events satisfy P(A ∩ B) = P(A) P(B). The two ideas are different.

If P(A) > 0 and P(B) > 0, then P(A) P(B) > 0. Such events cannot be both independent and mutually exclusive. Mutually exclusive events with non-zero probabilities are not independent, because P(A|B) = 0 ≠ P(A).

To decide which one a question describes, read the wording. "Cannot both happen" is mutually exclusive. "One does not affect the other" is independent.

mutually exclusive: P(A ∩ B) = 0

independent: P(A ∩ B) = P(A) P(B)

Worked example 13 marks

Do not use a calculator. Events A and B are mutually exclusive, with P(A) = 0.4 and P(B) = 0.5.

(a) Find P(A ∪ B).

(b) Determine whether A and B are independent.

  1. 1

    (a) P(A ∩ B) = 0, so attempt to use P(A ∪ B) = P(A) + P(B) - P(A ∩ B) (M1) [1]

  2. 2

    P(A ∪ B) = 0.4 + 0.5 = 0.9 (A1) [1]

  3. 3

    (b) P(A) P(B) = 0.4 × 0.5 = 0.2, but P(A ∩ B) = 0, so A and B are not independent (R1) [1]

Recap

  • Conditional probability: P(A|B) = (P(A ∩ B))/(P(B)). Divide by the event after the bar.
  • Rearranged: P(A ∩ B) = P(B) P(A|B).
  • Independent events: P(A|B) = P(A) = P(A|B'), which gives P(A ∩ B) = P(A) P(B).
  • To test for independence, evaluate both sides of P(A ∩ B) = P(A) P(B), show them equal or unequal, and write the conclusion.
  • Given independence, replace P(A ∩ B) with P(A) P(B) and solve. Check every root against the stated range.
  • Mutually exclusive means P(A ∩ B) = 0. It is not the same as independent.
  • A correct answer with no working may earn no marks. Write the formula, substitute, then answer.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State the formula for the conditional probability P(A|B) in terms of P(A ∩ B) and P(B).1 mark
    Answer
    1. P(A|B) = (P(A ∩ B))/(P(B)).

    Trap: Dividing by P(A) gives P(B|A), the reverse conditional.

  2. Do not use a calculator. Events A and B are such that P(A ∩ B) = 1/5 and P(B) = 3/5. Find P(A|B).2 marks
    Answer
    1. P(A|B) = (P(A ∩ B))/(P(B)) = (1/5)/(3/5).
    2. = 1/3.

    Trap: Giving P(A ∩ B) = 1/5 as the answer leaves out the division by P(B).

  3. Do not use a calculator. Events A and B are such that P(A) = 0.4, P(B) = 0.25 and P(B|A) = 0.5. (a) Find P(A ∩ B). (b) Find P(A|B).4 marks
    Answer
    1. (a)
    2. P(A ∩ B) = P(A) P(B|A) = 0.4 × 0.5 = 0.2.
    3. (b)
    4. P(A|B) = 0.2/0.25 = 0.8.

    Trap: Answering P(A|B) = 0.5 confuses it with the given P(B|A). The denominators differ.

  4. Events A and B are such that P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2. Determine which one of the following is true. (A) A and B are mutually exclusive. (B) A and B are independent. (C) P(A|B) = 0.4. (D) P(A ∪ B) = 0.9.2 marks
    Answer
    1. P(A) P(B) = 0.5 × 0.4 = 0.2 = P(A ∩ B), so the answer is (B).
    2. (A) is wrong because P(A ∩ B) = 0.2 ≠ 0. (C) is wrong because P(A|B) = 0.2/0.4 = 0.5; 0.4 = 0.2/0.5 divides by P(A). (D) is wrong because 0.5 + 0.4 - 0.2 = 0.7; 0.9 forgets to subtract the overlap.

    Trap: Each wrong option is a slip: treating overlap as zero, dividing by P(A), and not subtracting P(A ∩ B).

  5. Do not use a calculator. A group of 50 students is classified by gender and by whether they play the violin. Determine whether playing the violin is independent of being a girl. | | Plays the violin | Does not play | | --- | --- | --- | | Girls | 9 | 21 | | Boys | 6 | 14 |4 marks
    Answer
    1. Let V = plays the violin and G = is a girl.
    2. P(V|G) = 9/30 = 0.3.
    3. P(V) = 15/50 = 0.3.
    4. P(V|G) = P(V), so playing the violin and being a girl are independent.

    Trap: Comparing the counts 9 and 6 instead of the probabilities, or using 50 as the denominator for P(V|G), gives the wrong conclusion. The denominator of a conditional probability is the group after the bar.

  6. Do not use a calculator. Events A and B are independent, with P(A) = 0.6 and P(A ∪ B) = 0.76. Find P(B).4 marks
    Answer
    1. Independent, so P(A ∩ B) = 0.6 P(B).
    2. 0.76 = 0.6 + P(B) - 0.6 P(B).
    3. 0.16 = 0.4 P(B).
    4. P(B) = 0.4.

    Trap: Using P(A ∪ B) = P(A) + P(B), which is for mutually exclusive events, gives 0.16.

  7. Machine M makes 60% of the bolts in a factory and 2% of its bolts are defective. Machine N makes the other 40% and 5% of its bolts are defective. A bolt is chosen at random from the factory and is found to be defective. Calculate the probability that it was made by machine M.5 marks
    Answer
    1. P(M ∩ D) = 0.6 × 0.02 = 0.012.
    2. P(N ∩ D) = 0.4 × 0.05 = 0.020.
    3. P(D) = 0.012 + 0.020 = 0.032.
    4. P(M|D) = 0.012/0.032 = 0.375 = 3/8.

    Trap: Giving 0.02 answers P(D|M), the reverse. Dividing by 0.6 instead of P(D) has the same cause.

  8. Do not use a calculator. Events A and B are independent, with P(A) = 3/5 and P(A ∩ B') = 1/5. Show that P(B) = 2/3.3 marks
    Answer
    1. P(A ∩ B) = P(A) - P(A ∩ B') = 3/5 - 1/5 = 2/5.
    2. Independent, so P(A ∩ B) = P(A) P(B): 2/5 = 3/5 P(B).
    3. P(B) = 2/5 × 5/3 = 2/3.

    Trap: Using P(A ∩ B') = P(A) P(B) forgets that B' is the complement, and gives P(B) = 1/3.

  9. Do not use a calculator. A bag holds 6 red and 4 blue counters. Two are taken at random without replacement. (a) Given that at least one is red, calculate the probability that both are red. (b) R₁ is the event that the first is red and R₂ that the second is red. Determine whether R₁ and R₂ are independent.9 marks
    Answer
    1. (a) P(both red) = 6/10 × 5/9 = 1/3.
    2. P(both blue) = 4/10 × 3/9 = 2/15, so P(at least one red) = 1 - 2/15 = 13/15.
    3. P(both red|at least one red) = (1/3)/(13/15) = 5/13.
    4. (b) P(R₁) = 6/10 = 3/5.
    5. P(R₂) = 6/10 × 5/9 + 4/10 × 6/9 = 30/90 + 24/90 = 3/5.
    6. P(R₁) P(R₂) = 9/25, but P(R₁ ∩ R₂) = 1/3, and 1/3 = 25/75 ≠ 27/75 = 9/25.
    7. So R₁ and R₂ are not independent.

    Trap: Answering 1/3 in (a) ignores the condition. In (b), taking P(R₂) = 5/9 uses the conditional P(R₂|R₁) in place of P(R₂).

  10. Do not use a calculator. In a town, 30% of households own a bicycle but not a car, 20% own a car but not a bicycle, and more than 25% own neither. Owning a bicycle (A) and owning a car (B) are independent. (a) Find P(A ∩ B). (b) Hence find P(A|B').8 marks
    Answer
    1. (a) Let P(A ∩ B) = x. Then P(A) = x + 0.3 and P(B) = x + 0.2.
    2. Independent, so x = (x + 0.3)(x + 0.2).
    3. x = x² + 0.5x + 0.06, so x² - 0.5x + 0.06 = 0.
    4. (x - 0.2)(x - 0.3) = 0, so x = 0.2 or x = 0.3.
    5. P(neither) = 1 - 0.3 - 0.2 - x = 0.5 - x > 0.25, so x < 0.25.
    6. x = 0.3 is rejected, so P(A ∩ B) = 0.2.
    7. (b) P(B') = 1 - P(B) = 1 - 0.4 = 0.6.
    8. P(A|B') = (P(A ∩ B'))/(P(B')) = 0.3/0.6 = 0.5. This equals P(A) = 0.5, as independence requires.

    Trap: Keeping both roots of the quadratic without testing them against the condition on households owning neither gives a second, invalid answer.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
A and B are independent, so P(A ∩ B) = 0independent means P(A ∩ B) = P(A) P(B); P(A ∩ B) = 0 is mutually exclusive
P(A|B) = (P(A ∩ B))/(P(A))P(A|B) = (P(A ∩ B))/(P(B)), dividing by the event after the bar
"They are independent" with no workingP(A ∩ B) = P(A) P(B) with both sides evaluated and shown equal, then the conclusion
P(pregnant|positive) = 0.9, the given P(positive|pregnant)P(pregnant|positive) = 0.36/0.48, using the conditional probability formula in context

Frequently asked questions

How do you calculate a conditional probability P(A|B)?
Use P(A|B) = (P(A ∩ B))/(P(B)). The denominator is P(B), the event after the bar, because knowing B shrinks the sample space to B. For example, with P(A) = 0.5, P(B) = 0.3 and P(A ∩ B) = 0.12, P(A|B) = 0.12/0.3 = 0.4. Write the formula, substitute, then give the answer.
Why are P(A|B) and P(B|A) different?
They divide by different probabilities, so the answers differ. Name the events first. In the fox example, with A = "is pregnant" and B = "produces a positive test result", P(B) = 0.48, and the probability that a fox is pregnant given a positive result is P(pregnant|positive) = 0.36/0.48 = 3/4. Find P(B) first, as the total of every path that ends in the given event.
How do you test whether two events are independent?
Find P(A), P(B) and P(A ∩ B), then compare P(A ∩ B) with P(A) P(B). For P(A) = 0.6, P(B) = 0.5 and P(A ∪ B) = 0.8, P(A ∩ B) = 0.3 and P(A) P(B) = 0.3, so the events are independent. If they differ, they are not independent. Both sides must be evaluated and shown equal.
How do I find an unknown probability when two events are independent?
Replace P(A ∩ B) with P(A) P(B) and solve. For example, if P(A) = 0.6 and P(A ∪ B) = 0.76, then 0.76 = 0.6 + P(B) - 0.6 P(B), so 0.16 = 0.4 P(B) and P(B) = 0.4. Check that the answer fits the given values.
Are mutually exclusive events and independent events the same thing?
No. Mutually exclusive events cannot happen together, so P(A ∩ B) = 0. Independent events satisfy P(A ∩ B) = P(A) P(B). If both probabilities are non-zero, mutually exclusive events cannot be independent. For P(A) = 0.4 and P(B) = 0.5 with A and B mutually exclusive, P(A ∪ B) = 0.9 and they are not independent.
Why does writing only "they are independent" lose the mark?
A test is a comparison of two numbers, so write both. Work out P(A ∩ B) and P(A) P(B) separately, state whether they are equal, then give the conclusion. The mark scheme gives a reasoning mark for the stated conclusion, and only if the earlier marks are earned. Writing only the conclusion earns no reasoning mark.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters