Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given a biased coin with probability P of flipping to head position, how can I compute N, the average number of tosses for reaching a head?

I also need a formula for the reverse problem, computing P as a function of N (if I know the average number of tosses, how can I find the bias).

Edit: This can apparently be rephrased as computing the average number of Bernoulli trials with probability P to get a success. The result is N = 1/p according to this article.

share|cite|improve this question
This has to do with the geometric distribution: – Hoda Feb 6 '14 at 19:17

2 Answers 2

up vote 1 down vote accepted


You could have H, TH, TTH, ....

P(H) = p

P(TH) = qp where q = 1-p

P(TTH) = $q^2p$


Expected No of Tosses = $p+2pq+3pq^2+4pq^3+\cdots$

E = $p(1+2q+3q^2+4q^3+....)$

S = $(1+2q+3q^2+4q^3+....)$

qS = $q+2q^2+3q^3+....)$

S-qS = $1+q+q^2+q^3+\cdots$

S(1-q) = $\frac{1}{(1-q)}$

S = $\frac{1}{(1-q)^2}$

E =$\frac{p}{(1-q)^2}$

E = $\frac{1}{p}$

That will be your answer

Now if somebody gives you E, you calculate p



share|cite|improve this answer

The distribution you are looking for is geometric distribution. The probability of reaching head in k-th tossing is: $$ P\left\{ {X = k} \right\} = p{(1 - p)^{k - 1}}\,\,\,k = 1,2,..., + \infty $$

and the p is what you mentioned in your question.

Mean of this random variable is: $$ E\left\{ X \right\} = \frac{1}{p} $$ So $N =\dfrac{1}{p} $.

With this relation the reverse problem has readily solved.

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.