I found the question Expectation of the difference of sums on this site, and I am trying to understand the solution, which uses the variance of the vector $a$.
Please help me to understand the solution. I have two questions:
First, on the 4-th row of the solution, $ \begin{eqnarray} \def\Var{\operatorname{Var}}\Var a &=& \frac{2m-1}{(2m)^2}\lVert a\rVert^2-\frac1{(2m)^2}2m(2m-1)A\;, \end{eqnarray}$ how did we get $2m(2m-1)$? (As I understand, we have $2m(m-1)$positive terms of different entries.)
My second question is how to find $A$, the average over all permutations?
Thank you for your explanations.