# Compute Conditional Variance

Let the joint density $$f_{X,Y}(x,y)=\begin{cases} c(x^3+2xy),\ 0\le x,y\le 2\\ 0, \text{ else}\end{cases}$$

be given. I want to compute $$Var(Y|X=1)=\int^\infty_{-\infty} (y-E(Y|X=1))^2f_{Y|X=1}(y)\,\mathrm{d}y$$.

I computed $$E(Y|X=1)=11/6$$ and $$f_{Y|X=1}(y)=1/6(1+2y)$$

Then $$Var(Y|X=1)=\int_{0}^2(y-11/6)^2 1/6(1+2y)\,\mathrm{d}y$$

Is this correct so far?

The expectation is wrong because $$11/6$$ is too close to $$2$$. The PDF has a trapezoidal shape, increasing as $$y$$ increase; therefore the mean could have been $$2/3$$ at max. Specifically, it'll be $$11/9$$:
$$E[Y|X=1]=\int_0^2y(1+2y)/6 dy=1/6(y^2/2+2y^3/3)|_0^2=11/9$$ The rest can be solved by your way, but I think using $$E[Y^2|X=1]$$ will be a bit simpler to do.
• I got $23/81$ for the conditional variance. What do you mean by using $E[Y^2|X=1]$? In what way is this related to $E[Y|X=1]$? Oct 13, 2019 at 13:53
• It seems correct. Integrating for $Y^2$ is easier than $(Y-11/9)^2$. Then, you can find the variance by $E[Y^2]-E[Y]^2$ (ignored conditionals for notational simplicity). Oct 13, 2019 at 14:08