# Autocovariance Function

#### panderson

##### New Member
Hey there!

I have a question relating to Applied Time Series that I'm having a bit of trouble with.

For all parts of this question, let $$Z_t; t \geq 0$$ be a sequence of independent normal variables with mean 0 and variance $$\sigma^2$$, and let a, b and c be constants.

For the series given by $$aZ_t+bZ_{t-1}+cZ_{t-4}+c$$ find its mean and autocovariance functions.

I was okay finding the mean
$$\mu_x (t)=E[X_t ]=E[aZ_t+bZ_{t-1}+cZ_{t-4}+c]$$
$$=E[aZ_t]+E[bZ_{t-1}]+E[cZ_{t-4}]+E[c]$$
$$=c$$

but I'm getting really confused with the covariance.

At the moment this is what I think I need to do:

$$\gamma_x(t,t+h) = Cov(X_t, X_{t+h})$$
$$= E[X_tX_{t+h}]-\mu^2_x$$

so then after I have expanded it all out and whatnot I end up with 0? Just want to check whether this is correct or if I've managed to royally stuff that up!

P.S. if my math is in fact correct that makes this a stationary time series as the mean is constant and the covariance does not depend on t?

#### Dason

It shouldn't come out to be 0 for all values of h. You can figure it out for an arbitrary value of h up to a point but then at some point you need to start plugging in values for h.

#### panderson

##### New Member
Okay right so does that mean that:

$$\gamma_x(h) = \gamma_x(t,t+h) =$$
$$a^2\sigma^2$$ if h=0,
$$b^2\sigma^2$$ if |h|=1,
$$c^2\sigma^2$$ if |h|=4, and
0 for all other h

or is that not right?

#### BGM

##### TS Contributor
You need to count more carefully. E.g. at $$|h| = 0$$, (which you are calculating the variance)

$$\gamma(0) = (a^2 + b^2 + c^2)\sigma^2$$.

And yes you just need to count up to $$|h| = 4$$. But do not miss the $$|h| = 3$$ case.

Make sure you double check your solutions again.