# How to find a marginal distribution from a joint distribution?

So I have this joint dist

$$f(x,y) = \frac{1}{2\pi}\exp(-\frac{x^2}{2} - \frac{y^2}{2} + x^2y - \frac{x^4}{2})$$

I'd like to find $f_x(x)$. So I know that means I need to integrate function wrt y. So my strategy is to pull out whatever terms I can so some of it will look like the normal dist then it'll integrate to one and I'll be left with the marginal. So I have $$f_x(x) = \frac{1}{\sqrt{2\pi}}\int\frac{1}{\sqrt{2\pi}}\exp(-\frac{x^2}{2} - \frac{y^2}{2} + x^2y - \frac{x^4}{2})dy$$

This issue then is I'm not sure how I can modify $\exp(-\frac{x^2}{2} - \frac{y^2}{2} + x^2y - \frac{x^4}{2})$ so it will take the form $\exp(-\frac{(y-\mu)^2}{2\sigma^2})$.

Any help would be great, thanks. Sorry for the uberitalicized tex, kinda hacked it together from what I know.

Also I know this is a lot to ask, but this is homework so if you could provide hints or tips as opposed to a complete solution that would be better.

Edited for clarity.

-

First re-write the joint density as

$$f(x,y) = \frac{1}{2\pi} {\rm exp} ({-x^{2}/2}) \cdot {\rm exp} \Big( -\frac{1}{2} \left( y^2 -2x^{2}y + x^4 \right) \Big)$$

Note that $y^2 -2x^{2}y + x^4 = (y-x^{2})^2$. Now the marginal density of $x$ is

$$f(x) = \int_{-\infty}^{\infty} f(x,y) dy = \frac{1}{\sqrt{2 \pi}} {\rm exp} ({-x^{2}/2}) \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} {\rm exp} \Big( -\frac{(y-x^{2})^2}{2} \Big) dy$$

The integrand is a $N(x^{2},1)$ density and therefore it integrates to 1. Therefore,

$$f(x) = \frac{1}{\sqrt{2 \pi}} {\rm exp} ({-x^{2}/2})$$

In other words, the marginal distribution of $X$ is standard normal.

-
+1 Great answer. But did you read the penultimate paragraph about homework and the desire to avoid a complete solution? –  whuber Sep 9 '11 at 19:49
Yeah, I see that now. I thought I read it carefully at the outset, maybe that was an edit. If not, sorry about that, OP. –  Macro Sep 9 '11 at 19:58