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.2 MEAN AND VARIANCE 379<br />

We estimate the average spot sum of these dice to be 7.4&2.1/m = 7.4~tO.7,<br />

on the basis of these experiments.<br />

Let’s work one more example of means and variances, in order to show<br />

how they can be ca.lculated theoretically instead of empirically. One of the<br />

questions we considered in Chapter 5 was the “football victory problem,’<br />

where n hats are thrown into the air and the result is a random permutation<br />

of hats. We showed fin equation (5.51) that there’s a probability of ni/n! z 1 /e<br />

that nobody gets thle right hat back. We also derived the <strong>for</strong>mula<br />

P(n,k) = nl ’ ‘n (n-k)i = -!&$<br />

. 0\<br />

k<br />

<strong>for</strong> the probability that exactly k people end up with their own hats.<br />

Restating these results in the <strong>for</strong>malism just learned, we can consider the<br />

probability space FF, of all n! permutations n of {1,2,. . . , n}, where Pr(n) =<br />

1 /n! <strong>for</strong> all n E Fin. The random variable<br />

Not to be confused F,(x) = number of “fixed points” of n , <strong>for</strong> 7[ E Fl,,<br />

with a Fibonacci<br />

number.<br />

measures the number of correct hat-falls in the football victory problem.<br />

Equation (8.22) gives Pr(F, = k), but let’s pretend that we don’t know any<br />

such <strong>for</strong>mula; we merely want to study the average value of F,, and its standard<br />

deviation.<br />

The average value is, in fact, extremely easy to calculate, avoiding all the<br />

complexities of Cha.pter 5. We simply observe that<br />

Hence<br />

F,(n) = F,,I (7~) + F,,2(74 + + F,,,(d)<br />

Fn,k(~) = [position k of rc is a fixed point] , <strong>for</strong> n E Fl,.<br />

EF, = EF,,, i- EF,,z + . . . + EF,,,,<br />

And the expected value of Fn,k is simply the probability that Fn,k = 1, which<br />

is l/n because exactly (n - l)! of the n! permutations n = ~1~2 . . . n, E FF,<br />

have nk = k. There<strong>for</strong>e<br />

EF, = n/n =: 1 , <strong>for</strong> n > 0. (8.23)<br />

One the average. On the average, one hat will be in its correct place. “A random permutation<br />

has one fixed point, on the average.”<br />

Now what’s the standard deviation? This question is more difficult, because<br />

the Fn,k ‘s are not independent of each other. But we can calculate the

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

Saved successfully!

Ooh no, something went wrong!