# how to show that random variable is almost surely finite? Coin toss problem

Consider the Coin toss problem, i.e. let $$Z_{i} : \Omega \rightarrow \{0,1\}$$ with $$Z_{i}\left(\omega\right) = \begin{cases} 1 & \text{if }\omega = H\\ 0 & \text{if } \omega = T \end{cases}$$ be the outcome of the $$i$$-th coin toss with $$\Omega = \{H,T\}$$. Assume all the $$Z_{i}$$ are independent and identical distributed with $$\mathbb{P}(Z_{i} = 1) = \mathbb{P}(Z_{i} = 0) = \frac{1}{2}.$$ Now define $$R := \min \{k\geq 1 \mid Z_{k} = 1,Z_{k+1} = 0,Z_{k+2} = 1, Z_{k+3} = 0\}.$$ $$R$$ is the number of tosses to get the pattern HTHT.

My question ist how to show that $$R$$ is almost surely finite. Any hints?

1. Show that $$A_k := \{Z_{4k}=0, Z_{4k+1}=1, Z_{4k+2}=0, Z_{4k+3}=1\}$$ satisfies $$\mathbb{P}(A_k) = 1/16$$ for each $$k \in \mathbb{N}$$.
2. Show that the events $$A_k$$, $$k \geq 1$$, are independent.
3. It follows from Step 1 that $$\sum_{k \geq 1} \mathbb{P}(A_k) = \infty.$$ Apply the Borel Cantelli lemma (using Step 2) to conclude that $$\mathbb{P}(A_k \, \, \text{infinitely often})=1.$$
4. Conclude that $$\mathbb{P}(R<\infty)=1$$.
• Is this correct? $\mathbb{P}(R = \infty) = \mathbb{P}(\lim\limits_{n \to \infty}\inf A_{n}^{c}) = 1 - \mathbb{P}(A_{n}~~ \text{infinitely often}) = 0$ – user562724 Nov 7 '18 at 21:05
• @love_math It is correct that $\mathbb{P}(R=\infty)=0$ (simply because $\mathbb{P}(R=\infty) = 1-\mathbb{P}(R<\infty)$) but the other equations are not correct. For instance $\mathbb{P}(R=\infty) = \mathbb{P}(\liminf_n A_n^c)$ does not hold true. – saz Nov 7 '18 at 21:13
• @love_math $\mathbb{P}(A_n \, \, \text{infinitely often})=1$ tells us, in particular, that for almost every $\omega$ we can find $n \in \mathbb{N}$ such that $\omega \in A_n$ (in fact there are infinitely many such $n$, but we are fine with one). As $A_n \subseteq \{R<\infty\}$ this implies $\omega \in A_n \subseteq \{R<\infty\}$, i.e. $R(\omega)<\infty$. – saz Nov 7 '18 at 21:20
• @love_math We only have $\{R=\infty\} \color{red}{\subseteq} \bigcap_{m \geq 1} A_m^c$ (for instance, if $Z_2(\omega)=1$, $Z_3(\omega)=0$, $Z_4(\omega)=1$, $Z_5(\omega)=0$ for some $\omega$, then $R(\omega)<\infty$ but $\omega \in \bigcap_{m \geq 1} A_m^c$ ... this shows that $\bigcap_m A_m^c$ is stricly larger than $\{R=\infty\}$.) Apart from that, your reasoning is correct, I think. (Note that with the correction which I mentioned you still get the desired result $\mathbb{P}(R=\infty)=0$.) – saz Nov 10 '18 at 7:32