# Calculate $\sum_{i,k}(x_i-x_k)^2\sqrt{x_i-x_k}a^2(i,k)$, where $a(i,k)=1$

Help me please to finish my calculations:

Let $x \in R^{2n}$. I would like to calculate $\sum_{i,k}(x_i-x_k)^2\sqrt{x_i-x_k}a^2(i,k)$, where $a(i,k)=1$ if $i\leqslant n\lt k$ or if $k\leqslant n\lt i$, and $a(i,k)=0$ otherwise.

My calculations: \begin{align} &\sum_{i=1}^n\sum_{j=n+1}^{2n}x_i^2 \sqrt{x_i-x_k}+\sum_{j=1}^n\sum_{i=n+1}^{2n}x_i^2\sqrt{x_i-x_k}+\sum_{i=1}^n\sum_{j=n+1}^{2n}x_j^2\sqrt{x_i-x_k} +\sum_{j=1}^n\sum_{i=n+1}^{2n}x_j^2\sqrt{x_i-x_k}-2\sum_{i=1}^n\sum_{j=n+1}^{2n}x_ix_j\sqrt{x_i-x_k} -2\sum_{j=1}^n\sum_{i=n+1}^{2n}x_ix_j\sqrt{x_i-x_k}\\ &=(2n\|x\|_2^2\sum_{i=1}^n\sum_{j=n+1}^{2n}\sqrt{x_i-x_k}-4\sum_{i=1}^n\sum_{j=n+1}^{2n}x_ix_j\sqrt{x_i-x_k}). \end{align}

But now I am stuck.

There have been a surprising number of questions recently that start off claiming that they're about independently and uniformly chosen things but then never mention probabilities again and just compute a sum. That doesn't make any sense. I suspect that what you wanted to say was something like you're interested in the expectation value for independently and uniformly chosen indices $i,k$, and you want to compute that expectation value by summing over all transpositions; but that's not what you wrote. –  joriki Aug 1 '12 at 21:25
Also, you're not actually applying the transposition to anything; I don't see how anything would be any different if you never mentioned transpositions and just summed over all $i$ and $k$. Also, it's not clear why you define different signs for $a(i,k)$ when only its square appears in your expression. –  joriki Aug 1 '12 at 21:31
Thank you. You are right. I've corrected my question. I wasn't sure if its 2n factor in front of $\|x\|_2^2$. And I thought that I can express everything in terms of $l_2$ norm. –  Nick G.H. Aug 1 '12 at 22:00