Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 37 ยท Compound Events and Conditional Probability

Independent Events

Learn how to test whether events are independent, why independent is not the same as mutually exclusive, and how to compute 'at least one' chances.

Two events are independent when knowing that one happened tells you nothing about the other. Flipping a coin and rolling a die are independent. Drawing two cards without replacement are not: the first draw changes what is left.

Independence is a powerful simplification, because it lets you multiply probabilities directly. But you should test it, not assume it.

The definition

Events A and B are independent if and only if:

Text
P(A and B) = P(A) ร— P(B)

Equivalently, P(A | B) = P(A): learning B does not change the chance of A. This follows from the multiplication rule.

Testing independence

Roll one fair die. Let A = "even" = {2, 4, 6}, B = "at most 4" = {1, 2, 3, 4}.

  • P(A) = 1/2, P(B) = 2/3.
  • A and B together: {2, 4}, so P(A and B) = 2/6 = 1/3.
  • P(A) ร— P(B) = 1/2 ร— 2/3 = 1/3.

The two numbers match, so A and B are independent. Now let E = "at most 3" = {1, 2, 3}. Then P(A and E) = 1/6 (only 2), but P(A) ร— P(E) = 1/4. These differ, so A and E are not independent.

Python A tester for independence

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Independent is not the same as mutually exclusive

Two events are mutually exclusive if they cannot both happen: P(A and B) = 0. This is nearly the opposite of independence. If A and B are mutually exclusive and both have positive probability, then knowing A happened tells you B did not, so they are dependent.

Idea Rule Meaning
Mutually exclusive P(A and B) = 0 Cannot both occur
Independent P(A and B) = P(A)P(B) One does not affect the other

For mutually exclusive events you can add: P(A or B) = P(A) + P(B). In general, P(A or B) = P(A) + P(B) - P(A and B).

"At least one" with independence

If an experiment repeats independently, the chance of no success in n tries is (1 - p)^n, so:

Text
P(at least one success) = 1 - (1 - p)^n

How likely is at least one six in 4 rolls of a die?

Text
1 - (5/6)^4 = 1 - 625/1296 = 671/1296 โ‰ˆ 0.518
Python At least one success: formula vs simulation

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The gambler's fallacy

After five heads in a row, is tails "due"? No. A fair coin has no memory, so the next flip is still 50/50. The probability of six heads in a row is (1/2)^6 = 1/64, but that is before you flip any of them. Given that the first five were heads, the chance that the sixth is heads is still 1/2.

Do not assume independence without a reason. Weather on consecutive days, grades of the same student on two tests, or two answers from one survey respondent are often linked.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A and B are independent with P(A) = 0.4 and P(B) = 0.5. What is P(A and B)?

    For independent events, multiply: 0.4 ร— 0.5 = 0.2.
  2. 2. A and B are mutually exclusive and both have positive probability. Are they independent?

    P(A and B) = 0, but P(A)P(B) is positive, so the multiplication test fails.
  3. 3. A fair coin has landed heads five times in a row. What is P(heads on the sixth flip)?

    Flips are independent, so past results do not change the next flip.
  4. 4. Which expression gives P(at least one success) in n independent trials with success probability p?

    The complement of 'at least one' is 'none', which has probability (1 - p)^n.

Summary

  • A and B are independent when P(A and B) = P(A) ร— P(B).
  • Test independence with numbers; do not rely on intuition.
  • Mutually exclusive events with positive probabilities are never independent.
  • P(at least one) = 1 - P(none).
  • Independent trials have no memory.

Next: Bayes' Theorem