I've problem with double summation I want to demonstrate that
$\frac{E[\sum_{i=1}^{n}X \sum_{i=1}^{n} Y]}{n} = \mu_{XY}+(n-1)\mu_x\mu_y$
Given $E[X] = \mu_X, E[Y] = \mu_Y,E[XY] = \mu_{XY}$ and $(X_i,Y_i)$ is paired iid.
So, I approach by thinking of the summation as $\sum X = X_1+X_2+...+X_n$ then I would get

*

*$\sum_{i=1}^{n}X \sum_{i=1}^{n} Y = (X_1+X_2+...+X_n)(Y_1+Y_2+...+Y_n)$

*Multiply each component, I should get something like $(X_1Y_1+X_1Y_2+...+X_1Y_n+X_2Y_1+...+X_2Y_n+...+X_nY_n)$

*Which can rewrite in shorten terms as $\sum_{i=1}^{n}X_iY_i+\sum_{i=1}^n\sum_{j=1,i\neq j}^{n}X_iY_j$
For the first term, it's clear that $E[\sum_{i=1}^{n}X_iY_i]/n = \mu_{XY}$.
But the second term is not clear to me, because

*

*I thought that $\mu_X\mu_Y = E[X]E[Y] = \frac{\sum X}{n} \frac{\sum Y}{n}$

*And for $\sum X \sum Y$, isn't it the same as $\sum_{i=1}^{n}X_iY_i+\sum_{i=1}^n\sum_{j=1,i\neq j}^{n}X_iY_j$ these term??

If I derive from my understanding,
$\frac{E[\sum_{i=1}^{n}X \sum_{i=1}^{n} Y]}{n}$ should equal to $( n )\mu_x\mu_y$
 A: You have rewritten the sum correctly.
An important fact here is that $(X_i, Y_i)$ is paired i.i.d.
i.e. $(X_i, Y_i)$ and $(X_j, Y_j)$ are i.i.d. when $i \neq j$
It implies that $X_i$ and $Y_j$ are independent when $i \neq j$
Therefore, $E[X_iY_j] = E[X_i]E[Y_j] = \mu_X\mu_Y$ when $i \neq j$
Now we need to count the number of terms in the latter sum where $i \neq j$
Consider a $n \times n$ square matrix with entries $X_iY_j$, where $i, j$ are the row and column indexes. Then there are $n$ diagonal entries $X_iY_i$ and $n^2 - n = n(n-1)$ off-diagonal entries $X_iY_j$ where $i \neq j$. As a result,
$$ \frac {1} {n} \sum_{i=1}^n\sum_{j=1}^n X_i Y_j 
= \frac {1} {n} \left[n\mu_{XY} + n(n-1)\mu_X\mu_Y \right] 
= \mu_{XY} + (n-1)\mu_X\mu_Y $$
In the latter part of your argument, it seems that you may be mixing up the theoretical mean $\mu_X$ with the sample mean $\displaystyle \frac {1} {n} \sum_{i=1}^n X_i$
A: Consider the second term $S_2 = \sum_{i=1}^n \sum_{j=1, i \neq j}^n X_iY_j$
Let's expand one of these terms (say $i=1$): $X_1(Y_2+ Y_3 + \ldots + Y_n)$.
The expected value is: $\mathbb{E}[X_1(Y_2 + \ldots + Y_n)] = \mathbb{E}[X_1] \mathbb{E}[Y_2 + \ldots + Y_n]$ (since $X_i$ and $Y_j$ are independent)
You know that $\mathbb{E}[X_1] = \mu_X$
$\mathbb{E}[Y_2+\ldots Y_n] = (n-1) \mu_Y$
Since there are $n$ terms in the summation $S_2$ and they all have the same distribution, you get $S_2 = n(n-1)\mu_x \mu_y$.
