Does equality in distribution imply equality of expected value? In other words, if X = Y in distribution, is it true that EX = EY?
I think this must be true, but I've tried to prove it a few times and I always get stuck.
Thanks in advance for any hints or reference.
 A: Yes, this is true.
The expectation value depends only on the measure $P^X$ on $\mathbb R$ induced by the random variable $X$, and $X$ and $Y$ are, by definition, equal in distribution if and only if $P^X=P^Y$.
You can find this here: http://en.wikipedia.org/wiki/Expectation_value
A: This proof is slightly modified from that is currently on offer on Wikipedia
Let $X$ be a non-negative random variable. And note that
$$X(\omega)=\int_0^{X(\omega)} dz=\int_0^\infty 1_{(0,X(\omega))}(z) \; dz \;.$$
Now we can use this representation of $X(\omega)$ in the formula for $E[X]$,
$$E[X]=\int_\Omega X \; dP = \int_\Omega \int_0^\infty 1_{(0,X(\omega))}(z) \; dz \; dP \;.$$
Since $1_{(0,X(\omega))}(z)\geq 0$ we can use Fubini's theorem and switch the order of integration
\begin{align} E[X] &= \int_0^\infty \int_\Omega  1_{(0,X(\omega))}(z) \; dP \; dz \\
 &= \int_0^\infty  P(X>z) \; dz \;. \end{align}
Now recalling that if $X \stackrel{d}{=}Y \Rightarrow P(Y>z)=P(X>z) \; \forall \; z$, and that $P(X>z)=P(Y>z) \geq 0$ (here we view $P(X>z)$ as a non-negative function of $z$) we can use the properties of integration for non-negative functions to conclude
$$E[X]=\int_0^\infty  P(X>z) \; dz \; = \int_0^\infty  P(Y>z) \; dz \; = E[Y] $$
