# 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.

-

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$.