# Showing by conditional expectation

Suppose flipping a coin with probability $p$ to get a head. Suppose we flip it until a head appear. What is the mean number of flip required getting a head? (Better to use conditional expectation to show the mean)

-
What do you mean by the last sentence? Is it a question? –  Stefan Hansen Sep 29 '12 at 10:07
Ya, but i am asking if someone can use conditional expectation to solve the problem –  Mathematics Sep 29 '12 at 10:20

If $E$ is the expected number of flips, then we have following relation $$E = p\cdot 1+ (1-p)\cdot(1+E)$$ because with probability $p$ we succeed at first try and with probability $1-p$ we have "wasted" one try and start again. Once we agree that $E$ is finite, this produces $$E = \frac1p.$$

-