Marginal density functions from joint density function $\int_{-\infty}^{\infty} {e^{-y(x^2+ 1)}} dx$

calculusintegrationmarginal-distributionprobability distributions

Although this link said that
$$\int_{0}^{+\infty} {e^{-x^2}} dx = \frac{\sqrt{\pi}}{2}$$
I wasn't unable to leverage the information to derive marginal density functions from this joint density function
$$f_{X,Y}(x, y) = \begin{cases}\frac{e^{-y(x^2+1)}}{\pi}, \quad -\infty<x<+\infty, \quad y>0\\ 0, \quad \textrm{otherwise} \end{cases} $$
That is,
$$f_X(x) = ? $$
$$f_Y(y) = -\frac{e^{-y(x^2+1)}}{\pi(x^2+1)} $$
Could you please show me:

  • How to calculate $f_X(x)$?

  • Is $f_Y(y)$ summed to 1?

Thanks in advance.

Best Answer

It is not the case that $$ f_Y(y) = \frac{1}{\pi} e^{-y(x^2+1)}.$$ That is what they gave you for $f_{X,Y}(x,y).$ Furthermore, $f_Y(y)$ should only depend on $y$.

It is given by integrating $f_{X,Y}$ over $x,$ so $$ f_Y(y) = \int_{-\infty}^\infty \frac{1}{\pi} e^{-y(x^2+1)}dx.$$

Simplifying a little, $$ \int_{-\infty}^\infty \frac{1}{\pi} e^{-y(x^2+1)}dx = \frac{1}{\pi}e^{-y} \int_{-\infty}^\infty e^{-yx^2}dx = \frac{2}{\pi}e^{-y} \int_{0}^\infty e^{-yx^2}dx.$$

Then we can use the integral you were given. Substituting $z=\sqrt{y}x$ gives $$ \frac{2}{\pi}e^{-y} \int_{0}^\infty e^{-yx^2}dx=\frac{2}{\pi}e^{-y} \frac{1}{\sqrt{y}}\int_{0}^\infty e^{-z^2}dz=\frac{1}{\sqrt{\pi y}}e^{-y}$$ where $y$ ranges over $(0,\infty).$

Similarly, $$ f_X(x) = \int_0^\infty \frac{1}{\pi}e^{-y(x^2+1)}dy.$$ This is an integral in $y$ so you can just treat the $x^2+1$ as a constant. A run of the mill u substitution gives, $$ \int_0^\infty e^{-ay}dy = \frac{1}{a}$$ for $a>0.$ Thus we have $$ f_X(x)=\frac{1}{\pi}\int_0^\infty e^{-y(x^2+1)}dy = \frac{1}{\pi}\frac{1}{x^2+1}.$$