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.3 PROBABILITY GENERATING FUNCTIONS 381<br />

The nicest thin,g about pgf’s is that they usually simplify the computation<br />

of means and variances. For example, the mean is easily expressed:<br />

EX = xk.P:r(X=k)<br />

k>O<br />

= ~Pr(X=k).kzk~‘lr=,<br />

k>O<br />

= G;(l). (8.28)<br />

We simply differentiate the pgf with respect to z and set z = 1.<br />

The variance is only slightly more complicated:<br />

E(X’) = xk*.Pr(X=k)<br />

There<strong>for</strong>e<br />

k>O<br />

= xPr(X=k).(k(k- 1)~~~’ + kzk-‘) I==, = G;(l) + G;(l).<br />

k>O<br />

VX = G;(l) +- G&(l)- G;(l)2. (8.29)<br />

Equations (8.28) and (8.29) tell us that we can compute the mean and variance<br />

if we can compute the values of two derivatives, GI, (1) and Gi (1). We don’t<br />

have to know a closed <strong>for</strong>m <strong>for</strong> the probabilities; we don’t even have to know<br />

a closed <strong>for</strong>m <strong>for</strong> G;c (z) itself.<br />

It is convenient’ to write<br />

Mean(G) = G'(l), (8.30)<br />

Var(G) = G"(l)+ G'(l)- G'(l)', (8.31)<br />

when G is any function, since we frequently want to compute these combinations<br />

of derivatives.<br />

The second-nicest thing about pgf’s is that they are comparatively simple<br />

functions of z, in many important cases. For example, let’s look at the<br />

uni<strong>for</strong>m distribution of order n, in which the random variable takes on each<br />

of the values {0, 1, . ,, . , n - l} with probability l/n. The pgf in this case is<br />

U,(z) = ;(l-tz+...+znp') = k&g, <strong>for</strong> n 3 1. (8.32)<br />

We have a closed <strong>for</strong>m <strong>for</strong> U,(z) because this is a geometric series.<br />

But this closed <strong>for</strong>m proves to be somewhat embarrassing: When we plug<br />

in z = 1 (the value of z that’s most critical <strong>for</strong> the pgf), we get the undefined<br />

ratio O/O, even though U,(z) is a polynomial that is perfectly well defined<br />

at any value of z. The value U, (1) = 1 is obvious from the non-closed <strong>for</strong>m

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

Saved successfully!

Ooh no, something went wrong!