Keep flipping a biased coin until the first head is observed and let X be the number of flips resulting. Find E[X]. Question: Keep flipping a biased coin (π = p [heads] = 1/3). We will not stop until the first head is observed and let X be the number of flips resulting. Find E[X].
My answer:
$E(X) = \sum_{x=1}^\infty(x\cdot(1-\pi)^{x-1}\cdot\pi) = \pi\sum_{x=1}^\infty(x\cdot(1-\pi)^{x-1})$
I am stucked here....
The answer key is 3

Doesn't the thing that is being summed look like the derivative of some function in $\pi$ to you ? 
Try to do the sum before differentiating and then finally differentiate, you should find what you are looking for (if you can commute infinite sum and derivation in this case it is because of a particular case of dominated convergence theorem).
