Consider two variables x and y with joint distribution p(x, y). Show the following results:
• E[x] = Ey[Ex[x|y]]
• var[x] = Ey[varx[x|y]] + vary[Ex[x|y]]
Here Ex[x|y] denotes the expectation of x under the conditional distribution p(x|y), with a similar notation for the conditional variance.