# Finding a moment-generating function of a continuous r.v. given its pdf

• Nov 14th 2008, 06:04 PM
Finding a moment-generating function of a continuous r.v. given its pdf
Hi,

I'm trying to make sense of a problem we saw in my probability class. mr. fantastic helped me dust off my calculus skills for the integration part but now I'm having trouble understanding the very last part. Here's the problem and its solution:

The probability density of a continuous random variable Y is given by
$\displaystyle f(y) = \begin{cases}\alpha{e^{-\alpha y}}&\text{ for 0} < y < \infty \text{ for some integer k},\\0&\text{otherwise},\end{cases}$
where $\displaystyle \alpha >0$

Prove that the moment generating function, m(t), of Y is given by
$\displaystyle m(t) = \frac{\alpha}{\alpha - t}$ for $\displaystyle t<\alpha$

Solution:

$\displaystyle m(t) = E[e^{ty}] = \int^\infty_0 e^{ty}\alpha{e^{-\alpha y}} dy$

$\displaystyle = \lim_{k\to\infty}\int^k_0 {\alpha}e^{\left({t-\alpha}\right)y}dy$

$\displaystyle = \lim_{k\to\infty}[\frac{\alpha}{t-\alpha}e^{\left({t-\alpha}\right)y}]|(y=k,y=0)$

$\displaystyle = \frac{\alpha}{t-\alpha}\lim_{k\to\infty}[e^{\left({t-\alpha}\right)k}-1] = \begin{cases}\frac{\alpha}{\alpha -t}&\text{ if t} < \infty ,\\\infty &\text{if t} >= \infty,\end{cases}$

$\displaystyle = \frac{\alpha}{t-\alpha}\lim_{k\to\infty}[e^{\left({t-\alpha}\right)k}-1] = \begin{cases}\frac{\alpha}{\alpha -t}&\text{ if t} < \infty ,\\\infty &\text{if t} >= \infty,\end{cases}$ to me? I'm confused by the very end. If k is the one being taken to $\displaystyle \infty$ then why should the outcome depend on t? Please explain how we get $\displaystyle \frac{\alpha}{\alpha -t}$ and $\displaystyle \infty$.

Thanks
• Nov 14th 2008, 06:30 PM
Chris L T521
Quote:

Hi,

I'm trying to make sense of a problem we saw in my probability class. mr. fantastic helped me dust off my calculus skills for the integration part but now I'm having trouble understanding the very last part. Here's the problem and its solution:

The probability density of a continuous random variable Y is given by
$\displaystyle f(y) = \begin{cases}\alpha{e^{-\alpha y}}&\text{ for 0} < y < \infty \text{ for some integer k},\\0&\text{otherwise},\end{cases}$
where $\displaystyle \alpha >0$

Prove that the moment generating function, m(t), of Y is given by
$\displaystyle m(t) = \frac{\alpha}{\alpha - t}$ for $\displaystyle t<\alpha$

Solution:

$\displaystyle m(t) = E[e^{ty}] = \int^\infty_0 e^{ty}\alpha{e^{-\alpha y}} dy$

$\displaystyle = \lim_{k\to\infty}\int^k_0 {\alpha}e^{\left({t-\alpha}\right)y}dy$

$\displaystyle = \lim_{k\to\infty}[\frac{\alpha}{t-\alpha}e^{\left({t-\alpha}\right)y}]|(y=k,y=0)$

$\displaystyle = \frac{\alpha}{t-\alpha}\lim_{k\to\infty}[e^{\left({t-\alpha}\right)k}-1] = \begin{cases}\frac{\alpha}{\alpha -t}&\text{ if t} < \infty ,\\\infty &\text{if t} >= \infty,\end{cases}$

$\displaystyle = \frac{\alpha}{t-\alpha}\lim_{k\to\infty}[e^{\left({t-\alpha}\right)k}-1] = \begin{cases}\frac{\alpha}{\alpha -t}&\text{ if t} < \infty ,\\\infty &\text{if t} >= \infty,\end{cases}$ to me? I'm confused by the very end. If k is the one being taken to $\displaystyle \infty$ then why should the outcome depend on t? Please explain how we get $\displaystyle \frac{\alpha}{\alpha -t}$ and $\displaystyle \infty$.

Thanks

In my opinion, it should be [and it makes more sense this way] $\displaystyle \frac{\alpha}{t-\alpha}\lim_{k\to\infty}[e^{\left({t-\alpha}\right)k}-1] = \begin{cases}\frac{\alpha}{\alpha -t}&\text{ if t} < {\color{red}\alpha} ,\\\infty &\text{if t} \geq {\color{red}\alpha},\end{cases}$

If $\displaystyle t\geq\alpha$, then $\displaystyle t-\alpha\geq0$ and the limit would diverge for $\displaystyle t>\alpha$, making $\displaystyle M(t)=\infty$ and $\displaystyle M(t)=0$ if $\displaystyle t=\alpha$. [which really doesn't make sense].

If $\displaystyle t<\alpha$, then $\displaystyle t-\alpha<0$ and the limit would converge to -1, causing $\displaystyle M(t)=-\frac{\alpha}{t-\alpha}=\frac{\alpha}{\alpha-t}$.

Does this help?

--Chris
• Nov 14th 2008, 08:06 PM
Quote:

If $\displaystyle t\geq\alpha$, then $\displaystyle t-\alpha\geq0$ and the limit would diverge for $\displaystyle t>\alpha$, making $\displaystyle M(t)=\infty$ and $\displaystyle M(t)=0$ if $\displaystyle t=\alpha$. [which really doesn't make sense].
When you say "which really doesn't make sense", what are you referring to? Are you suggesting that there ought to be a third case for $\displaystyle t=\alpha$?

BTW, I should have noticed the correction you made myself... The question actually states "for t < $\displaystyle \alpha$" (Doh)

Thanks Chris!
• Nov 15th 2008, 10:35 PM
Chris L T521
Quote:

It doesn't make sense to have $\displaystyle M(t)=\infty$ or $\displaystyle M(t)=0$....