Deriving $E_{P(x,y)}[g(x,y)] = E_{P(x)}[E_{P(y|x)}[g(x,y | x)]]$

28 Views Asked by At

Here $g(x,y)$ is a random variable in the joint distribution $P(x,y)$. How to derive : $E_{P(x,y)}[g(x,y)] = E_{P(x)}[E_{P(y|x)}[g(x,y | x)]]$

1

There are 1 best solutions below

0
On BEST ANSWER

The tower rule would be : $\mathsf E_{\mathsf P_{X,Y}}[g(X,Y)] = \mathsf E_{\mathsf P_X}[\mathsf E_{\mathsf P_{Y\mid X}}[g(X,Y) \mid X]]$

$\mathsf E_{\mathsf P_{X,Y}}[g(X,Y)] ~{= \int g(x,y)\mathrm d\mathsf P_{X,Y}(x,y) \\= \iint\left. g(X,y)\mathrm d\mathsf P_{Y\mid X}(y)\right\vert_{X=x}\;\mathrm d\mathsf P_X(x) \\= \mathsf E_{\mathsf P_{X}}[\mathsf E_{\mathsf P_{Y\mid X}}(g(X,Y)\mid X)]}$


PS: This 'training wheel' notation has gone out of style in the passed half century or so, but I suppose it makes sense when talking about random variables with more than one plausible distribution.