Finding expectation via indicator variables

expected value

This is not homework. I am not a student. Consider a sequence of independent tosses of a biased coin at times k=0,1,2,…,n. On each toss, the probability of Heads is $p$, and the probability of Tails is $1−p$ .

A reward of one unit is given at time k, for k∈{1,2,…,n}, if the toss at time k resulted in Tails and the toss at time k−1 resulted in Heads. Otherwise, no reward is given at time k.

Let $I_k$ denote the reward (possibly 0) given at time k, for $k∈{1,2,…,n}$. Let R be the sum of the rewards collected at times $1,2,…,n$. Suppose p=3/4 and n=10.

I understand that $E(I_k) = P(HT) = 3/16$
so, $E(R) = \sum (E(I_k)) =10(3/16)$. But I've got no idea how to even begin on $E(R^2)$
The given answer is $4.40625$ which comes out to be $141/32$

Best Answer

If you multiply out $R^2$ you get two types of terms: $I_k^2$ and $I_jI_k$ for $j\ne k$. Since $I_k$ takes only the values $0$ and $1$, $I_k^2=I_k$, so you know how to deal with that. $I_jI_k$ for $j\ne k$ is $1$ exactly if both $I_j$ and $I_k$ are $1$. There are two cases here. If $|j-k|=1$, then $I_j$ and $I_k$ cannot both be $1$. If $|j-k|\gt1$, then $I_j$ and $I_k$ are independent, so $E[I_jI_k]=E[I_j]E[I_k]$, and you know how to deal with that. All that’s left is to count each type of pair and add up the contributions.

Related Question