# Expected winnings on a coin flip game

A game involves flipping a coin until the first head appears and winning $2^n$ dollars if the first head appears on the $\mathrm{n^{th}}$ coin flip. We want to determine the expected winnings for this game.

Based on my understanding on the problem,

\begin{align}&X=\{ \mathrm{Coin\ Flips}\} \sim\mathrm{Geo}(p=0.5) \\ &W=\{\mathrm{Winnings}\}=2^X\\ &E[W]=E[2^X]=\sum_{n=1}^\infty 2^nP(X=n)=\sum_{n=1}^\infty (2^n)(0.5^n)=\sum_{n=1}^\infty 1=\infty \end{align}

However, this doesn't sound right to me because we also know that

$$E[X]=\frac{1}{p}=\frac{1}{0.5}=2$$

• This is known as the "St Petersburg Paradox" en.wikipedia.org/wiki/St._Petersburg_paradox – Doug M Apr 22 '17 at 3:10
• It shouldn't bother you that $E[2^X] = \infty$ while $2^{E[X]} = 4$; in general, taking expected values doesn't commute with arbitrary operations. – Misha Lavrov Apr 22 '17 at 3:58