Expected value of two random variables with same distribution [closed]

Why is it true that if two random variables have the same distribution, they have the same expected value?

closed as off-topic by Simply Beautiful Art, mechanodroid, José Carlos Santos, Did, uniquesolutionSep 28 '17 at 16:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Simply Beautiful Art, mechanodroid, José Carlos Santos, Did, uniquesolution
If this question can be reworded to fit the rules in the help center, please edit the question.

From a given distribution, one performs an integral to get the expected value. If you give the same distribution twice, you get the same result of the integral both times.

Let $f$ be the PDF of the random variable $X$ taking values in $\mathbb{R}$. (We can be slightly more general, but let's not.) Then $\mathbb{E}(X) = \int_{-\infty}^{\infty} \; x f(x) \, \mathrm{d}x$. Every time we evaluate this integral for the same $f$, we get the same expected value.

• What's an example of dependent variables with the same distribution but different expectations? – uniquesolution Sep 28 '17 at 15:35
• @uniquesolution : It's early here and I haven't sufficiently coffeed, so I guarded against conflating equality of the marginal PDFs with exchange symmetry of the joint PDF. But several sips later, that was overcautious. – Eric Towers Sep 28 '17 at 15:43

In general we have $EX = \int X dP$, and a little works shows that if we define the cumulative distribution function $F_X(\alpha) = P \{ \omega | X(\omega) \le \alpha \}$ then we can write $EX = \int t dF_X(t)$.

Suppose we have two random variables, say $X,Y$ and that $F_X(\alpha) = F_Y (\alpha)$ for all $\alpha$.

The last expression for expectation then shows that $EX = EY$.

Note that $X,Y$ need not be defined on the same probability space.

• FYI, the formula $\int X dP_X$ is absurd. Use either $\int_\Omega X dP$ or, for some real-valued $X$, $\int_\mathbb Rx dP_X(x)$ – Did Sep 28 '17 at 16:10
• @Did: There was no meaning to the $X$ subscript other than to distinguish it from the corresponding measure on $Y$. I am not sure I see the absurdity? – copper.hat Sep 28 '17 at 17:14
• The notation $P_X$ is universally used to denote the measure image of $P$ by $X$, that is, the measure defined by $P_X(B)=P(X\in B)$, aka the distribution of $X$. Hence a measure on the image set instead of the source set. Hence the absurdity (now corrected, which is good). – Did Sep 28 '17 at 17:20