Allday Education

Sample Spaces, Tree Diagrams & the Counting Principle

A sample space is the list of every outcome that could happen. Flip a coin and the sample space is heads or tails — 22 outcomes. Flip it twice and the sample space is HHHH, HTHT, THTH, TTTT44 outcomes. Every probability you will ever compute sits on top of a sample space, because probability is favorable outcomes divided by total outcomes, and the sample space is where the total comes from.

When the outcomes come from several choices in a row — a shirt, then pants; a spin, then a roll — listing them all gets slow fast. The counting principle is the shortcut: multiply the number of options for each choice, and the product is the size of the sample space. A tree diagram is the picture that shows why the shortcut works.

Listing a sample space

For a single action, the sample space is just the list of results: rolling a number cube gives {1,2,3,4,5,6}\{1, 2, 3, 4, 5, 6\}. For two actions in a row, each outcome is a pair — one result from the first action and one from the second. Flipping a coin twice gives {HH,HT,TH,TT}\{HH, HT, TH, TT\}.

Order matters in these pairs: HTHT (heads then tails) and THTH (tails then heads) are different outcomes, and counting them as one is the most common way to get a sample space wrong. Work through the list systematically — hold the first result fixed and cycle through every second result, then move on.

Tree diagrams

A tree diagram lists every outcome as a path from left to right. Each choice gets a column of branches: with 22 shirts and 22 pairs of pants, the tree starts with 22 shirt branches, and each shirt branch splits into 22 pants branches. Follow every path from start to finish and you have walked the whole sample space — 44 outfits.

The tree also shows the multiplication happening: 22 branches, each splitting into 22, gives 22=42 \cdot 2 = 4 paths. That is the counting principle drawn out. Trees are worth drawing when the problem asks you to list the outcomes or find a specific one; when it only asks how many, skip the drawing and multiply.

ShirtPantsRedJeansKhakisBlueJeansKhakisRed JeansRed KhakisBlue JeansBlue Khakis

The counting principle

For choices made in a row, multiply the number of options for each choice. A menu with 44 sandwiches, 33 sides, and 22 drinks offers 432=244 \cdot 3 \cdot 2 = 24 different meals. The principle works for any number of stages, which is exactly why it beats listing — nobody wants to write out 2424 meals.

The trap is adding instead of multiplying. Adding 4+3+2=94 + 3 + 2 = 9 counts the items on the menu, not the ways to combine them. Each full meal uses one option from every category, so every sandwich pairs with every side, and every one of those pairs with every drink — that stacking of every-with-every is multiplication.

One refinement: if a choice cannot repeat, the number of options shrinks at each stage. A club of 66 members picking a president and then a vice-president has 66 options for the first job but only 55 for the second, so there are 65=306 \cdot 5 = 30 ways.

Worked examples

Example 1: list a sample space

A coin is flipped twice. List the sample space.

First flip can be heads or tailsH or TH \text{ or } T
Pair each first result with each second resultHH,  HT,  TH,  TTHH,\; HT,\; TH,\; TT
Check with the counting principle22=4 outcomes2 \cdot 2 = 4 \text{ outcomes}

Answer: {HH,HT,TH,TT}\{HH, HT, TH, TT\}44 outcomes

Example 2: two choices

You have 33 shirts and 44 pairs of pants. How many different outfits are possible?

Count the options for each choice3 shirts,  4 pants3 \text{ shirts}, \; 4 \text{ pants}
Multiply the options34=123 \cdot 4 = 12

Answer: 1212 outfits

Example 3: three stages

You spin a spinner with 33 equal sections, roll a number cube, and flip a coin. How many outcomes are in the sample space?

Count the options at each stagespinner 3,  cube 6,  coin 2\text{spinner } 3, \; \text{cube } 6, \; \text{coin } 2
Multiply all three362=363 \cdot 6 \cdot 2 = 36

Answer: 3636 outcomes

Try one yourself

Common questions

How do I know whether to multiply or add?

Multiply when the choices happen together — one option from each category makes one outcome. Add only when the options are alternatives from a single choice, like counting how many total items sit on a menu. If the problem says "and then" or asks for combinations of choices, multiply.

Do I have to draw the tree diagram?

Only when the problem asks you to list the outcomes or find a particular one. If the question is just "how many," the counting principle gives the answer in one line. Trees with more than about 1212 paths are a sign you should be multiplying instead.

Are HT and TH really different outcomes?

Yes. The first letter is the first flip and the second letter is the second flip, so HTHT and THTH describe different sequences of events. Merging them undercounts the sample space and throws off every probability built on it.

What if an option can't be reused?

Shrink the count at each stage. Choosing a president and then a vice-president from 66 people gives 65=306 \cdot 5 = 30, because the person picked first is no longer available. The counting principle still applies — you just use the number of options actually left at each step.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1