Suppose we toss a fair coin infinite number of times so we get the independent and identically distributed r.v sequence $(X_n)_{n \ge 1}$ such that :

$P(X_n=0 (tails))=P(X_n=1(head))=0.5$

Let $Y_n=X_n+X_{n-1}$ for $n \ge 2$

Calculate the probabilities $P(Y_4=0 \;|\; Y_2=0,Y_3=1)$ and $P(Y_4=0 \;|\;Y_3=1)$

My attempt:

For $n \ge 2$, $Y_n=0$ iff $X_n=X_{n-1}=0$ and $Y_n = 1$ iff $X_n=1$ or $X_{n-1}=1$

Based on that:

$P(Y_4=0 \;|\; Y_2=0;Y_3=1)=0$ because if $Y_4=Y_2=0$ then $Y_3$ has to be $0$.

$P(Y_4=0 \;|\; Y_3=1)=\cfrac{P(X_2=1)}{P(X_2=1)+P(X_3=1)}=0.5$

Is my reasoning correct? If not, what's my mistake?


$\begin{align} P(Y_4 = 0 \;|\; Y_3 = 1) &= \frac{P(Y_4 = 0, Y_3 = 1)}{P(Y_3 = 1)} \\ &= \frac{P(X_4 = X_3 = 0, X_3 + X_2 = 1)}{P(X_3 + X_2 = 1)} \\ &= \frac{P(X_4 = X_3 = 0, X_2 = 1)}{P((X_3 = 0, X_2 = 1)\cup(X_3 = 1, X_2 = 0))} \\ &= \frac{P(X_4 = 0)P(X_3 = 0)P(X_2 = 1)}{P(X_3 = 0, X_2 = 1) + P(X_3 = 1, X_2 = 0)} \\ &= \frac{P(X_4 = 0)P(X_3 = 0)P(X_2 = 1)}{P(X_3 = 0)P(X_2 = 1) + P(X_3 = 1)P(X_2 = 0)} \\ &= \frac{\frac{1}{8}}{\frac{1}{4} + \frac{1}{4}} = \frac{1}{4} . \end{align}$

So, your second derivation is incorrect. The result of your first derivation is correct, i.e., $ P(Y_4 = 0 \;|\; Y_2 = 0; Y_3 = 1) = 0 $, but the argument is not completely rigorous: you have to argue that because $ (Y_2 = 0; Y_3 = 1) \implies X_1 = X_2 = 0 \text{ and } X_3 = 1 $, $ Y_4 = X_3 + X_4 $ cannot be $ 0 $. There is a subtle difference compared to your argument.


$ \small P(Y_4=0 \;|\; Y_2=0,Y_3=1)=0~$ is correct. As $Y_2 = 0$ and $Y_3 = 1$, we must have $X_3 = 1$ and that means $Y_4$ cannot be $0$.

For the second one, your application of Bayes' theorem is not correct.

$ \small P(Y_4 = 0 \cap Y_3 = 1) = P(X_4 = 0) \times P(X_3 = 0) \times P(X_2 = 1) = 0.5 \times 0.5 \times 0.5$

$ \small P(Y_3 = 1) = P(X_2 = 1) \times (PX_3 = 0) + P(X_2 = 0) \times (PX_3 = 1) = 0.5 \times 0.5 + 0.5 \times 0.5 = 0.5$

So, $ \small \displaystyle P(Y_4 = 0 \mid Y_3 = 1) = \frac{P(Y_4 = 0 \cap Y_3 = 1)}{P(Y_3 =1)} = \frac{0.5 \times 0.5 \times 0.5}{0.5} = 0.25$