A sample space is a list of everything that can happen, and an event
is the part of the list that a question asks about. A probability is always
the probability of an event, so a problem starts with writing the list.
Our example is an exam week. A student has two final exams, chemistry and
history, in a week of 5 days, Monday to Friday. A computer picks a day for
the chemistry exam, and no day is favored. It then picks a day for the
history exam the same way, without regard to the first pick, so both exams
can land on the same day. We want the probability that the two exams land
on the same day or on back-to-back days.
Count the ways
We find this probability by counting. First we write down every way the two
picks can come out. One way is chemistry on Tuesday and history on Thursday,
which we write (Tue, Thu), with the chemistry day first. Then (Thu, Tue) is
a different way, because the exams have traded days. There are 5 days for
the chemistry exam, and for each of them 5 days for the history exam, so
there are 5×5=25 ways. Each of them is called an outcome.
In the figure, the 25 outcomes are the tiles of a square, where the
chemistry day runs from left to right and the history day from front to
back. One pick of the two days is one tile.
Next we count the outcomes that our question asks about. The exams are on
the same day in 5 outcomes, from (Mon, Mon) to (Fri, Fri). They are
on back-to-back days in 8 outcomes: 4 where the chemistry exam is the
earlier one, which are (Mon, Tue), (Tue, Wed), (Wed, Thu), and (Thu, Fri),
and 4 where the history exam is the earlier one. Monday and Friday are the
two ends of the week, so they are not back-to-back. No outcome is in both
groups, so 5+8=13 outcomes have the exams on the same day or on
back-to-back days. These are the red tiles at the end of the figure.
The 25 outcomes are equally likely. No day is favored for the chemistry
exam. Whichever day it gets, no day is favored for the history exam,
because the second pick is made without regard to the first. So no outcome
is favored over another. A later lesson makes this argument exact.
When all the outcomes are equally likely, a probability is a count divided
by a count: the outcomes the question asks about, out of all the outcomes.
So the probability that the exams land on the same day or on back-to-back
days is 13/25, which is a little more than half. The next lesson
defines probability, and here we use only this one fact.
The sample space and the event
The count used two sets of outcomes, and each has a name.
The first is the set of all 25 outcomes. It is the sample space, which we
call S and write with braces:
S={(Mon,Mon),(Mon,Tue),…,(Fri,Fri)}.
Picking the two days is an experiment, and each time it is done is one
run. In the figure, every run lights exactly one tile. This is what
makes the 25 outcomes a sample space: every run has exactly one of them as
its result.
The second is the set of the 13 outcomes that our question asks
about. A set of outcomes is an event, and we call this one E. An event
happens when the outcome of the run is in it. If the computer picks
(Wed, Wed) or (Mon, Tue), then E happens. If it picks (Tue, Thu), then E
does not happen.
We write ∣E∣ for the number of outcomes in E. With these names, the
count is
∣S∣∣E∣=2513.
Or, and, not
We counted E in two groups, and each group is an event too. Let D be the
event that the exams are on the same day, which has 5 outcomes, and let N
be the event that they are on back-to-back days, which has 8. Our question
joins them with "or". There are three ways to build an event from other
events, and each has a symbol:
D∪N, read "D or N", has the outcomes that are in D, in N,
or in both. It is the union of D and N.
D∩N, read "D and N", has the outcomes that are in both. It is
the intersection of D and N.
Dc, read "not D", has the outcomes that are not in D. It is the
complement of D.
In the figure, an event is a sheet lying on its outcomes.
Our event is the union, E=D∪N. The intersection D∩N has no
outcomes, because two exams on the same day are not on back-to-back days.
Two events with no outcome in common are disjoint. This is why we could
add 5+8 to get 13: no outcome was counted twice.
The complement Ec has the other 25−13=12 outcomes, where at least
one day lies between the two exams.
Practice
Work each problem on paper before opening its solution.
Problem 1
Two events with two dice
A red die and a blue die are rolled. An outcome is written with the red
die first: (1, 6) says that the red die shows 1 and the blue die shows 6.
The 36 outcomes are equally likely, and together they are the sample space
S.
Let A be the event that the sum of the two numbers is 7, and let B be
the event that the red die shows 1.
Draw a grid with one row for each number on the red die and one column for
each number on the blue die, so that each of the 36 cells is one outcome.
Shade the cells of A one way and the cells of B another way.
List the outcomes of A and the outcomes of B.
List the outcomes of A∩B, and say whether A and B are
disjoint.
Count the outcomes of A∪B and of (A∪B)c.
Find the probability that the sum is 7 or the red die shows 1.
Solution
Step 1: List the two events
The sum is 7 when the blue die shows 7 minus the number on the red die.
There is one such outcome for each number on the red die, so A has 6
outcomes:
A={(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)}.
In the grid these cells are a diagonal. The red die shows 1 in the first
row of the grid, so B also has 6 outcomes:
B={(1,1),(1,2),(1,3),(1,4),(1,5),(1,6)}.
Step 2: Find the outcomes in both
An outcome in both events has a red die that shows 1 and a sum of 7, so its
blue die shows 6:
A∩B={(1,6)}.
This is the one cell that is shaded both ways. The intersection has an
outcome, so A and B are not disjoint.
Step 3: Count the union and its complement
A has 6 outcomes and B has 6. Adding them counts (1, 6) twice, because
it is in both, so we take 1 away. The union A∪B has
6+6−1=11
outcomes, which are the shaded cells of the grid. The complement
(A∪B)c is the cells with no shading. It has the other
36−11=25 outcomes, where the sum is not 7 and the red die does not
show 1.
In the figure, each event is a sheet lying on its outcomes.
Step 4: Divide the count by 36
"The sum is 7 or the red die shows 1" is the event A∪B. The 36
outcomes are equally likely, so its probability is the number of its
outcomes, divided by the number of outcomes in the sample space:
∣S∣∣A∪B∣=3611.
In the reading, the two events were disjoint and their counts were added
with nothing taken away. Here the events share an outcome, so adding the
counts gives 12, which is 1 too many.
Answer:
11/36
Problem 2
Two books from a shelf
A shelf holds four books: A, B, C, and D. Here are three experiments with
this shelf, each with its own description of the result.
One book is taken, and then a second book is taken from the three that
are left. An outcome says which book was first and which was second.
One book is taken, its title is noted, and it is put back. Then a book is
taken again. An outcome says which book was first and which was second.
Two books are grabbed together in one hand. An outcome says which two
books they are.
For each experiment, write out the sample space in an order in which no
outcome can be skipped, and count its outcomes. A short way to write an
outcome is AB for "A first, then B" and "A and B" for the two books A and B
with no order.
Then, in each sample space, write out the event "book A is taken at least
once" and count its outcomes.
Solution
Step 1: Write the three sample spaces
We write AB for "A first, then B", and we go through the first book in the
order of the alphabet, and for each first book through the second book in
the same order.
In experiment 1 there are 4 books for the first place, and for each of them 3
books for the second place, so there are 4×3=12 outcomes:
S1={AB, AC, AD, BA, BC, BD, CA, CB, CD, DA, DB, DC}.
In experiment 2 the first book is back on the shelf, so there are 4 books for
the second place as well. This gives 4×4=16 outcomes:
It is S1 with the 4 outcomes AA, BB, CC, and DD added, in which the same
book is taken twice.
In experiment 3 there is no first or second book, so an outcome is a set of
two different books. We write "A and B" for it:
S3={A and B, A and C, A and D, B and C, B and D, C and D}.
There are 3 outcomes with A, then 2 new ones with B, then 1 new one with C,
which is 3+2+1=6 outcomes.
Step 2: Write the event in each
In S1, book A is first in 3 outcomes and second in 3 outcomes. No outcome
is in both groups, because the first book is not on the shelf for the second
pick. The event has 3+3=6 outcomes:
{AB, AC, AD, BA, CA, DA}.
In S2, book A is first in 4 outcomes and second in 4 outcomes. The
outcome AA is in both groups, so the event has 4+4−1=7 outcomes:
{AA, AB, AC, AD, BA, CA, DA}.
In S3, the event has 3 outcomes:
{A and B, A and C, A and D}.
Experiment
Outcomes
Book A is taken at least once
1. One at a time
12
6
2. One at a time, put back
16
7
3. Both together
6
3
The same words, "book A is taken at least once", give three different
counts. The count depends on how the books are taken and on what an outcome
records, so both have to be settled before counting.
Answer:
12, 16, and 6 outcomes, with book A taken at least once in 6, 7, and 3 of them
Problem 3
Three buses
Three buses leave a station each morning: bus 1, bus 2, and bus 3. The
experiment is to watch them on one morning and note whether each bus is late
(L) or on time (O). An outcome is written as three letters, with bus 1
first: LOO says that bus 1 is late and the other two are on time.
Let A1 be the event that bus 1 is late, and define A2 and A3 the
same way for bus 2 and bus 3.
A union or an intersection of three events is formed the same way as for
two: A1∪A2∪A3 is the set of outcomes that are in at least one
of the three, and A1∩A2∩A3 is the set of outcomes that are in
all three. Where unions and intersections are mixed, parentheses say what is
done first.
Write out the sample space in an order in which no outcome can be skipped.
Then, for each event below, list its outcomes, and write it in terms of
A1, A2, and A3 with unions, intersections, and complements.
At least one bus is late.
No bus is late.
Exactly one bus is late.
At most one bus is late. This one may be written in terms of events
already found.
Bus 1 is late and bus 2 is not.
Last, find two of the five events that are complements of each other.
Solution
Step 1: Write the sample space
There are 2 letters for bus 1, and for each of them 2 for bus 2, and for
each of those 2 for bus 3, so there are 2×2×2=8 outcomes.
We put L before O, and change the letter of bus 3 fastest:
S={LLL, LLO, LOL, LOO, OLL, OLO, OOL, OOO}.
Each of the three given events has 4 outcomes, because it fixes one letter
and leaves 2×2 choices for the other two.
Event
Outcomes
A1
LLL, LLO, LOL, LOO
A2
LLL, LLO, OLL, OLO
A3
LLL, LOL, OLL, OOL
Step 2: At least one bus is late
"At least one" means one, two, or three. An outcome is in this event when it
is in A1, in A2, or in A3, and it may be in more than one of them.
This is what a union says, so the event is
A1∪A2∪A3={LLL, LLO, LOL, LOO, OLL, OLO, OOL}.
It has 7 outcomes. Adding 4+4+4 would give 12, which is wrong because
the three events share outcomes (LLL is in all three).
Step 3: No bus is late
"No bus is late" means that bus 1 is not late, and bus 2 is not late, and
bus 3 is not late. Each "not" is a complement and each "and" is an
intersection:
A1c∩A2c∩A3c={OOO}.
It has 1 outcome.
Step 4: Exactly one bus is late
"Exactly one" means one and no more. There are three ways for this to
happen, one for each bus that could be the late one. If it is bus 1, then
bus 1 is late and the other two are not, which is
A1∩A2c∩A3c={LOO}. The event is the union of the
three ways:
It has 3 outcomes. The three ways are disjoint, because each says a
different bus is the only late one, and no outcome has two such buses. So
here adding works: 1+1+1=3.
Step 5: At most one bus is late
"At most one" means none or one. So this event is the union of the last two
events:
{OOO}∪{LOO, OLO, OOL}={LOO, OLO, OOL, OOO}.
Written out in A1, A2, and A3, it is the union of the two
expressions above. It has 1+3=4 outcomes, and adding works because
"none" and "exactly one" are disjoint.
Step 6: Bus 1 is late and bus 2 is not
This event is
A1∩A2c={LOL, LOO}.
It has 2 outcomes. The statement does not mention bus 3, so bus 3 is late in
one of them and on time in the other.
Step 7: Find the complements
"No bus is late" is the complement of "at least one bus is late". Every
outcome has no late bus or has at least one, and no outcome has both, so
(A1∪A2∪A3)c=A1c∩A2c∩A3c.
The counts agree: 8−7=1. No other two of the five events are
complements. The counts of an event and its complement add to 8, and among
7, 1, 3, 4, and 2 only 7 and 1 do.
This gives a shorter way to count an "at least one" event. We count the
"none" event, which is small, and subtract from ∣S∣.
The complement of "at most one bus is late" is not on the list. It is "at
least two buses are late", which is {LLL, LLO, LOL, OLL} and has
8−4=4 outcomes.
Answer:
7, 1, 3, 4, and 2 outcomes
Problem 4
A ball on a peg board
A ball is dropped into the top of a board that has 4 rows of pegs. At each
row the ball hits a peg and bounces left (L) or right (R), and neither side
is favored. A path is written as four letters, with the top row first: LRRL
is left, right, right, left.
Under the last row are 5 bins, numbered 0 to 4 from left to right. The ball
ends in the bin whose number is the number of times it bounced right, so the
path LRRL ends in bin 2.
We take all the paths to be equally likely.
Write out every path in an order in which none can be skipped, count the
paths, and beside each write its bin. Then make a table with one row for
each bin, holding the paths that end in it and how many there are.
Say why the 5 bins are a sample space of this experiment, and whether
the 5 bins are equally likely. We call this sample space T, and the
sample space of all the paths S.
Find the probability that the ball ends in bin 2.
Find the probability that the ball ends in bin 0 or in bin 4.
Solution
Step 1: Write the paths
There are 2 letters for each of the 4 rows, so there are
2×2×2×2=16 paths. We put L before R, and change the
letter of the last row fastest. The bin is the number of R's.
Path
Bin
Path
Bin
Path
Bin
Path
Bin
LLLL
0
LRLL
1
RLLL
1
RRLL
2
LLLR
1
LRLR
2
RLLR
2
RRLR
3
LLRL
1
LRRL
2
RLRL
2
RRRL
3
LLRR
2
LRRR
3
RLRR
3
RRRR
4
Step 2: Group the paths by bin
Bin
Paths that end in it
Number
0
LLLL
1
1
LLLR, LLRL, LRLL, RLLL
4
2
LLRR, LRLR, LRRL, RLLR, RLRL, RRLL
6
3
LRRR, RLRR, RRLR, RRRL
4
4
RRRR
1
Total
16
In the figure, each ball is one path.
Step 3: The bins are a sample space
Every run ends with the ball in one bin, and a ball is not in two bins. So
every run fits exactly one of the 5 outcomes "bin 0" to "bin 4", which makes
them a sample space. This is T, with 5 outcomes, and S has 16.
The outcomes of T are not equally likely. "Bin 2" happens when any of 6
equally likely paths does, and "bin 0" happens when 1 path does, so bin 2 is
6 times as likely as bin 0.
Step 4: Count paths for bin 2
The fact that the probability of an event A is ∣A∣/∣S∣ needs equally
likely outcomes, so we count in S and not in T. In S, "the ball ends
in bin 2" is the event A of the 6 paths in the third row of the table:
∣S∣∣A∣=166=83.
In T, "bin 2" is 1 of 5 outcomes, which would give 1/5. Here the count
over the count is not justified, because the 5 outcomes are not equally
likely. The probability found from the paths is 3/8, not 1/5.
Step 5: Count paths for bin 0 or bin 4
Let B be the event of S that the ball ends in bin 0 or in bin 4. It is
the union of {LLLL} and {RRRR}, which are disjoint, so
∣B∣=1+1=2 and
∣S∣∣B∣=162=81.
The matching event of T has 2 of the 5 outcomes, and 2/5 is more than 3
times the right number. The two end bins are the least likely outcomes of
T.
Answer:
3/8 and 1/8
Problem 5
Reading until two agree
A gauge is read, and each reading is high (H) or low (L). It is read again
and again, and the readings stop as soon as two readings in a row agree.
Nothing else limits the number of readings. For a run that stops, the
outcome is the readings in order: HLL says that the readings were high, low,
low, and that they stopped after the third.
Write out every outcome with 2 readings, with 3 readings, and with 4
readings.
Say in one sentence what the readings look like in every run that stops.
Then say how many of these outcomes have n readings, and for which n.
List the outcomes of the event "there are at most 4 readings" and of the
event "there are exactly 5 readings".
Say why these outcomes cannot be written out in full. Then find a run
that fits none of them, and say what has to be added so that the outcomes
are a sample space.
Solution
Step 1: Write the short outcomes
With 2 readings, the two readings agree, so the outcomes are HH and LL.
With 3 readings, the first two did not agree (the readings would have
stopped), and the third agrees with the second. If the first is H, the
second is L and the third is L. This gives HLL, and starting with L gives
LHH.
With 4 readings, the first three have no two in a row that agree, and the
fourth agrees with the third. This gives HLHH and LHLL.
Readings
Outcomes
2
HH, LL
3
HLL, LHH
4
HLHH, LHLL
5
HLHLL, LHLHH
Step 2: Describe the pattern
In every run that stops, the readings alternate between H and L up to the
one before the last, and the last reading repeats the one before it.
The first reading and the number of readings decide all the others. Each
reading before the last has to differ from the one before it, and the last
has to agree with the one before it, so once the first reading and the
number of readings are known, nothing is left to choose. There are 2 first
readings, so there are 2 outcomes with n readings, for every whole number
n from 2 up. There is no outcome with 1 reading, because one reading has
nothing to agree with.
A string of letters that is not of this kind is not an outcome. HHL is not
one, because the readings stop after HH.
Step 3: List the two events
"There are at most 4 readings" has the outcomes with 2, 3, or 4 readings:
{HH, LL, HLL, LHH, HLHH, LHLL}.
It has 2+2+2=6 outcomes. "There are exactly 5 readings" has the 2
outcomes of the last row of the table:
{HLHLL, LHLHH}.
The two events are disjoint, because no outcome has both at most 4 readings
and exactly 5 readings.
Step 4: Why the outcomes do not run out
There are 2 outcomes for each n from 2 up, and there is no largest n:
for any number of readings, the readings can alternate that long and stop
later. So there are infinitely many outcomes, and they cannot be written out
in full, because the writing never ends. They can still be written one after
another, in order of the number of readings, so that every outcome has a
place. We write the start and the pattern,
{HH, LL, HLL, LHH, HLHH, LHLL, HLHLL, LHLHH,…},
where the dots stand for 2 outcomes of each greater length.
Step 5: The runs that never stop
A run in which the readings alternate forever, HLHLHL and so on, never has
two readings in a row that agree. It does not stop, so it fits none of the
outcomes above. No gauge is read forever, but nothing in the experiment
limits the number of readings, so we allow such a run as an idealization.
A sample space has to give every run exactly one outcome, so we add one
outcome: "the readings never agree". With it, every run fits exactly one
outcome, and the set is a sample space. The new outcome can also be split in
two, "alternates forever, starting with H" and "alternates forever, starting
with L", which gives a sample space with more detail. How likely it is that
the readings never agree is a separate question, which this lesson does not
answer. The sample space only records what can happen.
This sample space has infinitely many outcomes. Events are still sets of
outcomes, and an event may now have infinitely many (the complement of
"there are at most 4 readings").
Answer:
6 outcomes, the 2 outcomes HLHLL and LHLHH, and infinitely many outcomes in all
Problem 6
A bus and a train
A bus arrives at a station x minutes after noon, and a train arrives y
minutes after noon. Each of x and y is from 0 to 20, ends included, and
neither has to be a whole number (x=7.5 is 30 seconds after 12:07). An
outcome is the pair (x,y), which we draw as a point with x across and
y up. A length of 1 in the drawing is 1 minute, and areas are given as
plain numbers in these units.
Draw the sample space. Then draw it three more times, and on each copy shade
one of the events below and find the area of the shaded region.
The bus arrives before the train: x<y.
Both arrive in the first 5 minutes: x≤5 and y≤5.
The train arrives after the bus, and no more than 5 minutes after it:
0<y−x≤5.
Last, say whether the outcomes of this sample space can be written out one
after another, as the outcomes HH, LL, HLL, LHH, and so on are in the
problem about readings of a gauge. Then find what part of the area of the
sample space the third event takes up.
Solution
Step 1: Draw the sample space
Every pair (x,y) with 0≤x≤20 and 0≤y≤20 is an
outcome. These points fill a square with corners (0,0), (20,0),
(20,20), and (0,20). Its side is 20, so its area is
20×20=400.
In the figure, each event is a region of the square.
Step 2: The bus arrives before the train
The points with x=y are the diagonal from
(0,0) to (20,20), and the points with x<y are above it. The event
is the triangle with corners (0,0), (0,20), and (20,20).
The diagonal cuts the square into two equal triangles, so the area is
400/2=200. The diagonal itself is not in the event, because on it the
bus and the train arrive together. A line has no area, so the area would be
the same with the diagonal shaded.
Step 3: Both arrive in the first 5 minutes
This event is the intersection of "the bus arrives in the first 5 minutes"
and "the train arrives in the first 5 minutes". The first is the strip
x≤5 along the left side, and the second is the strip y≤5 along
the bottom. Each strip is 5 by 20 and has area 100.
The strips overlap in the small square with corners (0,0), (5,0),
(5,5), and (0,5). Its area is 5×5=25.
Step 4: The train arrives no more than 5 minutes after the bus
The train arrives y−x minutes after the bus, which is why the condition
is 0<y−x≤5. The points with y−x=0 are the diagonal, and the
points with y−x=5 are the line from (0,5) to (15,20), which is
the diagonal moved up by 5. The event is the band between the two lines,
with the second line and without the diagonal. Leaving out the diagonal does
not change the area, as before. The corners of the band are (0,0),
(0,5), (15,20), and (20,20).
We find its area by subtracting. The band is the triangle above the
diagonal, which has area 200, without the points where the train is more
than 5 minutes after the bus. Those points are the triangle above the second
line, with corners (0,5), (0,20), and (15,20). Its two short sides
are both 15, so
area of the band=200−215×15=200−2225=2175.
This is 87.5.
Step 5: Can the outcomes be written one after another
There are infinitely many outcomes, because there are infinitely many times
from 0 to 20. In the problem about readings there are also infinitely many
outcomes, and they can be written one after another (HH, LL, HLL, LHH, and
so on): the writing never ends, but every outcome has a place in it. The
points of the square cannot be written one after another in this way,
whatever order is tried. We take this as a fact here. So we describe the
sample space by a condition and a drawing.
Events are still sets of outcomes. Each event above is a region of the
square, and a region holds infinitely many points, so counting outcomes says
nothing about the size of an event. What we can compare is area.
Step 6: The part of the square
400175/2=800175=327.
The third event is 7/32 of the area of the square, which is a little more
than a fifth. The first event is 200/400=1/2 of it and the second is
25/400=1/16.
Here 7/32 is only a part of the square's area. A later lesson uses area to
measure how likely a region is, when no region is favored over another
region of the same area.
Answer:
Areas 200, 25, and 175/2, and the last is 7/32 of the square