# Reward for tossing a tail followed by head .

A sequence of independent tosses of a biased coin at times $t = 0, 1, 2,...$ On each toss, the probability of a ’head’ is $p$, and the probability of a ’tail’ is $1 − p$. A reward of one unit is given each time that a ’tail’ follows immediately after a ’head.’ Let $R$ be the total reward paid in times $1, 2, ..., n$ . We have to find $E[R]$ and $var(R)$ .

What I did for finding the $E[R]$ :

Let $I_k$ be the reward paid at time $k$ . We have

$E[I_k]= P(I_k =1) = P(T\ at\ time\ k\ and\ H\ at\ time\ k −1) = p(1−p)$ .

$E[R] = E[\sum_{k=0}^nI_k] = np(1-p)$

After this I am stuck . I am not able to find the variance . Please help me out .

-

For the variance, we use the method of indicator random variables that you used to find the mean. We have $R=\sum_{1}^n I_k$. If we can find $E(R^2)$, we will be nearly finished.

Note that $R^2=\sum_1^n I_k^2 +2\sum_{1\le i< j\le n} I_iI_j$. You have already done the calculation of $E(\sum_1^n I_k^2)$, since $I_k^2=I_k$.

The mixed terms are more complicated. As usual the expectation of the sum is the sum of the expectations, but the expectations are not all equal.

If $j=i+1$, then $I_iI_j=0$. If $j\gt i+1$, then $I_iI_j=1$ with probability $p^2(1-p)^2$. Now it is just a matter of counting. It is more efficient to sum $p^2(1-p)^2$ over all pairs $i\lt j$, and subtract the sum of all $p^2(1-p)^2$ over the $n-1$ consecutive pairs.

-
I have just one more doubt . Please explain me how $I_iI_j = 0$ when $j = i+1$ – AbKDs Dec 2 '13 at 15:44
Look for example $i=2$, $j=3$. If $I_2=1$, we had tail at $1$ and head at $2$. But then $I_3=0$, since for $I_3=1$ we need tail on $2$. Thus $I_i$ and $I_{i+1}$ can never be both $1$, so their product is always $0$. – André Nicolas Dec 2 '13 at 15:59
Thank you @André Nicolas – AbKDs Dec 2 '13 at 16:09
You are welcome. The method of indicator random variables is powerful. – André Nicolas Dec 2 '13 at 16:10

If you can't find a clever way to get the variance, the formula for the distribution is given here http://www.qbyte.org/puzzles/p145s.html and you can probably use maths to extract the variance from the distribution.

-