Mathematics for Computer Science

(Frankie) #1

17.4. Great Expectations 587


Proof. SupposeRis defined on a sample spaceS. Then,


ExŒRçD

X


! 2 S

R.!/PrŒ!ç (Def 17.4.1 of expectation)

D


X


x 2 range.R/

X


! 2 ŒRDxç

R.!/PrŒ!ç

D


X


x 2 range.R/

X


! 2 ŒRDxç

xPrŒ!ç (def of the eventŒRDxç)

D


X


x 2 range.R/

x

0


@


X


! 2 ŒRDxç

PrŒ!ç

1


A (distributingxover the inner sum)

D


X


x 2 range.R/

xPrŒRDxç: (def of PrŒRDxç)

The first equality follows because the eventsŒRDxçforx 2 range.R/partition
the sample spaceS, so summing over the outcomes inŒRDxçforx 2 range.R/
is the same as summing overS. 


In general, equation (17.2) is more useful than the defining equation (17.1) for
calculating expected values. It also has the advantage that it does not depend on
the sample space, but only on the density function of the random variable. On
the other hand, summing over all outcomes as in equation (17.1) sometimes yields
easier proofs about general properties of expectation.


Medians


The mean of a random variable is not the same as themedian. The median is the
midpointof a distribution.


Definition 17.4.4.Themedianof a random variableRis the valuex 2 range.R/
such that


PrŒRxç

1


2


and

PrŒR > xç <

1


2


:


We won’t devote much attention to the median. The expected value is more
useful and has much more interesting properties.

Free download pdf