Variance & Joint Density Function $X$ and $Y$ have joint density given by $$f_{XY}(x,y)=\begin{cases}2,& 0≤x≤y≤1 \\0,& \text{elsewhere}\end{cases}$$ a) Find $\text{Var}(Y|X=x_0)$. 
b) What is the answer if $x_0$ is not in the interval $[0,1]$? 
So I know that if the $x_0$ is not in the interval, then the answer is $0$, right? I need help finding the variance.

For $0\le x \le y \le 1$ you have that $$f_{Y|X}(y|x)=\dfrac{f_{XY}(x,y)}{f_X(x)}=\frac{2}{\int_{x}^{1}f_{XY}(x,y)dy}=\dfrac{2}{\int_{x}^{1}2dy}=\dfrac{1}{1-x}$$ for all $x\le y \le 1$. That is $Y|X=x$ is uniformly distributed in $[x,1]$. Thus $$Var(Y|X=x)=\frac{(1-x)^2}{12}$$ 
