Derivation of expression for mean number of toss to get r heads

61 Views Asked by At

I am independently working through Grimmet and Welsh's "Probability: an introduction" and am having some difficulty solving a question in chapter 2, namely 2.6.2.

Problem statement: "Each toss of a coin results in heads with probability p(>0). If $m(r)$ is the mean number of tosses up to and including the $r^{th}$ head, show that $ m(r) = p[1+ m(r-1)] + (1-p)[1+m(r)]$. Def: $q = 1-p$

Solution attempt: I interpret the mean as a special case of the expectation value. Defining according to a geometric distribution, the probability of the number of tosses, $k$, required to get $r$ heads is $P(X=k) = p^rq^{k-r}$. Rearranging the expression given in the problem statement, we can get

$$ m(r) - m(r-1) = \frac{p+q}{p} $$

So basically I interpret this as saying that the difference between the expectation value of $r$ heads and $r-1$ heads needs to be $\frac{p+q}{p}$. Then (cutting out some algebra),

$$ E_r(X) = \sum_{k=0}^{\infty}kp^rq^{k-r} = q\left(\frac{p}{q}\right)^r\frac{1}{(1-q)^2} $$

and

$$ E_{r-1}(X) = \frac{1}{pq}\sum_{k=0}^{\infty}kp^rq^{k-r} = \frac{q}{pq}\left(\frac{p}{q}\right)^r\frac{1}{(1-q)^2} $$

and the difference becomes:

$$ \frac{1}{(1-q)^2}\left(\frac{p}{q}\right)^r(q-\frac{q}{pq}) $$

I can't get this to reduce to the problem's request, so I'm missing something somewhere. Any tips are appreciated!