Solution (source code)

= Solution

Complete the square in the <joint probability density function>:
$$
x^2-2\rho xy+y^2=(x-\rho y)^2+(1-\rho^2)y^2.
$$
The density therefore factors as the standard <normal distribution> density for $Y$ times a <normal distribution> density in $x$ with mean $\rho y$ and variance $1-\rho^2$. It follows that $\mathbb E[Y]=0$, $\mathbb E[Y^2]=1$, and $\mathbb E[X\mid Y]=\rho Y$. Symmetry gives $\mathbb E[X]=0$. By the <law of total expectation>,
$$
\mathbb E[XY]=\mathbb E\bigl[Y\mathbb E[X\mid Y]\bigr]=\rho\mathbb E[Y^2]=\rho.
$$
Consequently the <covariance> of this <bivariate normal distribution> is \b[$\operatorname{Cov}(X,Y)=\rho$]. This calculation derives the result from the given density.