Conditional expectation of the square of a random variable Let the joint PDF of X and Y, $f(x, y) = \frac{1}{2}e^{-x}$ if $x \geq 0$, $|y| < x$, $f(x, y) = 0$ everywhere else. Calculate $\mathbb{V}(Y|X = x)$.
By definition, $\mathbb{V}(Y|X = x) = \mathbb{E}\Big\{\big[Y - \mathbb{E}(Y|X = x)\big]^2|X = x\Big\}$. Earlier, I calculated that $\mathbb{E}(Y|X = x) = 0$, so $\mathbb{V}(Y|X = x) = \mathbb{E}(Y^2|X = x)$.
Could I please have a hint for calculating the conditional expectation of the square of a random variable?

Given that:
$$\Bbb E[g(Y)|X] = \int_{-\infty}^{\infty}{g(y)f_{Y|X}(x,y)\ dy} $$
we need to find the conditional pdf, which is:
$$f_{Y|X}(x,y) = {f_{X,Y}(x,y)\over f_X(x)}$$
Now for your specific case, $\Bbb E(Y^2|X)$, first we calculte the marginal pdf of $X$ as follow:
$$f_X(x) = \int_{-\infty}^{\infty}{f_{X,Y}(x,y)\ dy} = \int_{-x}^{x}{{1\over 2}e^{-x}\ dy} = \left.\frac{y}{2}\right|_{-x}^{\ x}e^{-x} = x\ e^{-x}$$
and the conditional pdf:
$$ f_{Y|X}(x,y) = {f_{X,Y}(x,y)\over f_X(x)} = {{{1\over 2}e^{-x} \over xe^{-x}} = {1\over 2x}}$$
Now using what we got:
$$ \int_{-\infty}^{\infty}{y^2f_{Y|X}(x,y)\ dy} = \int_{-x}^x{y^2{1\over 2x}\ dy} = \left.{y^3}\right |_{-x}^{\ x} {1\over 6x} = {x^2 \over 3}$$
$$\Bbb E[Y^2|X] = {x^2 \over 3}$$
