Ideas of Chance in Computer Science 481
obtaining a sum of 3 is both an outcome and a one-element event E = {3}.
Suppose, now, that we want to represent the situation of obtaining at least one 1 on a
die. This can be expressed as the 11-element event
E = {(1, 1), (1, 2) ... , (1, 6), (2, 1), (3, 1) ... , (6, 1))
in Q22 and cannot be expressed at all as an event in 02 1. Hence, choosing a very detailed
sample space makes it possible to represent more situations as events.
What about the probability of obtaining a sum of 3? First, we must choose probability
density functions Pl and P2 for Q2 1 and Q22, respectively. For 022, we are comfortable with
assigning P2(w) = 1/36 for all outcomes w. Definition 5 then leads us to calculate
P(sum = 3) = P({(1, 2), (2, 1)M) = P2(1, 2) + p2(^2 , 1) = (2) (- = I
which seems to agree with experience. If we choose pi by assigning the same probability
density to each of the 11 outcomes in 0 1, we get
1
P(sum = 3) = P({3}) = L pI(w) = pl(3) 1
This is not mathematically incorrect, just out of line with the experience of people who
roll dice often. To repair things requires assigning a different probability density to f21.
What probability is obtained for this event if the probability density function following
Definition 4 (in Section 8.1.2) is chosen for Pi?
What about the probability of having at least one of the two dice show one pip on
the top face after a roll? Using the probability density P2 defined on Q22, we compute the
probability of the event
E ={(i, j) : i = 1, and 1 <j <61 U {(i, j) :I <i <6, andj = 11 _2
to be
P(E) = Z p2(w) = (11) =
wEE
With Q1, we are stuck. The situation cannot be described as an event in Q1, so we cannot
compute a probability for it, no matter what we choose for pl.
As this discussion illustrates, it is important to define a sample space with elements
that are versatile building blocks for the events of interest. One way to do this is to choose
outcomes that do not themselves decompose into subcases. In other words, the outcomes
should be the most basic, elemental situations that can occur.
Terminology Summary
"* A sample space Q2 is a set.
"* An outcome (o is an element of a sample space: o) E Q.
"* An event E is a subset of a sample space: E C 02.
"* The probability P(E) of an event E is the sum of the values of the probability
density function for the outcomes in the event.