# Proof of variance of stationary time series

Suppose that $\{X_t\}$ is a weakly stationary time series with mean $\mu = 0$ and a covariance function $\gamma(h)$, $h \geq 0$, $\mathrm{E}[X_t] = \mu = 0$ and $\gamma(h)= \operatorname{Cov}\left(X_t, X_{t + h}\right) = \mathrm{E}\left[X_tX_{t + h}\right]$

Show that:

$$\operatorname{Var}\left( \frac{X_1 + X_2 +\ldots+ X_n}{n}\right) = \frac{\gamma(0)}{n} + \frac{2}{n}\sum_{u=1}^{n-1} \left( 1−\frac{m}{n}\right)\gamma(m).$$

So far, I've gotten this:

\begin{align} \operatorname{Var}(\bar X ) &= \frac{1}{n^2} \sum_{i=1}^{n} \sum_{j=1}^{n} \operatorname{Cov}(X_i,X_j) \\[7pt] &= \frac{1}{n^2} \sum_{i-j=-n}^{n} (n-|i-j|)\gamma(i-j) \\[7pt] &= \frac{1}{n} \sum_{m=-n}^{n} \left(1- \frac{|m|}{n}\right)\gamma (m) \end{align} How am I supposed to come up with the $\frac{\gamma(0)}{n} + \frac{2}{n}$?

• Hint: under stationarity, only the distance of two elements of the process matters for their covariance, not the direction. – Christoph Hanck Oct 13 '16 at 15:13
• related: stats.stackexchange.com/questions/154070/… your question + taking the limit – Taylor May 11 '18 at 13:01

You are almost there! Now you just need to recognise that auto-correlation only depends on the lag, so you have $$\gamma(m) = \gamma|m|$$, which means that the entire summand depends on $$m$$ only through $$|m|$$ (i.e., it is symmetric around $$m=0$$). This allows you to split the sum into the middle element ($$m=0$$) and two lots of the symmetric part ($$|m| = 1,...,n-1$$), which gives you:

\begin{aligned} \text{Var}(\bar{X}) &= \frac{1}{n} \sum_{m=-n}^{n} \Big( 1-\frac{|m|}{n} \Big) \gamma(m) \\[6pt] &= \frac{1}{n} \sum_{m=-n}^{n} \Big( 1-\frac{|m|}{n} \Big) \gamma|m| \\[6pt] &= \frac{1}{n} \Bigg[ \gamma(0) +2\sum_{|m|=1}^n \Big( 1-\frac{|m|}{n} \Big) \gamma|m| \Bigg] \\[6pt] &= \frac{\gamma(0)}{n} + \frac{2}{n} \sum_{m=1}^n \Big( 1-\frac{m}{n} \Big) \gamma(m) \\[6pt] &= \frac{\gamma(0)}{n} + \frac{2}{n} \sum_{m=1}^{n-1} \Big( 1-\frac{m}{n} \Big) \gamma(m). \\[6pt] \end{aligned}

(The last step follows from the fact that $$1-\tfrac{m}{n} = 0$$ for $$m=n$$.) This method of splitting symmetric sums around their mid-point is a common trick used in these kinds of cases to simplify the sum by taking it only over positive arguments. It is a worthwhile trick to learn in general.

first, fixing the definition of the problem, the index is $$m$$ instead of $$u$$, to make simpler I will use only the index $$i$$ and $$j$$.

We want to prove that

$$\operatorname{Var}\left(\frac{X_1+X_2+...+X_n}{n}\right) = \dfrac{\gamma(0)}{n} + \dfrac{2}{n} \sum_{i=1}^{n-1} \left(1−\dfrac{i}{n}\right) \gamma(i).$$

The begin is correct,

$$\operatorname{Var}(\bar{X}) = \dfrac{1}{n^2} \sum_{i=1}^n\sum_{j=1}^n \operatorname{Cov}(X_i,X_j)$$

We can notice that $$\operatorname{Cov}(X_i,X_j) = \operatorname{Cov}(X_j,X_i)$$ and, from our assumptions about the problem, that $$\operatorname{Cov}(X_i,X_i+h) = \operatorname{Cov}(X_i,X_i-h) = \gamma(h)$$ for any $$i$$ and $$h$$.

We can visualize the sum of covariances in $$i$$ and $$j$$ as follows

$$\left| \begin{array}{ccccc} \operatorname{Cov}(1,1) & \operatorname{Cov}(1,2) & \cdots & \operatorname{Cov}(1,n-1) & \operatorname{Cov}(1,n)\\ \operatorname{Cov}(2,1) & \operatorname{Cov}(2,2) & \cdots & \operatorname{Cov}(2,n-1) & Cov(2,n)\\ \vdots & \vdots & \ddots & \vdots & \vdots\\ \operatorname{Cov}(n-1,1)& \operatorname{Cov}(1,2) & \cdots & \operatorname{Cov}(n-1,n-1) &\operatorname{Cov}(n-1,n)\\ \operatorname{Cov}(n,1) & \operatorname{Cov}(n,2) & \cdots & \operatorname{Cov}(n,n-1) &\operatorname{Cov}(n,n) \end{array} \right|$$

What is equal to

$$\left| \begin{array}{ccccc} \gamma(0) & \gamma(1) & \cdots & \gamma(n-1)\\ \gamma(1) & \gamma(0) & \cdots & \gamma(n-2)\\ \vdots & \vdots & \ddots & \vdots\\ \gamma(n-1)& \gamma(n-2) & \cdots & \gamma(0)\\ \end{array} \right|$$

To sum all the elements we can first sum the main diagonal, and as it is symmetric sum twice the other diagonals

$$\sum_{i=1}^n\sum_{j=1}^n \operatorname{Cov}(X_i,X_j) = n \gamma(0) + 2\sum_{i=1}^{n-1}(n-i)\gamma(i)$$.

Back to the main equation

$$\operatorname{Var}\left(\frac{X_1+X_2+...+X_n}{n}\right) = \dfrac{\gamma(0)}{n}+\dfrac{2}{n^2}\sum_{i=1}^{n-1}(n-i)\gamma(i) = \dfrac{\gamma(0)}{n}+\dfrac{2}{n}\sum_{i=1}^{n-1}(1-\dfrac{i}{n})\gamma(i).$$