Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume there is a probability $p$ the have a head when we tossing a coin. Now we would keep on tossing the coin until there are at least one head one tail appeared. What is the expect number of flip that land on head? Now i can actually find out the expected number of flip is required but not sure whether it is useful for this question.

share|cite|improve this question
up vote 2 down vote accepted

Assume that $p\ne 0$ and $p\ne 1$.

If we get a tail on the first toss (probability $1-p$), the expected number of heads is $1$. That is because in this case, the game stops as soon as we get a head.

If we get a head on the first toss, then we already have one head. The expected number of additional tosses until we get a tail is $\dfrac{1}{1-p}$. That is by the standard formula for the mean of a geometrically distributed random variable. All but one of these are additional tosses are heads.

So in that case the expected number of heads is $1+\dfrac{1}{1-p}-1=\dfrac{1}{1-p}$. Thus the required expectation is $$(1-p)(1)+p\dfrac{1}{1-p}.$$
If we wish, we can simplify this to $\dfrac{1-p+p^2}{1-p}$. It may be a little prettier to multiply top and bottom by $1+p$, obtaining $\dfrac{1+p^3}{1-p^2}$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.