# Conditional probability and independence

> IB Mathematics: Applications and Interpretation SL · Unit 4: Statistics and Probability
> Source: https://www.owlsprep.com/study/ib-math-ai-sl-u4-conditional-probability-and-independence/

This sub-topic explains how to calculate probability when one event is already known to have occurred, and how to test whether two events affect each other's outcomes, a common exam topic for IB AI SL.

**Prerequisites:** [Basic probability concepts](https://www.owlsprep.com/study/ib-math-ai-sl-u4-basic-probability/); [Venn and tree diagrams for probability](https://www.owlsprep.com/study/ib-math-ai-sl-u4-representation-of-events/)

## Learning objectives

- Calculate conditional probability using the formal definition and diagrammatic methods
- Distinguish between independent and dependent events using formal tests
- Apply conditional probability to solve real-world and exam-style problems
- Use Venn and tree diagrams to simplify conditional probability calculations

## Formal Definition of Conditional Probability

**Conditional Probability** — For any two events $A$ and $B$ where $P(B) > 0$, the conditional probability of $A$ given $B$ is defined as:

*Notation:* P(A|B)

*Example:* Restricts the sample space to only outcomes where $B$ has occurred

$$P(A|B) = \frac{P(A \cap B)}{P(B)}$$

**Worked example:** Given $P(A) = 0.6$, $P(B) = 0.5$, and $P(A \cap B) = 0.3$, calculate $P(A|B)$.

1. 1. Recall the conditional probability formula:
2. $$P(A|B) = \frac{P(A \cap B)}{P(B)}$$
3. 2. Substitute the given values and simplify:
4. $$P(A|B) = \frac{0.3}{0.5} = 0.6$$

> **tip**
>
> Always confirm $P(B) \neq 0$ before using this formula. If $P(B) = 0$, conditional probability is undefined.

## Independent Events

**Independent Events** — Two events $A$ and $B$ are independent if the occurrence of one does not change the probability of the other. This gives the core test condition for independence:

*Example:* Independence does not mean no overlap, unlike mutually exclusive events

$$P(A \cap B) = P(A) \times P(B)$$

**Worked example:** Given $P(A) = 0.4$, $P(B) = 0.5$, and $P(A \cup B) = 0.7$, test whether $A$ and $B$ are independent.

1. 1. First calculate $P(A \cap B)$ using the addition rule for probability:
2. $$P(A \cap B) = P(A) + P(B) - P(A \cup B) = 0.4 + 0.5 - 0.7 = 0.2$$
3. 2. Calculate the product of the individual probabilities:
4. $$P(A) \times P(B) = 0.4 \times 0.5 = 0.2$$
5. 3. Compare the two values: since $P(A \cap B) = P(A) \times P(B)$, $A$ and $B$ are independent.

**Check your understanding**

Test your understanding:

1. Which of the following is the correct test for independence of events $A$ and $B$?

   - A: $P(A \cap B) = P(A) + P(B)$
   - B: $P(A \cap B) = P(A)P(B)$
   - C: $P(A|B) = P(B)$
   - D: $P(A \cup B) = P(A)P(B)$

   *Why:* The definition of independence gives this core condition, which is the most common test used in IB exams.

## Conditional Probability with Diagrams

Most exam problems for IB AI SL give probability information in Venn or tree diagrams. You can use these diagrams to calculate conditional probability directly without relying only on the formula.

**Worked example:** A bag contains 5 red and 3 blue marbles. Two marbles are drawn without replacement. Find the probability that the second marble is red, given the first marble drawn was red.

1. 1. We know the first marble is red, so we restrict our sample space to this case. After drawing one red, 4 red and 3 blue marbles remain, for a total of 7 marbles.
2. 2. The conditional probability is the number of remaining red marbles divided by total remaining marbles:
3. $$P(R_2|R_1) = \frac{4}{7} \approx 0.571$$
4. 3. Verify with the formal formula to confirm:
5. $$P(R_2|R_1) = \frac{P(R_1 \cap R_2)}{P(R_1)} = \frac{(\frac{5}{8} \times \frac{4}{7})}{\frac{5}{8}} = \frac{4}{7}$$

> **tip**
>
> For Venn diagrams with counts, conditional probability $P(A|B)$ is just (number of outcomes in $A \cap B$) divided by (number of outcomes in $B$), same as probability.

*Calculator:* allowed

## Common pitfalls

- **Wrong:** Swapping the numerator and denominator in the conditional formula, using $P(A|B) = \frac{P(A \cap B)}{P(A)}$
  - Why it fails: Confusion about which event is the "given" event, leading to dividing by the wrong probability
  - Correct: The denominator is always the probability of the event after the $|$ symbol. For $P(A|B)$, divide by $P(B)$.
- **Wrong:** Confusing mutually exclusive events with independent events
  - Why it fails: Assuming that no overlap means independence, which is incorrect
  - Correct: Use the $P(A \cap B) = P(A)P(B)$ test for independence, regardless of whether events are mutually exclusive.
- **Wrong:** Treating draws without replacement as independent events
  - Why it fails: Assuming all random draws are automatically independent
  - Correct: For sampling without replacement, adjust probabilities for subsequent draws, as events are always dependent.
- **Wrong:** Relying on context intuition to declare independence
  - Why it fails: Assuming that related events must be dependent, or unrelated events must be independent
  - Correct: Always apply the $P(A \cap B) = P(A)P(B)$ test to confirm independence, do not rely on context alone.

## Cheatsheet

| Concept | Formula/Condition | Key Note |
| --- | --- | --- |
| Conditional Probability | $P(A\|B) = \frac{P(A \cap B)}{P(B)}, \; P(B) > 0$ | Denominator = probability of the given event |
| Independence Test | $P(A \cap B) = P(A) \times P(B)$ | Also equivalent to $P(A\|B) = P(A)$ |
| Tree Diagram Conditional | Use the probability of the branch after the given event | No formula needed for simple cases |
| Venn Diagram Conditional | $\frac{\|A \cap B\|}{\|B\|}$ | Works for counts and probabilities |

## What's next

Conditional probability and independence are core foundational concepts for all further probability and statistics study, and are heavily tested across both Paper 1 and Paper 2 of IB AI SL. You will encounter these concepts again when working with probability distributions, hypothesis testing, and statistical inference. Mastering the formal test for independence and correct application of the conditional probability formula will help you avoid common exam errors and earn full marks on calculation questions. Next, you can extend your knowledge with more complex probability problems and related topics.

- [Discrete Probability Distributions](https://www.owlsprep.com/study/ib-math-ai-sl-u4-discrete-probability-distributions/)
- [Binomial distribution](https://www.owlsprep.com/study/ib-math-ai-sl-u4-binomial-distribution/)
- [Normal distribution and applications](https://www.owlsprep.com/study/ib-math-ai-sl-u4-normal-distribution-and-applications/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-ai-sl-u4-conditional-probability-and-independence/
