# Finding the mean function of a time series. Question 1.6 in Shumway Stoffer Time Series Analysis.

I am self studying time series analysis with Shumway Stoffer text. I am stuck on Question 1.6.

Consider the time series

$$x_t = \beta_1 + \beta_2 t + w_t$$

where $$\beta_1$$ and $$\beta_2$$ are known constants and $$w_t$$ is a white noise process with variance $$\sigma^2_w$$.

Show that the mean of the moving average

$$v_t=\frac{1}{(2q+1)} \sum_{j=-q}^{q} x_{t-j}$$

is $$\beta_1+\beta_2t$$, and give a simplified expression for the autocovariance function.

What I have is

$$\mu_{t-j} = E(x_{t-j}) = \beta_1 + \beta_2 t - \beta_2 j$$

$$E[v_t] =\frac{1}{(2q+1)} \sum_{j=-q}^{q} E(x_{t-j})=\frac{1}{(2q+1)} [2q (\beta_1 + \beta_2 t) + \sum_{j=-q}^{q} \beta_2 j]$$

seems like it should be easy from here, but I just can't see it.

$$\mu_{t-j} = E(x_{t-j}) = \beta_1 + \beta_2 t - \beta_2 j$$

$$\sum_{j=-q}^{q} \beta_2 j = 0$$ because of symmetry

And note there are $$2q + 1$$ terms in series $$j = -q,...,q$$

So we have

$$E[v_t] =\frac{1}{(2q+1)} \sum_{j=-q}^{q} E(x_{t-j})$$

$$=\frac{1}{(2q+1)} [(2q +1) (\beta_1 + \beta_2 t) + \sum_{j=-q}^{q} \beta_2 j]$$

$$= \frac{2q + 1}{2q+1} \beta_1+\beta_2 t$$

$$= \beta_1+\beta_2 t$$