Expectation over pdf of sum vs. Expectation of sum

53 Views Asked by At

Let $U=X+Y$, where $X, Y$ are not guaranteed to be independent.

It seems trivial that $$E[U] = E[X+Y].$$

However, taking a closer look, $$ E[U] = E_U[U] = \int_{-\infty}^{\infty} u f_U(u) du $$ $$ E[X+Y] = E_{X, Y}[X+Y] = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} (x+y) f_{X, Y}(x, y) dx dy. $$

My question is: Their being equal is not trivial, am I right?

I know how to prove it. But I want to get a confirmation from you guys that we cannot simply write $E[U] = E[X+Y]$, because one is the expectation over a pdf while the other is the expectation over a joint pdf. Like, for the integral part, one is a single integral while the other is an iterated integral.

My proof

Let $U = X+Y$, $V=Y$, we have \begin{align} X = U - V && Y = V. \end{align} And \begin{align} J = \text{det} \begin{pmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \end{pmatrix} = 1. \end{align} Then, \begin{align} f_{U, V}(u, v) &= f_{X, Y}(u-v, v) |J| = f_{X, Y}(u-v, v) \\ f_{U}(u) &= \int_{-\infty}^{\infty} f_{U, V}(u, v) dv = \int_{-\infty}^{\infty} f_{X, Y}(u-v, v) dv = \int_{-\infty}^{\infty} f_{X, Y}(u-y, y) dy \end{align} Then, \begin{align} E_{U}[U] &= \int_{-\infty}^{\infty} u f_{U}(u) du \\ &= \int_{-\infty}^{\infty} u \left[ \int_{-\infty}^{\infty} f_{X, Y}(u-y, y) dy \right] du \\ &= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} u f_{X, Y}(u-y, y) du dy \\ &= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+y) f_{X, Y}(x, y) dx dy ~~~~ (\text{let } x = u-y) \\ &= E_{X, Y}[X+Y]. \end{align}