Sample Spaces and the Counting Principle
Build tree diagrams and two-dice tables, see why dice sums are not equally likely, and count huge sample spaces with the multiplication principle.
Welcome back!
Step 1 of 12Learn
Listing every outcome
You have 3 shirts (red, blue, white) and 2 pairs of pants (jeans, khakis). How many outfits can you make?
A tree diagram answers by branching. Start with 3 branches for the shirt. From each shirt, draw 2 branches for the pants. Count the ends of the branches: 3 × 2 = 6 outfits.
Trees work for any multi-step experiment. Flip a coin and roll a die: 2 branches for the coin, each splitting into 6 for the die, giving 12 outcomes: H1, H2, …, H6, T1, …, T6. Each is equally likely, so P(heads and a 5) = 1/12.
The pattern behind the tree is the multiplication principle: if one choice can be made in m ways and a second, independent choice in n ways, the pair can be made in m × n ways. It extends to any number of stages: multiply the number of options at each stage.
Trees are great for seeing small sample spaces. For bigger ones, multiplying is faster than drawing.
Step 2 of 12Diagram
Tree diagram: 3 shirts × 2 pants = 6 outfits
- Pick an outfit
- Red shirt
- Blue shirt
- White shirt
- Jeans
- Khakis
- Jeans
- Khakis
- Jeans
- Khakis
Step 3 of 12Practice · Work it out
A restaurant combo meal includes 1 of 4 appetizers, 1 of 6 main dishes and 1 of 3 desserts. How many different combo meals are possible?
Step 4 of 12Learn
The two-dice table
Roll two dice, one red and one blue. Each die has 6 faces, so there are 6 × 6 = 36 equally likely outcomes. A table shows them all, with the red die down the side and the blue die across the top.
Now add the two numbers. The sums range from 2 to 12, but they are not equally likely:
| Sum | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Ways | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 4 | 3 | 2 | 1 |
A sum of 7 has 6 ways, so P(7) = 6/36 = 1/6. A sum of 2 needs both dice to show 1, so P(2) = 1/36.
Why treat red 3, blue 4 and red 4, blue 3 as different outcomes? Because they are. Even if both dice are the same color, the physical dice are different objects. Listing "3 and 4" only once is a classic error that makes every sum look more equally likely than it is. Board games use this: in many dice games, the most valuable spaces are the ones reached by a roll of 6, 7 or 8.
Step 5 of 12Practice · Work it out
Rolling two dice, how many of the 36 equally likely outcomes give a sum of 8?
Step 6 of 12Practice · Chart
Ways to roll each sum with two dice
Tap the sum you are most likely to roll.
Tap the bar that answers the question, then press Check.
Step 7 of 12Learn
Big sample spaces: multiply
Many real sample spaces are far too big to list, but the multiplication principle counts them instantly.
- A license plate with 3 letters then 4 digits has 26 × 26 × 26 × 10 × 10 × 10 × 10 = 26³ × 10⁴ = 175,760,000 possibilities.
- A 4-digit PIN has 10 × 10 × 10 × 10 = 10,000 possibilities. A thief guessing randomly has a 1 in 10,000 chance on each try.
- If digits cannot repeat, the choices shrink at each stage: 10 × 9 × 8 × 7 = 5,040.
The question to ask at each stage is: "How many options are left right now?" With repetition allowed, the count stays the same. Without repetition, it drops by one each time.
This is the reason long passwords are safer than complicated short ones. Each extra character multiplies the number of possibilities by the size of the character pool. Try the calculator to see how quickly the numbers grow.
Step 8 of 12Try the calculator
Password strength calculator
A pool of 26 means lowercase letters only; 62 adds uppercase letters and digits; about 94 includes symbols. The time assumes an attacker guessing at the given rate and trying every possibility.
- Possible passwords
- 208,827,064,576
- Years to try them all
- 0 years
Step 9 of 12Practice · Work it out
You flip 4 coins. How many outcomes are in the sample space (counting HHTH and HTHH as different)?
Step 10 of 12Note
Step 11 of 12Practice · Choose one
How many 4-digit PINs are possible if no digit can be used more than once?
Step 12 of 12Practice · True or false
When you roll two dice and add them, each sum from 2 to 12 is equally likely.
Lesson complete!