# Math Help - double expectation proof

1. ## double expectation proof

show that (assuming all the expectatons and variances exist and are finite)

E(Y)= E(E[Y|X])

and

Var (Y) = E(Var[Y|X]) + Var (E[Y|X])

2. Originally Posted by weakmath
show that (assuming all the expectatons and variances exist and are finite)

E(Y)= E(E[Y|X])

and

Var (Y) = E(Var[Y|X]) + Var (E[Y|X])
Let X and Y have have joint density function f(x, y) and marginal density functions $f_X (x)$ and $f_Y (y)$ respectively.

Then:

$E(Y) = \int_{-\infty}^{+\infty} y \, f_Y (y) \, dy = \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} y \, f(x, y) \, dx \, dy$

$= \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} y \, f(y | x) \, f_X (x) \, dy \, dx$

$= \int_{-\infty}^{+\infty} \left[ \int_{-\infty}^{+\infty} y \, f(y | x) \, dy \right] f_X (x) \, dx$

$= \int_{-\infty}^{+\infty} E(Y | X = x)\, f_X (x) \, dx$

$= E[E(Y | X)]$.

Var(Y) is left for you to try doing again.