Monday, February 26, 2007

Linearity of Expectation

100 people arrive at a party. Each of them puts his hat away in a common area. When they leave, they randomly pick a hat from the common area. What is the expected number of people leaving with the hats they arrived with?

Solution:

This is a classic. The answer is 1, essentially because of linearity of expectations:

E[total#matching hats] = Sum {i} E[ith guy leaving with matching hat]

Each E[ith guy leaving with matching hat] is equal, with value == 1/100.

A priori, there's no reason to assume E[ith guy leaving with matching hat] would be identical... but turns out they are. The proof is relatively straightforward and the application of this result is quite surprising in less obvious cases.

No comments: