09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.1 DEFINITIONS 371<br />

making independent trials in such a way that each value of X occurs with<br />

a frequency approximately proportional to its probability. (For example, we<br />

might roll a pair of dice many times, observing the values of S and/or P.) We’d<br />

like to define the average value of a random variable so that such experiments<br />

will usually produce a sequence of numbers whose mean, median, or mode is<br />

approximately the s,ame as the mean, median, or mode of X, according to our<br />

definitions.<br />

Here’s how it can be done: The mean of a random real-valued variable X<br />

on a probability space n is defined to be<br />

t x.Pr(X=:x) (8.6)<br />

XEX(cl)<br />

if this potentially infinite sum exists. (Here X(n) stands <strong>for</strong> the set of all<br />

values that X can assume.) The median of X is defined to be the set of all x<br />

such that<br />

Pr(X6x) 3 g and Pr(X3x) 2 i. (8.7)<br />

And the mode of X is defined to be the set of all x such that<br />

Pr(X=x) 3 Pr(X=x’) <strong>for</strong> all x’ E X(n). (8.8)<br />

In our dice-throwing example, the mean of S turns out to be 2. & + 3.<br />

$ +... + 12. & = 7 in distribution Prcc, and it also turns out to be 7 in<br />

distribution Prr 1. The median and mode both turn out to be (7) as well,<br />

in both distributions. So S has the same average under all three definitions.<br />

On the other hand the P in distribution Pro0 turns out to have a mean value<br />

of 4s 4 = 12.25; its median is {lo}, and its mode is {6,12}. The mean of P is<br />

unchanged if we load the dice with distribution Prll , but the median drops<br />

to {8} and the mode becomes {6} alone.<br />

Probability theorists have a special name and notation <strong>for</strong> the mean of a<br />

random variable: Th.ey call it the expected value, and write<br />

EX = t X(w) Pr(w).<br />

wEn<br />

(8.9)<br />

In our dice-throwing example, this sum has 36 terms (one <strong>for</strong> each element<br />

of !J), while (8.6) is a sum of only eleven terms. But both sums have the<br />

same value, because they’re both equal to<br />

1 xPr(w)[x=X(w)]<br />

UJEfl<br />

XEX(Cl)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!