Autocorrelation question I am trying to get an understanding of autocorrelation and I am having some issues  with trying to understand the process.

I have a Bernoulli process called $X[t]$. In this process, $P(X[t] = 1) = p$ and $P(X[t] = 0) = 1-p.$ 

We have a new process formed from $X[t]$ that is:

$$
Y[t] = \frac 12 \left(X[t] + X[t-1]\right)
$$

I have to find the autocorrelation $r_Y [t+\tau,t]$. Here's what I got so far:

\begin{align}
r_Y [t+\tau,t]&amp; = E\left(Y[t+\tau]Y[t]\right)\\
&amp;= \frac 14 E\left\{\left(X[t+\tau] + X[t+\tau-1]\right)\left(X[t] + X[t-1]\right)\right\}\\
&amp;= \frac 14 \left(r_X[t+\tau,t]+r_X[t+\tau,t-1]+r_X[t+\tau-1,t]+r_X[t+\tau-1,t-1]\right)
\end{align}
From there, I can get $r_x[t+\tau,t]$:

$$
r_X[t+\tau,t] =
  \begin{cases}
    p^2       &amp; \quad \text{if } \tau \neq 0\\
    p  &amp; \quad \text{if } \tau = 0\\
  \end{cases}
$$

But the wall that I am running into (and maybe it's because it's not making sense to me because of lack of sleep) is how you substitute that expression back into $r_Y[t+\tau,t]$? I know you end up with three different answers, but trying to substitute it back in seems to cause a mess for me. I am hoping someone will help me with that part.
It is helpful to realize that the auto-correlation of $X[t]$ does not depend on $t$, just on the time difference $\tau$. So we can write it as $r_X(\tau)$. Your result, which is correct, can then be written as

$$E(Y[t+\tau]Y[t])=\frac14\left(r_X(\tau)+r_X(\tau+1)+r_X(\tau-1)+r_X(\tau)\right)\tag{1}$$

Using the expression for $r_X(\tau)$, which is correctly given in your question, $(1)$ can be simplified to

$$E(Y[t+\tau]Y[t])=\begin{cases}\frac{p}{2}(1+p),&amp;\tau=0\\
\frac{p}{4}(1+3p),&amp;\tau\in\{-1,1\}\\p^2,&amp; \text{otherwise}\end{cases}$$

which is of course also independent of $t$.