Take the 2-minute tour ×
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.

Following my previous question, which can be found here: probability of passing an exam, I found out that the probability of passing an exam at the nth try is $p(1-p)^{n-1}$.

If I now assume that taking an exam takes me one hour of work, how many hours on average will I have worked if the maximum number of retries is N (regardless of whether I end up passing the exam or not) ?

share|improve this question
Mild ambiguity. Does max number of retries is $4$ mean (a) max of tries is $4$ or (b) max number of tries is $5$? Technically, it should be (b), the first time is not a retry, but in casual language it can mean (a). –  André Nicolas Jun 12 '12 at 18:41
You're right I should have used 'tries' instead of 'retries' in my question to make it less confusing, sorry. However I can easily adapt from (a) to (b) so that's not really an issue. If I'm not mistaken, the answer below assumes it to be (a), right? –  TimZEI Jun 12 '12 at 19:54
Right. ${}{}{}{}{}{}{}{}{}$ –  André Nicolas Jun 12 '12 at 20:15

2 Answers 2

up vote 0 down vote accepted

The probability of taking the exam $n$ times is then $p(1-p)^{n-1}$ except for the last, which has probability $(1-p)^{N-1}$ as you stop in any case. The average or expected number of hours is then $$\sum_{i=1}^N P(i)i=\sum_{i=1}^{N-1} ip(1-p)^{i-1}+(1-p)^{N-1}N$$ To sum the series, let $q=1-p$. Then $$\sum_{i=1}^{N-1} ip(1-p)^{i-1}=p\sum_{i=1}^{N-1} iq^{i-1}=p\sum_{i=1}^{N-1} \frac d{dq} q^i=p \frac d{dq} \frac {q-q^N}{1-q}$$

share|improve this answer
@TimZEI: In your other question, if you failed the Nth try, you took the exam again. In this case, you said you stop after N tries. Deleting the factor p accounts for the fact that you will always stop after the Nth try. –  Ross Millikan Jun 12 '12 at 20:07
@TimZEI: I thought you would have worked the hour to get ready for the Nth try whether or not you pass. The probability that you take it the Nth time is just the chance you didn't pass before that, $(1-p)^{N-1}$. In the previous problem we were interested in the chance you pass on the Nth time, which is $p$ times this. –  Ross Millikan Jun 12 '12 at 22:01
@TimZEI: That is the sum of the geometric series. In the form $\sum (1-p)^k$ it is the chance that you have not passed after $k$ tries. The fact that this goes to zero as $k$ goes to infinity says you will eventually pass if you keep trying. These geometric series come up frequently. en.wikipedia.org/wiki/Geometric_series has an introduction. I don't see an easy application of $\sum p^k$ in this problem. –  Ross Millikan Jun 12 '12 at 23:56
@TimZEI: The term $(1-p)^k$, which is the probability that you have still not passed after $k$ tries, is what goes to zero. The sum from 1 to k goes to 1, the probability that you have passed after k tries. –  Ross Millikan Jun 13 '12 at 0:35
@TimZEI: I didn't see a full solution from you, but I think the difference is the factor $i$ in my sum. This represents the fact that if you have to take the test 3 times, you will have spent 3 hours preparing. Without the sum you are calculating the average number of tries of the test. Without the maximum N, this should be $\frac 1p$, which is the limit of your expression as $N \to \infty$ –  Ross Millikan Jun 13 '12 at 0:41

A person can give 3 trial exams for the clearing test. In 1st attempt probability of passing is 40 , Those who have failed have 60 probability of passing the exam in 2nd attempt. Those who have failed in 2nd attempt have 20 probability of passing the exam

share|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.