Suppose \(X,Y\) are MVN, with mean vector \(\mu = (0,0)\) and covariance matrix \(\Sigma = \begin{pmatrix} 1 & 1 \\ 1 & 4 \end{pmatrix}\).

What are the marginal distributions of \(X\) and \(Y\)? \[ X \sim N(0,1) \qquad Y \sim N(0, 4) \]

What is the correlation between \(X\) and \(Y\)? \[ \mathrm{Corr}(X,Y) = \frac{\mathrm{Cov}(X,Y)}{\mathrm{SD}(X) \mathrm{SD}(Y)} = \frac{1}{1 \cdot 2} = \frac{1}{2} \]

What is the joint density function? \[ f(x,y) = \frac{1}{2 \pi \sqrt{1 - 0.5^2}}\mathrm{exp}\left(- \frac{x^2 - xy + y^2 }{2(1-0.5^2)} \right) \] This surface is plotted below:

We can also represent this surface with contour lines, for easier visualization in 2D:

We can also simulate data from this MVN distribution:

set.seed(10)

z1 <- rnorm(500, 0, 1)
z2 <- rnorm(500, 0, 1)

x <- z1
y <- 2*(0.5*z1 + sqrt(1-0.5^2)*z2)

And we can superimpose the scatterplot of points on the contour plot: