0
$\begingroup$

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$ !!!

$\endgroup$
0
$\begingroup$

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$.

The intuition is that a low chance of the run containing 1s precisely cancels the high expected length if it does.

New contributor
RandomMaths is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.