# Expected value of second run in a sequence of coin tosses

Let $$(X_n)_{n\in\mathbb{N}}$$ be independent random variables that are equal to $$1$$ with probability $$p$$ and to $$0$$ with probability $$q = 1-p$$. A run is a sequence $$(X_{k}, \cdots, X_{k+l})$$ where $$k,l\in\mathbb{N}$$ such that $$X_{k} = \cdots = X_{k+l} \neq X_{k+l+1}$$. Let $$L_{j}$$ be the length of the $$j^{th}$$ run ($$l+1$$ here).

Calculating the expected value of $$L_{2j}$$, for $$j\in\mathbb{N}^{*}$$, will always yield $$2$$, whereas the expected value of $$L_{2j+1}$$ is $$\frac{p}{q} + \frac{q}{p}$$. Is there an intuitive explanation as to why even runs have an expectation that is independent of p? It is a result I find quite suprising.

Outline of proof of my statement for $$L_{1}$$ and $$L_{2}$$:

1) $$P(S_1 = k) = p^kq + q^kp$$   so  $$E(S_{1})=q\sum_{k=1}^{+\infty}{kp^k} + q\sum_{k=1}^{+\infty}{kp^k}=q\frac{p}{q^2} + p\frac{q}{p^2} = \frac{p}{q} + \frac{q}{p}$$

2)$$P((S_1, S_2) = (k,l)) = P(X_{1}=\cdots=X_k=0, X_{k+1}=\dots=X_{k+l}=1, X_{k+l+1}=0) + P(X_1=\cdots=X_k=1, X_{k+1}=\dots=X_{k+l}=0, X_{k+l+1}=1)$$ So $$P((S_1, S_2)=(k,l)) = p^lq^{k+1} + q^{l}p^{k+1}$$ and summing yields $$P(S_2 = k) = p^{k-1}q^2 + q^{k-1}p^2$$ and $$E(S_2) = 2$$ !!!

The runs alternate between 0s and 1s, so the probability that the 2jth run is in 1s is the probability that the first run is in 0s - that is 1-p. In this case, the expected length of the run is $$\sum_{n=0}^\infty p^n=1/(1-p)$$.
Likewise, the probability that the 2jth run is in 0s is p, with expected length $$\sum_{n=0}^\infty (1-p)^n=1/p$$, so the total expectation is $$(1-p)/(1-p)+p/p=2$$.