1
$\begingroup$

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) ?

  • 0
    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).2012-06-12
  • 0
    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?2012-06-12
  • 0
    Right. ${}{}{}{}{}{}{}{}{}$2012-06-12

2 Answers 2

0

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}$$

  • 0
    I don't understand why the last time the exam is taken, the probability would be any different. Whether I stop or not afterwards shouldn't change the probability, which can't look into the future ?!2012-06-12
  • 0
    @TimZEI the probability of you stopping at that point is equal to the sum of all probabilities where you take the exam at that point or beyond, i.e. $P(X\ge N)$.2012-06-12
  • 1
    @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.2012-06-12
  • 0
    Ross Millikan, am I right to say that you agree with Shaktal, and that your answer assumes that the last try has a probability P(X>=N) ? In other words, you're saying that if I fail (N-1) times, then I *must* succeed at the Nth time, right?2012-06-12
  • 0
    If so, I'm sorry for poorly formulating my question, for this is not what I wanted to ask. What I meant by "(regardless of whether I end up passing the exam or not)" was that the last time the test is taken has the very same probability of failing as all the others, which is to say that in the end, I could very well end up not passing the test even after N tries, whereas you're assuming that if I fail N-1 times, then the last time is necessarily a pass. My question actually considers that a school fixed the number of tries to N, so after N tries, you can end up passing or not.2012-06-12
  • 0
    To formulate differently one more time (in the hope that you will understand at least one of my formulations), I would say that the probability of succeeding the last time is no different than all the others, so it's P(X=N), rather than P(X>=N).2012-06-12
  • 1
    @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.2012-06-12
  • 0
    Thank you very much sir, I understand now. I have one last question. While I was trying to solve this problem on my own, I ended up with the solution $\sum_{k=0}^{N-1}p^k=\frac{1-p^N}{1-p}$. I see now that this isn't the solution, but I am still failing to see what that number represents, in plain English. What question (relative to the exam and the probability of passing it) would have this number as a solution ?2012-06-12
  • 1
    @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. http://en.wikipedia.org/wiki/Geometric_series has an introduction. I don't see an easy application of $\sum p^k$ in this problem.2012-06-12
  • 0
    Thank you. Your last comment was clear, all the while raising more questions, but that's just how knowledge works I guess. I marked the solution as solved. Feel free to answer this question though: what does 'this' refer to in 'this goes to zero' ? The sum surely doesn't converge to 0, it's a sum of positive integers.2012-06-13
  • 1
    @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.2012-06-13
  • 0
    Are you sure that your answer is different from mine ?! I made the calculus and I can't see the difference... I don't want to reproduce the whole calculus here, but if I'm wrong, please show me a value where they differ. edit: in my post above, I meant q, not p, sorry. So are you sure your answer doesn't simplify to $\sum (1-p)^k$ ?2012-06-13
  • 1
    @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$2012-06-13
  • 0
    The solution that I end up with is very simple: $\sum_{k=0}^{N-1} q^k$. Are you sure your solution, once simplified, doesn't give that ? I tried the first values, and they seem to be equal.2012-06-13
  • 1
    @TimZEI: No, my denominator will be of the form $(1-p)^2$ instead of $(1-p)$. This is because of the derivative. You can see the sum at http://www.wolframalpha.com/input/?i=sum+i+q^%28i-1%29+from+1+to+N&a=*C.N-_*Variable.dflt-&a=i_Variable2012-06-13
  • 0
    I very honestly think it's equal, I checked multiple times. Please check again yourself. The (1-q)^2 (and not (1-p)^2) that you talk about gets simplified with the p right before the derivative.2012-06-13
  • 0
    In the end, the answer that you propose, once simplified, is $\frac{1−q^{N−1}(N+q−Nq)}{1−q}+q^{N-1}N$, and this seems to be equal to $\sum^{N−1}_{k=0}q^k$. Once you see that this is equal, I'm very eager to see how you commentate that these two questions (the one I asked, and the one you gave: "the chance that you have not passed after N tries") are the same.2012-06-13
  • 1
    @TimZEI: I was trying to answer the question you asked-what is the expected number of hours of studying-not the chance that you don't pass by N tries. My comments about the chance that you don't pass by N tries were explaining the deletion of $p$ from the last term. So they should agree, as we are working on the same question. If you pass on try i, you study i hours. If you don't pass on N you study N hours.2012-06-13
0

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