What is the intuition behind calculating the error of sum of squares and square of a shifted sum using moving averages?

17 Views Asked by At

Given $\mathbf{v} \in \mathbb{R}^d$ and $\beta \in \mathbb{R}$, then the following holds:

$$ \begin{aligned} \sum_{i=1}^{d}v_i^2 -\frac{ \Big( (\sum_{i=1}^dv_i)-\beta \Big)^2 }{d} &= \beta(2w_1-\beta) + \sum_{i=2}^d \frac{i-1}{i} \Big( w_i - \frac{ (\sum_{j=1}^{i-1}w_j)-\beta }{i-1} \Big)^2 \end{aligned} $$ for $\mathbf{w}=\pi(\mathbf{v})$ where $\pi(\cdot)$ is an arbitrary permutation of components in $\mathbf{v}$. For example, $\mathbf{v}=[1, -5, 6]^{\top}$ then $\mathbf{w}$ can be $[-5, 1, 6]^{\top}$, $[6, -5, 1]^{\top}$, etc.

Question

What is the intuition behind calculating the error of sum of squares and square of a shifted sum?

My observation

The formula to me looks like calculating the error on the left hand side using moving averages on the right hand side as if it is a time series. The larger the $d$ the smaller the effect of $\beta$ would be in the long run. No matter what components you start with, eventually you would get the same answer.

Note

Please sure your thoughts as a comment until we get enough information that can be posted as the solution.