Find a course

Module 1: Foundations of ProbabilityLesson 1 of 1213 min

Sample Spaces, Events and the Axioms

Define sample spaces and events, apply the three axioms of probability, and use the complement rule and inclusion-exclusion to avoid double counting.

Step 1 of 13Learn

A gambler's puzzle

In 1654 a French gambler known as the Chevalier de Méré had a problem. He had made money betting that he would roll at least one six in four rolls of a die. So he tried a similar bet: at least one double six in 24 rolls of two dice. His reasoning was that a double six is 6 times rarer, so 6 times more rolls should give the same odds. He started losing.

He took the puzzle to Blaise Pascal, who worked it out in letters with Pierre de Fermat. Their correspondence is often called the birth of probability theory. The trick is to compute the chance of never succeeding:

  • One die, four rolls: P(no six) = (5/6)4 ≈ 0.482, so P(at least one six) ≈ 0.518. A winning bet.
  • Two dice, 24 rolls: P(no double six) = (35/36)24 ≈ 0.509, so P(at least one) ≈ 0.491. A losing bet, by a small but steady margin.

De Méré's proportional reasoning was close but wrong, and over many bets a 2.7-point edge decides who goes home with the money. To reason correctly about chance, you need a precise language. That language starts with three ideas: the sample space, events and the axioms that every probability must obey.

Step 2 of 13Learn

Sample spaces and events

An experiment is any process with an uncertain outcome. Its sample space S is the set of all possible outcomes.

  • Flip a coin: S = {H, T}.
  • Roll a die: S = {1, 2, 3, 4, 5, 6}.
  • Flip a coin three times: S has 2 × 2 × 2 = 8 outcomes, from HHH to TTT.
  • Measure a waiting time: S = all non-negative real numbers.

An event is any set of outcomes, a subset of S. "Roll an even number" is the event {2, 4, 6}. An event occurs if the outcome lands in it.

Events combine like sets:

  • A ∪ B (A or B): outcomes in A, in B, or in both.
  • A ∩ B (A and B): outcomes in both.
  • A′ (not A, the complement): outcomes in S but not in A.

Two events are mutually exclusive (disjoint) if they share no outcomes: A ∩ B is empty. Rolling a 1 and rolling an even number are mutually exclusive.

When every outcome is equally likely, probability is just counting:

P(A) = (number of outcomes in A) / (number of outcomes in S)

For two dice, S has 36 equally likely ordered pairs. A sum of 7 happens in six of them, (1,6), (2,5), … (6,1), so P(sum = 7) = 6/36 = 1/6. A classic mistake is to list sums 2 through 12 as eleven equally likely outcomes; they are not.

Step 3 of 13Practice · Work it out

Two fair dice are rolled. What is the probability that the sum is 9? Give your answer as a decimal to three places.

Step 4 of 13Practice · Chart

How the 36 outcomes of two dice spread over the sums

Each bar counts the ordered pairs (first die, second die) that give that sum. Dividing a bar by 36 gives its probability.

Tap the sum that is most likely to come up.

Tap the bar that answers the question, then press Check.

How the 36 outcomes of two dice spread over the sumsBar chart with 11 categories: 2: 1; 3: 2; 4: 3; 5: 4; 6: 5; 7: 6; 8: 5; 9: 4; 10: 3; 11: 2; 12: 1.0246Number of outcomes23456789101112Sum of the two dice12345654321
How the 36 outcomes of two dice spread over the sums
Sum of the two diceOrdered pairs
21
32
43
54
65
76
85
94
103
112
121

Step 5 of 13Learn

The three axioms

In 1933 Andrey Kolmogorov put probability on a firm footing with three axioms. Everything else in this course follows from them.

  1. Non-negativity: P(A) ≥ 0 for every event A.
  2. Normalization: P(S) = 1. Something in the sample space must happen.
  3. Additivity: if A and B are mutually exclusive, P(A ∪ B) = P(A) + P(B). (The same holds for any countable list of disjoint events.)

From these, useful rules follow quickly.

