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

Given a game where the player has some probability of dying and this probability increases each second as the game is played to some maximum probability. The player has three lives and then the game is over.

Can I calculate the average game duration if I know the probability the player will die at each second?

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

Yes. If $p_n$ is the probability for the char to die if it is at age $n$, then the porbability of dying at age $n$ is $$(1-p_0)(1-p_1)(1-p_2)\cdots(1-p_{n-1})p_n $$ hence the expected life time is $$\sum_{n=0}^\infty n\cdot (1-p_0)(1-p_1)(1-p_2)\cdots(1-p_{n-1})p_n\\ =\sum_{n=1}^\infty (1-p_0)(1-p_1)\cdots(1-p_{n-1})$$ and with three lives, the expected game duration is three times as long.

If all $p_n$ were equal, this expression could readily be simplified, but alas that does not match your setup.

share|cite|improve this answer
Excellent, thank you very much. – nobo01 Sep 27 '12 at 20:08

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.