I wanted to ask how to work with a conditional expectation of a squared random variable.
For instance I want to find E[Y^2|X].
The information I have given is: Y|X,Z is normally distributed with mean 0 and variance 1+Z and X and Z are both normally distributed.
I tried to apply the law of iterated expectations such that I have E[Y^2|X]=E[E[Y^2|X,Z]|Z] but I don't know how to solve this. For simple Y I have no problems, but I don't know how to work with Y^2.
Thank you a lot in advance.
$Y|X, Z \sim \mathcal{N}(0, 1+Z)$ hence $Var[Y|X, Z] = \mathbb{E}[Y^2|X, Z] = 1+Z$. By law of iterated expectation, $\mathbb{E}[Y^2|X] = \mathbb{E}[\mathbb{E}[Y^2|X, Z]|X] = 1+\mathbb{E}[Z|X]$