I am in an introduction to probability class and we just covered joint probabilities. I came across a question which I cannot compute and would appreciate some help.
Suppose $X$, $Y$ are jointly continuous with joint probability density function $$f(x, y) = \frac{1}{2\pi}e^{-\frac{x^2}{2}-\frac{(x-y)^2}{2}}$$ with $x$, $y$ $\in$ (-$\infty$, $\infty$). Find the marginal density functions of $X$ and $Y$. Hint: you can do this without complicated integrals.
I am aware that $f(x, y)$ looks like two normal densities, but I am unable to figure out how to use this to my advantage when calculating the marginal densities without brute integration. Any help would be appreciated.
You are right that this looks like a bivariate normal distribution. Therefore let us try to express the given density in such a way. The density of a bivariate normal distribution is given by $g(z)= \frac{1}{2\pi \sqrt{\text{det} \Sigma}} e^{-\frac{1}{2}(z - \mu)^T \Sigma^{-1} (z-\mu)}, z\in \mathbb{R}^2 $, where $\Sigma \in \mathbb{R}^{2 \times 2}$ is the covariance matrix and $\mu \in \mathbb{R}^2$ is the expectation. The fact that the term in the exponent of your given density function does not contain any terms that are not depending on $x$ or $y$ suggests $\mu =0$. Now easy calculations give that \begin{align} \Sigma^{-1}= \left( \begin{matrix} 2& -1 \\ -1 & 1 \end{matrix} \right) \end{align} fulfills \begin{align} \left( \begin{matrix} x &y \end{matrix} \right) \Sigma^{-1} \left( \begin{matrix} x \\y \end{matrix} \right) = x^2 + (x-y)^2. \end{align} Now inverting gives $\Sigma= \left( \begin{matrix} 1& 1 \\ 1 & 2 \end{matrix} \right) $ and $\text{det}\Sigma=1$. Therefore the given density function is the density of a bivarite normal distribution with covariance matrix $\Sigma $ as above and zero expectation. It is well known that for a multivariate normal distribution $Z \sim N(\mu,\Sigma)$ the random variable $c^TZ$ has the distribution $N(c^T\mu, c^T \Sigma c)$ and thus in your case $X \sim N(0,1)$ and $Y \sim N(0,2)$.