# Formally showing $2\sum_{j=1}^{T-1}\sum_{t=1}^{T-j}x_t x_{t+j} = \sum_{i=1}^{T}x_i( \sum_{j\not=i} x_j)$

Or, if it isn't true please tell me, as I messed up earlier. But I think I may have gotten it correct this time.

Here is what I did; any suggestions (particularly on how I can state things more formally) is much appreciated.

Notice that, for a given $j$, $x_i \in \sum_{t=1}^{T-j}x_t x_{t+j}$ if $i+j\leq T$. Therefore, each $x_i$ appears in $(T-i)$ terms. Thus, we can write $$\sum_{j=1}^{T-1} \sum_{t=1}^{T-j}x_t x_{t+j} = \sum_{i=1}^{T-1} x_i (\sum_{j=i+1}^{T}x_j)$$ But we also have that (using the fact that if $x_j$ must show up in $(j-1)$ terms of the form $x_jx_{i<j}$ for all $i\in \{1,\dots,j-1\}$) $$\sum_{i=1}^{T-1} x_i (\sum_{j=i+1}^{T}x_j) = x_T\sum_{i=1}^{T-1} x_i +x_{T-1}\sum_{i=1}^{T-2} + \dots +x_{3}\sum_{i=1}^2x_i + x_1x_2 = \sum_{i=1}^{T}x_i ( \sum_{j=1}^{i-i}x_j)$$ Putting this together we have that $$2\sum_{j=1}^{T-1}\sum_{t=1}^{T-j}x_t x_{t+j} = \sum_{i=1}^{T-1}x_i(\sum_{j=i+1}^T x_j) + \sum_{i=1}^T x_i( \sum_{j=1}^{i-1}x_j) = \sum_{i=1}^{T-1}x_i( \sum_{j\not=i} x_j) + x_T\sum_{i=1}^{T-1}x_j$$ which can be further simplified to $$\sum_{i=1}^{T}x_i( \sum_{j\not=i} x_j)$$

OPs approach is correct. Here is a somewhat more formal derivation.

We obtain \begin{align*} \sum_{j=1}^{T-1}\sum_{t=1}^{T-j}x_tx_{t+j}&=\sum_{j=1}^{T-1}\sum_{t=j+1}^Tx_{t-j}x_t\tag{1}\\ &=\sum_{1\leq j<t\leq T}x_tx_{t-j}\tag{2}\\ &=\sum_{1\leq j<t\leq T}x_tx_j\tag{3}\\ &=\frac{1}{2}\sum_{{1\leq t,j\leq T}\atop{t\ne j}}x_tx_j\tag{4}\\ &=\frac{1}{2}\sum_{t=1}^{T}\sum_{{j=1}\atop{j\ne t}}^{T}x_tx_j\tag{5} \end{align*} and the claim follows.

Comment:

• In (1) we shift the index of the inner sum by $j$.

• In (2) we use another representation of (1) to better see the range of summation. We do not change anything.

• In (3) we replace $j \rightarrow t-j$.

• In (4) we use the symmetry when exchanging $i$ with $j$. More explicit \begin{align*} \sum_{1\leq j<t\leq T}x_tx_j=\sum_{1\leq t<j\leq T}x_tx_j=\frac{1}{2}\sum_{{1\leq t,j\leq T}\atop{t\ne j}}x_tx_j \end{align*}

• In (5) we do not change anything. We just use another representation of (4).

• Thanks. This is what I was looking for. And I appreciate the comments: I probably would have had some trouble understanding some of the steps if you hadn't included the comments. – user106860 Nov 24 '16 at 17:33
• @user106860: You're welcome! Good to see, the answer is helpful. :-) – Markus Scheuer Nov 24 '16 at 23:32