# Computing the covariance function

I have an exercise, and the answer is given, but I can't figure out how they get to this answer. The question is: Let $$e_0,e_1, . . .$$ be a sequence of independent, identically distributed random variables with mean m and variance $$\sigma^2$$. Let $$\{X_t , t = 1, \dots\}$$ be the stochastic process defined by $$X_t = 1.2e_t + 0.9e_{t−1}$$. Compute the mean $$m_X (t) = E[X(t)]$$, and the covariance function $$r_X (s, t) = C[X_s, X_t ]$$. Show that $$\{X_t\}$$ is weakly stationary.

The part of the covariance function I just can't figure out. I'd think that I should compute it with this one: $$\operatorname{Cov}(X_s, X_t)=E[X_s*X_t]−E[X_s]⋅E[X_t]$$. This, however, won't give the answer I'm looking for.

This should be the solution

I hope someone can explain this to me!

We have $$X_t=ae_t+be_{t-1}$$ with $$a=1.2$$ and $$b=0.9$$. Let $$s\leqslant t$$. We will compute $$c_{s,t}:=\operatorname{Cov}(X_sX_t)$$. By linearity in each argument, $$c_{s,t}=a^2\operatorname{Cov}(e_s,e_t)+ab\operatorname{Cov}(e_se_{t-1})+ab\operatorname{Cov}(e_{s-1}e_t)+b^2\operatorname{Cov}(e_{s-1},e_{t-1})=A+B+C+D$$
• If $$s=t$$, then $$B=C=0$$ (by independence) and $$A=D=\sigma^2$$.
• If $$t=s+1$$, then $$A=D=C=0$$ (by independence again) and $$B=\sigma^2$$.
• If $$t\geqslant s+2$$, then $$A=B=C=D=0$$.