Biased coin find expected length of second run

conditional-expectationexpected valueprobabilityself-learning

a maximal subsequent of consecutive flips having identical outcomes is called a run.

Let a biased coin have probabilities $P(H)= \frac{1}{4}, P(T) = \frac{3}{4}$. Find the expected length of the second run.

Let $R_1, R_2$ be the lengths of the first and second runs, resp. I believe I should be using double expectation to solve; namely, $E[R_2] = E[E[R_2\mid R_1]$

So $P(R_1 = k) = (3/4)^k(1/4) + (1/4)^k(3/4)$.

I tried to use this question to solve but I seem to make an error is calculating my double expectation.

$E[R_2] = \sum_{k=1}^\infty E[R_2\mid R_1 = k]((3/4)^k(1/4) + (1/4)^k(3/4)) \\ = \sum_{l = 1}^\infty \sum_{k=1}^\infty l P(R_2=l,R_1=k)$

$P(R_2=l,R_1=k) = (3/4)^{k+1}(1/4)^{l} + (3/4)^{l}(1/4)^{k+1}$

Yet summing here I don't get $E[R_2]=2$ whereas the linked question states I should get $2$.

Best Answer

Can't really follow your calculation. Conditioning on $R_1$ seems like a poor idea..the length of $R_1$ is a proxy for the value of the first toss, but it's not a good one. I'd just condition on the value of the first toss directly.

The first run is either Heads of Tails (whichever is tossed first).

Case I: the first run is Heads.

This occurs with probability $\frac 14$. Once you get your first $T$ the expected number of throws until you see $H$ again is $4$. Thus the expected run of Tails is $4$.

Case II. the first run is Tails.

This occurs with probability $\frac 34$. Once you get your first $H$ the expected number of throws until you see $T$ again is $\frac 43$. Thus the expected run of Heads is $\frac 43$.

It follows that the answer is $$\frac 14\times 4+\frac 34\times \frac 43=2$$

Note that this computation yields $2$ regardless of what you take for the probability of throwing $H$.