4

Independent trials, each of which is a success with probability p, are performed until there are k consecutive successes. What is the mean of the number of the necessary trials?

Let $N_k$ be the number of trials needed to get k successive successes.

While I am convinced that to answer this problem we should start by doing $$M_k = E[N_k]= E[E[N_k|N_{k-1}]]$$ like explained in another post on StackExchange(See Expectation by conditioning) I don't understand how to complete the solution. The suggested solution is $$\begin{align} M_k &= E[N_k]\ (line1 ) \\&= E[E[N_k|N_{k-1}]] \ (Line 2) \\&=E[p(N_{k-1}+1)+q[N_{k-1}+1+E[N_k]]] \ (line3) \\ &=E[N_{k-1}+1+qE[N_k]] \ (Line 4 ) \\ &=E[N_{k-1}]+1+qE[N_k] \ (Line 5 ) \\&= M_{k-1}+1+qM_{k} \ (Line 6 ) \\&=\frac{1}{p}+\frac{M_{k-1}}{p} \ (Line 7 ), M_0=0 \end{align}$$

What I don't understand is $(line3)$ especially $ q* [N_{k-1}+1+E[N_k]]$

Please someone could provide me an explanation ?

Thank you

Youssef
  • 109
  • 1
  • 10

1 Answers1

2

When given that it took $N_{k-1}$ trials to obtain $k-1$ consecutive successes, then in the very next trial :

  • With probability $p$ we expect another success, so it has taken $N_{k-1}+1$ trials to find $k$ consecutive successes .

  • With probability $q$ we expect to have failed to find it in $N_{k-1}+1$ trials, but find it in a further $\mathsf E(N_{k})$ trials.

So by Law of Total Expectation: $$\begin{split}\mathsf E(N_{k}\mid N_{k-1}) & = p~(N_{k-1}+1)+q~(N_{k-1}+1+\mathsf E(N_{k}))\\&= (N_{k-1}+1)+q~\mathsf E(N_k)\end{split}$$

Graham Kemp
  • 129,094
  • I read $q (N_{k+1}+E(N_{k+1}))$ as we expect to have failed to find it in $N{k+1}$ trials OR to find it in a further E_{k=1} trials. Could you clarify for me this point? – Youssef Sep 20 '18 at 00:11