# Finding covariance of this random variables

I could find the mean and variance but I found some difficulties in computing the covariance of the following random variables.

Here is the problem:

Suppose $Y_1,Y_2,\ldots$ are i.i.d RVs with $\mathbb{E}Y_i=\mu$ and Var$(Y_i)=\sigma^2\in(0,\infty)$. Set $X_k:=Y_k-3Y_{k+1}+Y_{k+2},k=1,2,\ldots$, and put $S_n:=X_1+\dots+X_n$. Compute Cov$(X_j,X_k)$ for $j\not=k$.

Here is my attempt:
We let $\tilde{Y_j}:=Y_j-\mu$ (so that $\mathbb{E}\tilde{Y_j}=0$), then we have Cov$(X_j,X_k)=\mathbb{E}(\tilde{Y_j}-3\tilde{Y_{j+1}}+\tilde{Y_{j+2}})(\tilde{Y_k}-3\tilde{Y_{k+1}}+\tilde{Y_{k+2}})$.

I know that we have to separate into cases of different values of $|j-k|$, but I am not sure how to proceed. I am a bit confused in manipulating random variables with indexes. Any helps on the detailed workings will be really appreciated.

Many many thanks!

-
I believe your approach is correct. It's just tedium; you have to consider all the cases where two R.V.s that are being multiplied with one another are (in)dependent. – par May 27 '13 at 6:24
@par. Yes, you are right. Thanks. – user71346 May 27 '13 at 10:34
So what do you need $S_n$ for in the question? – wolfies May 27 '13 at 11:59

We can assume that $j> k\geq 1$. Using that the covariance is bi-linear we obtain the expression: \begin{align*} \mathrm{Cov}(X_j,X_k)=&\mathrm{Cov}(Y_j,Y_k)-3\mathrm{Cov}(Y_j,Y_{k+1})+\mathrm{Cov}(Y_j,Y_{k+2})-3\mathrm{Cov}(Y_{j+1},Y_k)\\ +&9\mathrm{Cov}(Y_{j+1},Y_{k+1})-3\mathrm{Cov}(Y_{j+1},Y_{k+2})+\mathrm{Cov}(Y_{j+2},Y_k)\\ -&3\mathrm{Cov}(Y_{j+2},Y_{k+1})+\mathrm{Cov}(Y_{j+2},Y_{k+2}). \end{align*} Now, use that $\mathrm{Cov}(Y_i,Y_j)=0$ whenever $i\neq j$ (due to independence). This allows you to deal with seperate cases: $j=k+1$, $j=k+2$ and lastly $j>k+2$.

-
Thank you for the help. Just spotted a minor mistake, the coefficient 9 should be positive, and there is no case for $j=k$ since $j\not=k$ is given in the question. But thanks very much, it is very helpful :) – user71346 May 27 '13 at 10:33
@user71346: You're welcome, and thanks for pointing out the mistakes. – Stefan Hansen May 27 '13 at 10:43

Start by expanding the two parenthesis under the expectation. Alternatively, save a bit of time by using the fact that covariance is multilinear:

$$\mbox{Cov}(aX+bY,cR+dS)=ac\mbox{Cov}(X,R)+ad\mbox{Cov}(X,S)+bc\mbox{Cov}(Y,R)+bd\mbox{Cov}(Y,S)$$

and that two independent random variables have zero covariance.

-
Thank you for the help. – user71346 May 27 '13 at 10:30