If $(X,Y)$, $(X',Y')$ are iid. real-valued RV, is $\mathbb{E}(X \cdot Y) = \mathbb{E}(X' \cdot Y')$? I need a bit of help with the statement in the title that I have encountered in a proof of Hoeffding's covariance equality in my statistics course.
We begin by assuming that we can generate an independent copy of $(X,Y)$, let's call it $(X',Y')$. An independent copy is coinciding in distribution by definition, so $\mathbb{P}(X \leq x, Y \leq y) = \mathbb{P}(X' \leq x, Y \leq y) = F_{(X,Y)}(x,y)$. That is exactly the definition of iid random variables, if I am not mistaken.
The step where I am stuck at is why $2\mathbb{E}(XY) - 2\mathbb{E}(X) \mathbb{E}(Y) = \mathbb{E}(X-X')(Y-Y')$. I have already shown that any pair of mixed variables is independent of each other, so $\mathbb{E}(XY')= \mathbb{E}(X'Y) = \mathbb{E}(X) \mathbb{E}(Y)$ by noticing $\mathbb{P}_X = \mathbb{P}_{X'}$ and $\mathbb{P}_Y = \mathbb{P}_{Y'}$ (using continuity of measures). The only thing missing now is the questioned equality in the title. I don't know if it is true, but multiplying out the right side strongly suggests equality.
I have thought about rewriting $\mathbb{P}(XY \leq x)$ for $x \in \mathbb{R}$ as a countable union in a way, so that variables can be pulled apart as seperate conditions and using the definition of the pair $(X',Y')$, but as of now I am still in the dark on how to approach this.
Have a good day!
 A: The following is true (and holds for any $X, Y$ for which $XY$ is integrable):
$$E(XY) = \int_{\mathbb{R}^2}xy\,dP_{(X, Y)}(x, y).$$
The assumption that $(X, Y)$ and $(X', Y')$ are identically distributed means $P_{(X, Y)} = P_{(X', Y')}$ (this is an equality of probability measures on $\mathbb{R}^2$). So
$$\int_{\mathbb{R}^2}xy\,dP_{(X, Y)}(x, y) = \int_{\mathbb{R}^2}xy\,dP_{(X', Y')}(x, y) = E(X'Y').$$
Note that no independence assumption was necessary.
A: 
The step where I am stuck at is why $2\mathbb{E}(XY) - 2\mathbb{E}(X) \mathbb{E}(Y) = \mathbb{E}(X-X')(Y-Y')$.

$$\begin{align}E[(X-X')(Y-Y')]
&=E[XY -XY' - X'Y + X'Y']\\[2mm]
&=E[XY] -E[XY'] - E[X'Y] + E[X'Y']\\[2mm]
&=E[XY] -E[X]\,E[Y'] - E[X']\,E[Y] + E[X'Y']\\[2mm]
&=E[XY] -E[X]\,E[Y] - E[X]\,E[Y] + E[XY]\\[2mm]
&=2\,E[XY]-2\,E[X]E[Y]\end{align}$$
where we have used the following two facts:

*

*If $(X,Y)$ and $(X',Y')$ are independent, then $E[XY']=E[X]\,E[Y']$ and $E[X'Y]=E[X']\,E[Y].$

*If $(X,Y)$ and $(X',Y')$ are identically distributed with c.d.f. $F$, then for any integrable function $f$,
$$E[f(X,Y)]=\int f(x,y)\,dF(x,y)=E[f(X',Y')].$$ (Therefore, $E[X]=E[X'],\ \ E[Y]=E[Y'],\ $ and $E[XY]=E[X'Y'].$)