Complement rule. A and A′ are disjoint and together make up S, so P(A) + P(A′) = 1, giving P(A′) = 1 − P(A). This is the de Méré trick: "at least one" is usually easiest as 1 minus "none."

Inclusion-exclusion. For events that can overlap, adding P(A) and P(B) counts the overlap twice, so

P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

Example. In a class, 60% of students take French, 30% take Spanish and 10% take both. The share taking at least one language is 0.60 + 0.30 − 0.10 = 0.80, and the share taking neither is 1 − 0.80 = 0.20.

Probabilities can come from equally likely counting, from long-run frequencies or from a degree of belief, but all of them must obey these same three rules.

Venn diagram of two overlapping events A and B inside the sample space S; the overlap is A and B, counted twice if you add P(A) and P(B)SA onlyA ∩ BB only

Step 6 of 13Practice · Work it out

In a group of shoppers, 45% bought coffee, 35% bought pastries and 20% bought both. What percentage bought neither?

Step 7 of 13Practice · Diagram

The shoppers, split by the overlap

Put the 20% who bought both in the middle first, then fill in the rest. The 40% outside both circles bought neither.

Which region does the addition rule subtract so it is not counted twice?

Tap the shape that answers the question, then press Check.

The shoppers, split by the overlapVenn diagram: Coffee 45%, Pastry 35%, Coffee 45% only, Pastry 35% only, Coffee 45% + Pastry 35% (overlap).Coffee 45%Pastry 35%• Coffee only 25%• Pastry only 15%• Both 20%
Coffee 45%

45% in total: 25% coffee only plus the 20% who also bought a pastry.

Pastry 35%

35% in total: 15% pastry only plus the 20% overlap.

Coffee 45% only
  • Coffee only 25%
Pastry 35% only
  • Pastry only 15%
Coffee 45% + Pastry 35% (overlap)

Counted once in each circle, which is why the addition rule subtracts it once.

  • Both 20%

Step 8 of 13Note

Step 9 of 13Learn

"At least one" problems

The complement rule turns many hard problems into easy ones. Whenever a question says at least one, consider computing the probability of none and subtracting from 1.

Example: a password-cracking guess. A system locks after 5 wrong guesses. An attacker who guesses a 4-digit PIN at random, without repeats, has 5 chances in 10,000. But suppose each guess independently has probability 1/10,000 of being right (guesses with replacement). Then

P(at least one success in 5) = 1 − (9999/10000)5 ≈ 0.0005.

Example: quality control. Each chip in a batch is defective with probability 0.02, independently. In a sample of 50 chips,

P(at least one defect) = 1 − 0.9850 ≈ 1 − 0.364 = 0.636.

Even a 2% defect rate is very likely to show up in a sample of 50.

The opposite mistake is common too: adding probabilities that overlap. Fifty chips at 2% each do not give a 100% chance of a defect. Adding works only for mutually exclusive events, and "chip 1 is defective" and "chip 2 is defective" can happen together. The complement handles the overlap automatically.

Step 10 of 13Diagram

The "at least one" recipe

The "at least one" recipeProcess diagram: Spot "at least one" → Describe "none" → Multiply the failures → Subtract from 1.Spot "atleast one"Describe"none"Multiply thefailuresSubtractfrom 1

Tap a shape with to see more.

Spot "at least one"

Also "one or more", "any", "not all fail". These are unions of many overlapping cases.

Describe "none"

The complement is a single case: every trial fails.

Multiply the failures

With independent trials, P(none) = P(fail)n.

Subtract from 1

P(at least one) = 1 − P(none).

Step 11 of 13Practice · Work it out

A basketball player makes each free throw with probability 0.8, independently. What is the probability she misses at least one of her next 5 free throws? Give your answer to three decimal places.

Step 12 of 13Practice · True or false

If P(A) = 0.5 and P(B) = 0.6, then A and B cannot be mutually exclusive.

Step 13 of 13Practice · Select all that apply

Which of the following follow directly from the axioms of probability?

Select all that apply.