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.

388 DISCRETE PROBABILITY<br />

Repeating the process until n heads are obtained gives the pgf<br />

P= n - = w& (n+;-yq,lk<br />

( 1 -qz )<br />

This, incidentally, is Z” times<br />

(&)” = ; (ni-;-l)p.,q’z*.<br />

(8.60)<br />

the generating function <strong>for</strong> the negative binomial distribution.<br />

The probability space in example (8.5g), where we flip a coin until<br />

n heads have appeared, is different from the probability spaces we’ve seen<br />

earlier in this chapter, because it contains infinitely many elements. Each element<br />

is a finite sequence of heads and/or tails, containing precisely n heads<br />

in all, and ending with heads; the probability of such a sequence is pnqkpn, Heads I win,<br />

where k - n is the number of tails. Thus, <strong>for</strong> example, if n = 3 and if we tails you lose.<br />

write H <strong>for</strong> heads and T <strong>for</strong> tails, the sequence THTTTHH is an element of the<br />

probability space, and its probability is qpqqqpp = p3q4.<br />

Let X be a random variable with the binomial distribution (8.57), and let<br />

No? OK; tails you<br />

lose, heads I win.<br />

No? Well, then,<br />

heads you ,ose<br />

Y be a random variable with the negative binomial distribution (8.60). These<br />

distributions depend on n and p. The mean of X is nH’(l) = np, since its<br />

pgf is Hi; the variance is<br />

tails I win.<br />

’<br />

n(H”(1)+H’(1)-H’(1)2) = n(O+p-p2) = npq. (8.61)<br />

Thus the standard deviation is m: If we toss a coin n times, we expect<br />

to get heads about np f fitpq times. The mean and variance of Y can be<br />

found in a similar way: If we let<br />

we have<br />

G’(z) = (, T9sz,, ,<br />

2pq2<br />

G”(z) = (, _ qz13 ;<br />

hence G’(1) = pq/p2 = q/p and G”(1) = 2pq2/p3 = 2q2/p2. It follows that<br />

the mean of Y is nq/p and the variance is nq/p2.

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

Saved successfully!

Ooh no, something went wrong!