526 CHAPTER 8 Discrete Probability
Substituting px(x) = 2 p(w), where the summation is over all a) E? in the event (X =
x), gives
E(X)= L' (X IS"P6)
XEQX 0c-(X=x)
= S ( S: X.-P(W))
XEQX aOE(X=x)
= S S x~o) .p(w)
XCQx we(X=x)
Suppose that Qx = (xx.. x, }. Then, the double sum above can be written out as the
following sum of sums:
E X(o).p(w)±..+ + + ý X ).p((w).
(tE(X=xj) We(X=x,)
Since the events (X = xl). (X = x,) partition S2, each a) •? is contributing exactly
X ((o) p ((o) to this sum of sums. Hence,
E(X) = 5: X(CO) • p().
weQ
Example 5. Compute the expectation of the random variable X in Example 4 by using
Theorem 2.
Solution. Instead of computing the probability distribution px induced by X on Q^2 x, we
work directly with the original sample space 02.
E(X) = 5 p(0v)X(av)
= (-$l)p(l) + ($l)p(^2 ) + (-$^3 )p(^3 ) + ($1)p(4) + (-$5)p(^5 ) + ($l)p(6)
1 1 1 1 1 1
= (-$)- + (1)- + (-$3)- + ($1- + (-$5)- + ($)-
6 2 12 12 12 12
1
6
which agrees with our previous answer. U
8.75 The Sum of Random Variables
Suppose that X1 .. X, are random variables defined on some sample space S?. We can
use these to define new random variables on Q in various ways. For example, we can define
a random variable SUM by setting
SUM(cv) = XI (cO) + "" + Xn (a))
for each (0 E Q?.
Example 6. Suppose we toss three fair coins. We associate with this experiment a sample
space E2 of eight triples each having probability 1/8. The first, second, and third compo-
nents of each triple is 1 or 0 depending on whether the first, the second, or the third coin