TITLE: Striking applications of linearity of expectation
QUESTION [52 upvotes]: Linearity of expectation is a very simple and "obvious" statement, but has many non-trivial applications, e.g., to analyze randomized algorithms (for instance, the coupon collector's problem), or in some proofs where dealing with non-independent random variables would otherwise make any calculation daunting.
What are the cleanest, most elegant, or striking applications of the linearity of expectation you've encountered?

REPLY [3 votes]: If you randomly shuffle a deck of $n$ cards numbered $1, 2,...,n$ and deal them out, then the expected number of cards that are greater than all previous cards is the $n$-th partial sum of the harmonic series: That is, the expected number of cards that are the 'maximum so far' is given by $H(n)=1+\frac12+\frac13+\cdots +\frac1n$
To see this: Let $X_i=1$ if the $i$-th card is the greatest so far; and $X_i=0$ otherwise. Then $X:=\displaystyle\sum_{i=1}^n{X_i}$ gives the number of cards that are maximums so far.  But $E[X_i] = \frac1i$ since there is a $\frac1i$ probability that the greatest of the first $i$ cards is in fact the $i$-th card.