MGF problem set up

48 Views Asked by At

Random variable $X$ has the following probability density function:

$f_X(x) = xe^{-x}$ if $x > 0$, 0 otherwise.

Find the moment generating function of X.

Is this the correct set up? $$ M(t) = \int_{0}^{\infty} xe^{(t-1)x} \,dx $$

Because when I u-sub, letting $u = x, dv = e^{x(t-1)}dx$, my $uv$ sum tends to $\infty$, which doesn't seem right. I feel like it should be $$ M(t) = \int_{0}^{\infty} xe^{-(t-1)x} \,dx $$

Edit: Fully solving it: $$ M(t) = \int_{0}^{\infty} xe^{(t-1)x} \,dx = xe^{x(t-1)} - \int_{0}^{\infty} \frac{e^{(t-1)x}}{t-1}$$

$$= xe^{x(t-1)} - \frac{e^{(t-1)x}}{(t-1)^2}$$ (evalualte both at $\infty, 0$)

If $t < 1$ then the first sum is zero; isn't the second sum also zero because if $x = \infty$, then it tends toward 0 since $t < 1$; if it's 0, then it's just zero. Of course this is incorrect but not sure why.

1

There are 1 best solutions below

4
On

Both integrals might tend to $\infty$, or not, depending on the value of $t$. The integral $$\int_{0}^{\infty} xe^{(t-1)x} \,dx$$ converges for $t<1$, and the integral $$\int_{0}^{\infty} xe^{-(t-1)x} \,dx$$ converges for $t>1$.

We actually prefer the first behavior: if you want to get moments out of the MGF, you'll be finding $M'(0)$, $M''(0)$, and so on, so you want your MGF to make sense near $0$. So the behavior you're noticing is a confirmation that you set up the integral right the first time.