# Finding joint density, marginal density, conditional density of bivariate normal distribution

Suppose that (X,Y) has a bivariate normal distribution. You know that Y is a standard normal random variable and that the conditional distribution of X given that Y=y has mean 3y-4 and variance 7. Find (a) the joint density of (X,Y); (b) the marginal density of X, and (c) the conditional density of Y given that X=x.

This looks like you just look at the formulas to find the distributions, but my question is whether X and Y are independent? Because otherwise the results come out messy without $\rho = 0$.

$Y$ ~ $N(0,1)$

$\mu_y = 0, \quad \sigma_y^2 = 1$

$$\mu_{x|y} = \mu_x + \rho(\sigma_x/\sigma_y)(y-\mu_y)=3y-4$$

$$\mu_x= 3y-4 - \mu_x + \rho(\sigma_x/\sigma_y)(y-\mu_y)=3y-4+\rho(\sigma_X)(y)$$

$$\sigma_{x|y}^2 = \sigma_x^2(1-\rho^2)=7$$

$$\sigma_x= \sqrt{7/(1-\rho^2)}$$

$$f_Y(y)=\frac {1}{\sqrt{2\pi}\sigma_y}exp\left( -\frac {y^2}{2} \right)$$

I would plug the means and variances into the distribution given by:

$$f(x,y)=\frac {1}{2\pi\sigma_x\sigma_y\sqrt{1-\rho^2}}* exp \left( -\frac{1}{2(1-\rho^2)} \left[ \left( \frac {x - \mu_x} {\sigma_x} \right)^2 + \left( \frac {y - \mu_y} {\sigma_y} \right)^2 - 2\rho * \frac {(x - \mu_x)(y - \mu_y)}{\sigma_x \sigma_y} \right] \right)$$

Similarly, for marginal density:

$$f_X(x)=\frac {1}{\sqrt{2\pi}\sigma_x}exp\left( -\frac {(x-\mu_x)^2}{2\sigma_x^2} \right)$$

To find the marginal condition density of Y given X=x, I would then just use the definition:

$$f_{Y|X}(y|x)=\frac {f(x,y)}{f_X(x)}$$

• Got something from the answers below? – Did Jun 16 '14 at 16:04

The conditional $f_{X\mid Y}(X\mid Y)$ is given as $\mathcal{N}(\mu_x+\frac{\sigma_x}{\sigma_y}\rho(y-\mu_y),(1-\rho^{2})\sigma_x^2)$ where the subscripts indicate the Random variable under consideration and $\mu$,$\sigma$ and $\rho$ denote the mean, standard deviation and the covariance respectively.

1. You've been given that $f_{X \mid Y}$ has a mean $3y-4$ which means (since $Y$ is standard normal, $\sigma_y = 1,\mu_y=0$ - I think you missed this point) $$3y-4 = \mu_x+\sigma_x\rho y$$ $$7=(1-\rho^2)\sigma_x^2$$from which you can deduce the values of mean (straight forward $\mu_x=-4)$, and also the covariance, variance of $X$ by solving the 2 equations. This should give you everything to solve the problem.

• "where the subscripts indicate the Random variable under consideration" Good idea, then the subscripts should be X and Y, not x and y, no? – Did Nov 21 '13 at 9:40
• I just went by the OP's notation. And generally as far as my knowledge goes the subscripts of means and variances are written with $x,y,\dots$ (convention maybe). – Sudarsan Nov 21 '13 at 9:42
• Although sloppy writers sometimes use x and y, simple logic commands to use X and Y. – Did Nov 21 '13 at 9:45

The conditional mean of $X$ conditionally on $Y$ is $3Y-4$, which does depend on $Y$, hence no, $X$ and $Y$ are not independent.

An approach to questions (a), (b) and (c) is to realize $(X,Y)$ using i.i.d. standard normal random variables $(U,V)$. The hypothesis you are given means exactly that this works if $$(X,Y)=(3U-4+\sqrt7V,U).$$ The density $g$ of $(U,V)$ is defined by $$g(u,v)=(2\pi)^{-1}\mathrm e^{-(u^2+v^2)/2}.$$ Then (a) is solved by considering the change of variable $$(u,v)=(y,(x-3y+4)/\sqrt7).$$ The Jacobian is given by $\mathrm du\mathrm dv=\mathrm dx\mathrm dy/\sqrt7$ hence the density $f$ of $(X,Y)$ is given by $$f(x,y)=g(y,(x-3y+4)/\sqrt7)/\sqrt7.$$ Likewise, (b) is solved coming back to the representation $X=(3U+\sqrt7V)-4$, which indicates that $X$ is normal with mean $-4$ and variance $3^2+\sqrt7^2=16$.

Finally, (c) is solved noting that $W=\sqrt7U-3V$ and $X$ are independent (hint: covariance+gaussian vector), and that $$Y=\tfrac3{16}X+\tfrac34+\tfrac{\sqrt7}{16}W.$$ Since the variance of $W$ is $\sqrt7^2+3^2=16$, this shows that, conditionally on $X$, the distribution of $Y$ is normal with mean $\frac3{16}X+\frac34$ and variance $\left(\frac{\sqrt7}{16}\right)^2\cdot16=\frac7{16}$.

Exercise/Safety check: Deduce from the very last result that $Y$ is indeed standard normal.