Listing a sample space: lists and tables
Two number cubes are rolled. How can you write down every way they can land, and be sure you missed none and wrote none twice?
Where you are 14 in Basic probability
When you reach for it
The sample space of an experiment is the list of all its possible outcomes. For one toss of a coin it is short enough to write without thinking: heads (H) or tails (T). For one roll of a number cube it is 1, 2, 3, 4, 5, 6.
Many experiments happen in two stages: toss a coin and then spin a spinner, roll two number cubes, choose a main course and then a drink. Now each outcome has two parts, and the outcomes pile up quickly: two number cubes can land in 36 ways. Written down as they come to mind, a list that long easily has a gap or a repeat, and nothing on the page shows where.
So write the sample space in an order that shows its own completeness: every outcome once, and a count that can be checked. That list comes before any probability found by counting the outcomes in an event; here the job stops at the list and its count.
The procedure
What one outcome of two stages looks like
An outcome of a two-stage experiment records what happened at both stages. Tossing a coin and then spinning the spinner below can give heads and 2, written H2. “Heads” on its own is not an outcome of this experiment, because it does not say what the spinner did.
For two number cubes, write an outcome as an ordered pair: the first cube’s number, then the second cube’s. The order matters. (2, 5) means the first cube shows 2 and the second shows 5, and (5, 2) is the other way round. They are different outcomes even when the cubes look alike, just as red 2 beside blue 5 is a different sight from red 5 beside blue 2. Decide which stage is written first, and keep to it for the whole list.
The organized list: fix the first choice, run through the second
Take the results of the first stage in some fixed order. Fix the first of them, and write it with every result of the second stage in turn. Then move to the next result of the first stage and do the same, and so on to the end. For the coin and the spinner, heads is fixed first, giving H1, H2, H3, and then tails, giving T1, T2, T3.
Here is why that order misses nothing and repeats nothing. Every outcome has some first part, so it belongs to exactly one block of the list, the block for that first part. Inside the block the second parts were run through in order, each once, so the outcome appears there exactly once. Two blocks never share an outcome, because their first parts differ. So the whole list holds every outcome exactly once. The order is what makes this argument possible: a list written in no order might happen to be complete, but nothing in it would show you.
The same idea runs to three or more stages. Fix the first result, then inside that fix the second, and run through the third (Example 5).
The table: rows for one stage, columns for the other
For two stages a table does the same work in two directions. Write the results of the first stage down the side, one per row, and the results of the second stage across the top, one per column. The cell where a row meets a column holds the outcome made of those two results:
| 1 | 2 | 3 | |
|---|---|---|---|
| H | H1 | H2 | H3 |
| T | T1 | T2 | T3 |
Every row meets every column in exactly one cell, so each combination of a first result with a second result gets exactly one cell. Read row by row, the table is the organized list again, one block per row. What the table adds is that groups of outcomes are easy to see in it: a whole row, a whole column, or a diagonal (Example 3).
Counting and checking the count
When every result of the first stage can go with every result of the second, each block of the list has the same length, so
and a table has exactly that many cells, rows times columns. The coin and the spinner give 2 \times 3 = 6. Use this as a check: count your list, work out the product, and if the two differ the list has a gap or a repeat. The product says that something is wrong, and the order of the list says where.
This product is the start of the counting principle, which counts without listing. Listing still earns its place: you need the list itself to see which outcomes make up an event, and some experiments do not let every first result go with every second (Example 2). A third layout, the tree diagram, draws each stage as a fan of branches; it comes later.
When order does not matter
Sometimes the two parts of an outcome are two picks of the same kind, and swapping them gives the same result: choosing Tobiah and Undine for an errand is the same as choosing Undine and Tobiah. Then put the people in a fixed order, fix the first, and pair it only with those that come after it. Each pair is written one way only, earlier member first, so it appears once (Example 6).
Worked examples
A coin and a spinner
A coin is tossed and then the three-part spinner in the figure is spun. Write the sample space as an organized list and as a table, and check the count.
SolutionWrite the coin first, since it is the first stage. Fix heads and run through the spinner, then fix tails and do the same:
H1, H2, H3, T1, T2, T3
That is 6 outcomes. The table, with a row for each face of the coin and a column for each part of the spinner, is the one drawn in the procedure above; its six cells are the same six outcomes.
Check. Every face of the coin can go with every number, so there should be 2 \times 3 = 6 outcomes, and the list has 6. Writing the spinner first, as 1H, 1T and so on, is just as correct if the whole list does it.
Choosing lunch
At Wynne’s café, lunch is one main and one drink. The mains are pasta (P), curry (C) and salad (S); the drinks are water (w), milk (m), juice (j) and lemonade (l).
(a) Write the sample space as a table, and count the lunches.
(b) The café stops serving milk with curry. How many lunches are there now?
Solution(a) Put the mains down the side and the drinks across the top. Pw means pasta with water.
| w | m | j | l | |
|---|---|---|---|---|
| P | Pw | Pm | Pj | Pl |
| C | Cw | Cm | Cj | Cl |
| S | Sw | Sm | Sj | Sl |
Every main can go with every drink, so the count is rows times columns, 3 \times 4 = 12 lunches.
(b) Cross out the cell Cm. The curry row now has 3 cells and the others 4, so the rows are not all the same length and the product no longer applies. Count row by row: 4 + 3 + 4 = 11 lunches.
Two number cubes
A red number cube and a blue number cube are rolled.
(a) Write the sample space as a table, and count the outcomes.
(b) List the outcomes in which both cubes show the same number.
(c) List the outcomes in which the two numbers add to 9.
Solution(a) Rows are the red cube and columns the blue cube. Each cell is an ordered pair (red, blue), written without brackets to fit: the cell 2,5 is the outcome (2, 5).
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| 1 | 1,1 | 1,2 | 1,3 | 1,4 | 1,5 | 1,6 |
| 2 | 2,1 | 2,2 | 2,3 | 2,4 | 2,5 | 2,6 |
| 3 | 3,1 | 3,2 | 3,3 | 3,4 | 3,5 | 3,6 |
| 4 | 4,1 | 4,2 | 4,3 | 4,4 | 4,5 | 4,6 |
| 5 | 5,1 | 5,2 | 5,3 | 5,4 | 5,5 | 5,6 |
| 6 | 6,1 | 6,2 | 6,3 | 6,4 | 6,5 | 6,6 |
Each cube has 6 faces and any face of one can go with any face of the other, so there are 6 \times 6 = 36 outcomes, one per cell.
(b) The two numbers match exactly where the row number equals the column number, which is the diagonal from top left to bottom right: (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6). That is 6 outcomes, one in each row.
(c) Go row by row and ask which blue number makes the total 9. In rows 1 and 2 none does, because the blue cube would have to show 8 or 7. Rows 3 to 6 each have exactly one: (3, 6), (4, 5), (5, 4), (6, 3). That is 4 outcomes, on a slanting line in the table. Both (4, 5) and (5, 4) are there, since red 4 with blue 5 differs from red 5 with blue 4. Each of (b) and (c) picks out an event, and the table makes its outcomes quick to find.
A two-digit code
Yolande’s bike lock opens with a two-digit code, and each digit must be 2, 5 or 7.
(a) List every possible code if a digit may be used twice.
(b) List every possible code if the two digits must be different.
Solution(a) The first digit is the first stage. Fix it at 2 and run through the second digit, then do the same for 5 and for 7:
22, 25, 27, 52, 55, 57, 72, 75, 77
That is 9 codes, and the check is 3 \times 3 = 9. Here order matters: 25 and 52 open different locks, so both belong in the list.
(b) Take out every code whose two digits are equal, 22, 55 and 77. Six remain:
25, 27, 52, 57, 72, 75
In a table these three are the diagonal, so 9 - 3 = 6. Now which second digits are allowed depends on the first, but how many does not: every block has 2 codes. So the product still works, as 3 \times 2 = 6.
Three stages: an outfit
Xenophon chooses a shirt (white W, blue B or green G), trousers (jeans J or khaki K) and shoes (tennis shoes t or sandals s). List every outfit and count them.
SolutionWith three stages, fix the shirt, then inside that fix the trousers, and run through the shoes:
WJt, WJs, WKt, WKs, BJt, BJs, BKt, BKs, GJt, GJs, GKt, GKs
That is 12 outfits: each shirt heads a block of 4, and inside it each pair of trousers heads a block of 2, so 3 \times 2 \times 2 = 12.
A table has only two directions, so join two stages first: the 6 shirt-and-trouser pairs as rows and the shoes as columns give 6 \times 2 = 12 cells, the same count.
Two of four friends
Tobiah, Undine, Valerius and Yolande are four friends. Two of them are chosen to carry a banner together. List every possible pair.
SolutionUse their initials, in the order T, U, V, Y. Fix T and pair it with each friend after it: TU, TV, TY. Fix U and pair it only with the friends after it: UV, UY. Pairing U with T would give the pair already written as TU. Fix V: VY. Nobody comes after Y, so Y starts no pairs. The list is
TU, TV, TY, UV, UY, VY
which is 3 + 2 + 1 = 6 pairs.
A table with the friends both down the side and across the top shows why this is right:
| T | U | V | Y | |
|---|---|---|---|---|
| T | TU | TV | TY | |
| U | UT | UV | UY | |
| V | VT | VU | VY | |
| Y | YT | YU | YV |
The 16 cells lose the 4 on the diagonal, since nobody can be chosen twice, leaving 12. Those 12 come in mirror pairs: TU above the diagonal and UT below it are the same two people. Keeping the cells above the diagonal keeps each pair once, and 12 \div 2 = 6, matching the list. If one friend led and the other followed, order would matter and all 12 cells would count; counting ordered choices like that is the work of the counting principle.
Boundaries
A sample space says what can happen, not how likely it is. A number cube weighted so that 6 comes up more often still has the sample space 1, 2, 3, 4, 5, 6. Whether the outcomes are equally likely is a separate question, the subject of Probability models: equally likely or not.
The product needs equal blocks. Rows times columns gives the count only when every row has the same number of outcomes. In the café with no milk served with curry the rows differ, and the count is a sum of rows instead (Example 2). The code with different digits shows the other side: the allowed second digits change with the first, but there are always two, so the product still works.
Whether order matters is settled by the situation, never by the list. Codes and two number cubes are ordered, so 25 and 52, or (2, 5) and (5, 2), are two outcomes. Two people sharing one job are not, so TU and UT are one. Decide before listing, and keep to one kind.
Listing works only while the list is short. Three cubes give 6 \times 6 \times 6 = 216 outcomes and a four-digit code with every digit allowed gives 10{,}000. Long before that you count without listing, which is what the counting principle is for.
Where this goes next
The list and its count are the raw material for the probability of an event, which compares the outcomes in an event with the whole list, so both counts have to be right. The outcomes left out of an event form its complement: in a table, the other cells.
Experiments in stages are Compound events. The product that checked every count grows into the counting principle and the rest of counting, and grouping the two-cube table by total leads to a distribution.
Exercises
Organized lists
- A coin is tossed and a number cube is rolled. Write the sample space as an organized list and check the count.
- The spinner with parts 1, 2 and 3 is spun twice. List every outcome as an ordered pair (first spin, second spin).
- Three coins are tossed one after another. List every outcome, such as HTH.
- A lunch is one main, a veggie burger (B) or fish pie (F), and one drink, water (w), milk (m) or juice (j). List every lunch.
Tables
- The spinner with parts 1, 2 and 3 is spun and a number cube is rolled. How many cells does the table have? List the outcomes in which both show the same number.
- Two number cubes are rolled. Use the table in Example 3 to list the outcomes in which the numbers add to 8.
- Two number cubes are rolled. List the outcomes in which at least one cube shows 6, and count them.
- Two number cubes are rolled. List the outcomes in which the larger number is 2 more than the smaller.
- Two number cubes are rolled. In how many outcomes does the first cube show a larger number than the second?
Counting and checking
- Undine has 4 shirts and 3 pairs of trousers. She lists the outfits and gets 11. Is her list complete?
- Valerius sets a two-digit code using only the digits 2, 5, 8 and 9. How many codes are there if a digit may repeat? How many if the two digits must differ?
- A meal is one of 3 mains, one of 2 sides and one of 4 drinks. How many meals are there?
- A coin is tossed and a spinner with 5 equal parts is spun. How many outcomes are there?
- A spinner with parts 1, 2, 3 and 4 is spun and a number cube is rolled. How many outcomes are there, and in how many does the spinner show a larger number than the cube?
When order does not matter
- Two of the five friends Tobiah, Undine, Valerius, Wynne and Xenophon are chosen to plan a party. List every possible pair.
- From Tobiah, Undine and Valerius, a club chooses a president and a different secretary. List every outcome. Then list every pair if instead two of them simply join a committee.
- A bag holds four tiles numbered 1, 2, 3 and 4, and two are taken out together. List every pair with its total. How many pairs have total 5?
- Six people meet and each shakes hands once with each of the others. How many handshakes are there?
Reasoning
- Explain why an organized list made by fixing the first choice and running through the second cannot contain the same outcome twice.
- Explain why the table for two number cubes has 36 cells, and why the number of outcomes in which the two cubes show different numbers is even.
- For a coin and a number cube, Xenophon writes the sample space as H, T, 1, 2, 3, 4, 5, 6. Explain what is wrong.
- Explain why the number of ways to choose two of four friends is half of 12.
Answers
- 12 outcomes: H1, H2, H3, H4, H5, H6, T1, T2, T3, T4, T5, T6. Check: 2 \times 6 = 12.
- 9 outcomes: (1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3). Check: 3 \times 3 = 9.
- 8 outcomes: HHH, HHT, HTH, HTT, THH, THT, TTH, TTT. Check: 2 \times 2 \times 2 = 8.
- 6 lunches: Bw, Bm, Bj, Fw, Fm, Fj. Check: 2 \times 3 = 6.
- 3 \times 6 = 18 cells. Same number: (1,1), (2,2), (3,3). A cube showing 4, 5 or 6 cannot match the spinner.
- 5 outcomes: (2,6), (3,5), (4,4), (5,3), (6,2). Row 1 has none, since it would need a 7.
- 11 outcomes: (1,6), (2,6), (3,6), (4,6), (5,6), (6,6), (6,1), (6,2), (6,3), (6,4), (6,5). The last row and the last column have 6 cells each and share (6,6), so 6 + 6 - 1 = 11.
- 8 outcomes: (1,3), (3,1), (2,4), (4,2), (3,5), (5,3), (4,6), (6,4).
- 15, the cells below the diagonal: row 1 has none, row 2 has one, up to row 6 with five, so 0 + 1 + 2 + 3 + 4 + 5 = 15.
- No. There are 4 \times 3 = 12 outfits, so at least one is missing.
- 16 if a digit may repeat, since 4 \times 4 = 16; 12 if the digits differ, since 4 \times 3 = 12.
- 24 meals: the 3 \times 2 = 6 main-and-side pairs as rows, the drinks as columns, and 6 \times 4 = 24.
- 10 outcomes: 2 \times 5 = 10.
- 4 \times 6 = 24 outcomes. Spinner larger: spinner 2 with cube 1; spinner 3 with cube 1 or 2; spinner 4 with cube 1, 2 or 3. That is 0 + 1 + 2 + 3 = 6 outcomes.
- 10 pairs: TU, TV, TW, TX, UV, UW, UX, VW, VX, WX, which is 4 + 3 + 2 + 1 = 10.
- President first: TU, TV, UT, UV, VT, VU, which is 3 \times 2 = 6 outcomes. As a committee the order goes, leaving 3 pairs: TU, TV, UV.
- 6 pairs: 1 and 2 (total 3), 1 and 3 (total 4), 1 and 4 (total 5), 2 and 3 (total 5), 2 and 4 (total 6), 3 and 4 (total 7). Two pairs have total 5.
- 15. The first person shakes with the 5 after them, the next with 4 new people, and so on: 5 + 4 + 3 + 2 + 1 = 15.
- Every outcome has one first part and sits only in the block for that part, so two blocks never share an outcome. Inside a block the second choices are run through once each, so no outcome is written twice there either.
- Each of the 6 rows meets each of the 6 columns once, so there are 6 \times 6 = 36 cells. The 6 on the diagonal have equal numbers, leaving 30, and these come in mirror pairs such as (2,5) and (5,2), so their number is twice a whole number, which is even.
- Those are the results of each stage on its own, not outcomes of the experiment. An outcome must say what the coin did and what the cube did, such as H4. The real sample space has 2 \times 6 = 12 outcomes, as in Exercise 1.
- Choosing a first friend and then a different second gives 4 \times 3 = 12 ordered choices. Each pair turns up exactly twice among them, as TU and UT, so there are 12 \div 2 = 6 pairs.