$$V(Y) = \sum_{i=1}^N\sum_{j=1}^N [\frac{N^2}{n^2}] (Y_i-Y_j)^2 \frac{n(N-n)}{N(N-1)} $$ for $i< j$
Equation(2.5) $$=(\frac{(N-n)}{n(N-1)})\sum_{i=1}^N \sum_{j=1}^N (Y_i-Y_j)^2 $$ for $i< j$
we know that $$\sum_{i=1}^N \sum_{j=1}^N a_{ij} =\sum_{i=1}^N a_{ii} +2 \sum_{i=1}^N\sum_{j=1}^N a_{ij}$$ if $a_{ij}=a_{ji}$ for $i<j$
using this above identity in thi right hand side of (2.5), we get,
$$ V(Y) = \frac{(N-n)}{2n(N-1)} \left\{ \sum_{i=1}^N\sum_{j=1}^N (Y_i -Y_j)^2 -\sum_{i=1}^N (Y_i - Y_i)^2\right\} $$
$$ = \frac{(N-n)}{2n(N-1)} \left\{2 \sum_{i=1}^N\sum_{j=1}^N Y_i^2 -2\sum_{i=1}^N\sum_{j=1}^N Y_iY_j\right\} $$
How can the second equation be obtained from the first equation in the gray box? While studying a proof, I'm stuck with that point of the proof. Please clearly explain how to obtain. Thank you for helping.
Concentrating on the terms in the brackets, one finds: $$ \sum_{i=1}^N\sum_{j=1}^N (Y_i -Y_j)^2 -\sum_{i=1}^N (Y_i - Y_i)^2 = \sum_{i=1}^{N}\sum_{j=1}^{N}(Y_i^2-2Y_iY_j+Y_j^2) + 0 \\= \sum_{i=1}^N\sum_{j=1}^NY_i^2 - 2\sum_{i=1}^N\sum_{j=1}^NY_iY_j + \sum_{i=1}^N\sum_{j=1}^NY_j^2= 2\sum_{i=1}^N\sum_{j=1}^NY_i^2 - 2\sum_{i=1}^N\sum_{j=1}^NY_iY_j\,. $$