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)
Showing by conditional expectation
-
0Ya, but i am asking if someone can use conditional expectation to solve the problem – 2012-09-29
2 Answers
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.$
It may be helpful to use a tree diagram and consider the various conditional probabilities. If you do this then you sum the following $E(X) = p + 2qp + 3q^2p + 4q^3p + \dots$
This can then easily be written as $E(X) = p\times(1 + 2q + 3q^2 + 4q^3 + \dots) = \frac{p}{(1-q)^2} = \frac{p}{p^2} = \frac{1}{p}$.
This result can be interpreted as follows:
$E(X) = 1\times p + (2qp + 3q^2p + 4q^3p + \dots)$
and the expression in brackets can be written as $(1 + \frac{1}{p})\times q$ so that we have
$E(X) = 1\times p + (1 + \frac{1}{p})\times q$
The first term is just $E(X|H) P(H)$ while the second term is $E(X|T) P(T)$.
-
1It might be worth stating explicitly that $q:=1-p$, for the sake of a more immediate understanding. – 2015-11-15