Need help understanding this marginalization

74 Views Asked by At

While trying to learn regression equations, I came across this puzzling procedure:

Snapshot from statistics textbook

How does one get from $x*e^{-x(1+y)}$ to $e^{-x}$? I initially assumed that $\int x*e^{-x(1+y)} dy $ would do the trick, but unless I've horribly forgotten how to do basic integration, I'm not coming up with the right answer.

2

There are 2 best solutions below

0
On BEST ANSWER

I suspect one of the following two things has gone wrong:

-You need to integrate from y=0 to y=infinity since f is defined for y>0.

-You're getting the reverse chain rule wrong; the derivative of the exponent is -x with respect to y.

$$ \int_{y=0}^{\infty} xe^{-x(1+y)} dy = \left[ -e^{-x(1+y)} \right] _{0}^{\infty} = 0 - \left( -e^{-x} \right) = e^{-x} $$

0
On

For $x > 0$, we have $$\begin{align*} f_X(x) &= \int_{y=0}^\infty x e^{-x(1+y)} \, dy \\ &= \int_{y=0}^\infty x e^{-x-xy} \, dy \\ &= \int_{y=0}^\infty x e^{-x} e^{-xy} \, dy \\ &= e^{-x} \int_{y=0}^\infty x e^{-xy} \, dy \\ &= e^{-x} \int_{u=0}^\infty e^{-u} \, du \quad (u = xy, \; du = x \, dy) \\ &= e^{-x} \left[-e^{-u}\right]_{u=0}^\infty \\ &= e^{-x} (-0 + e^{-0}) \\ &= e^{-x}. \end{align*}$$