# Finding covariance functions of models

Trying to calculate the covariance function for $$x_t$$

$$x_t = \frac{1}{3}a_t+\frac{1}{3}a_{t-1}, \space a_t \thicksim NID(0, \sigma^2_{a})$$

$$\gamma_x(0) = cov(x_t, x_t) \\= var(x_t) \\= var (\frac{1}{3}a_t+\frac{1}{3}a_{t-1}) \\= \frac{1}{9}var(a_t) + \frac{1}{9}var(a_t-1) \\= \frac{2}{9}\sigma^2_{a}$$

I understand up to this part.

This is where I am confused.

$$\gamma_x(1) = cov(x_t, x_{t+1})\\ = cov(\frac{1}{3}a_t+\frac{1}{3}a_{t-1}, \frac{1}{3}a_{t+1} + \frac{1}{3}a_t) \\ = \frac{1}{9}cov(a_t, a_t)\\ = \frac{1}{9}var(a_t) \\=\frac{1}{9}\sigma^2_{a}$$

So my question is, how does $$cov(\frac{1}{3}a_t+\frac{1}{3}a_{t-1}, \frac{1}{3}a_{t+1} + \frac{1}{3}a_t)$$ simplify to $$\frac{1}{9}cov(a_t, a_t)\\$$?

• What does NID mean? – user158565 May 27 '19 at 4:32
• Normally and independently distributed. It's like IID (identically and indep...). – gunes May 27 '19 at 8:32
• If you've found the answer below helpful, please don't to forget to upvote and accept it. – Martin Modrák May 29 '19 at 12:08

Covariance is distributive: \begin{align}\gamma(1) &=\frac{1}{9}\operatorname{cov}\left(a_t+a_{t-1}, a_{t+1}+a_t\right) \\ &= \frac{1}{9}(\operatorname{cov}(a_t,a_{t+1})+\operatorname{cov}(a_t,a_{t})+\operatorname{cov}(a_{t-1},a_{t+1})+\operatorname{cov}(a_{t-1},a_{t}))\\ &= \frac{1}{9}(0+\operatorname{cov}(a_t,a_t)+0+0)\\ &= \frac{1}{9}\operatorname{cov}(a_t,a_t)\end{align} $$\operatorname{cov}(a_t,a_{t+k})=0$$ when $$k\neq0$$ because $$a_t$$'s are independent. You've also implicitly assumed this in the calculation of $$\gamma(0)$$.