Sum of two differences squared

I have been told that given a sequence of two independent random variables ($y_{i1}$, $y_{i2})$ with means $u_i$ (same mean for $y_{i1}$ and $y_{i2}$) and variance $\psi$ (same variance for all) that the following is true:

$\sum_{i=1}^{n}[(y_{i1} - \hat{u_i})^2 + (y_{i2} - \hat{u_i})^2]$ = $\frac{1}{2}\sum_{i=1}^{n}(y_{i1} - y_{i2})^2$

Is this correct, and if so, can someone help me see the connection?

Update: my previous equation was missing hats on the u's. plugging in:
$\hat{u_i} = \frac{y_{i1} - y_{i2}}{2}$. as determined from the pdf, the solution is just some algebra.

Here's a counter example

\begin{align} y_1 = \{1, 1, -1\} \\ y_2 = \{1, -1, 1\} \end{align}

Both have the same mean ($\mu = 1/3$) and variance (4/3)

And

$$\sum_i (y_{i1} - \mu)^2 + (y_{i2} - \mu)^2 = 16/3$$

whereas

$$\frac{1}{2}\sum_i(y_{i1} - y{i2}) = 4$$

• Thanks for your answer. As I delved a little more, I found I had missed a detail specific for this question that made it work. Nov 15, 2016 at 14:26
• Perhaps you want to add and edit to your question, now that you have more information about the problem Nov 15, 2016 at 14:33