A random variable Y is called gamma($\displaystyle \theta$, n) for $\displaystyle \theta$>0 and natural n if it takes positive values and takes the following PDF:

f(y)=$\displaystyle \frac{1}{\theta (n-1)!}$($\displaystyle \frac{y^{n-1}}{\theta^{n-1}}$) exp$\displaystyle \frac{-y}{\theta}$

Show how to find the moment generating function, expectation and variance of Y.

my attempt:

$\displaystyle \int_{0}^{\infty} e^{\frac{-y}{\theta}}e^{ty} \frac{y^{n-1}}{(t\theta-1)^{n-1}}\frac{1}{\theta(n-1)!}dy$

=$\displaystyle \int_{0}^{\infty} e^\frac{y(t\theta-1)}{\theta} \frac{y^{n-1}}{\theta^{n-1}}\frac{1}{\theta(n-1)!}dy$

let u=$\displaystyle {\frac{y(t\theta-1)}{\theta}}$

Then du=$\displaystyle \frac{(t\theta-1)}{\theta}$dy

=$\displaystyle \int_{0}^{\infty} \frac{1}{(t\theta-1)(n-1)!} \frac{u^{n-1}}{(t\theta-1)^{n-1}}e^u du$

= $\displaystyle \frac{1}{(t\theta-1)^n}$ $\displaystyle \int_{0}^{\infty} e^u \frac{u^{n-1}}{(n-1)!} du$

Is this right so far? Is there some reason why $\displaystyle \int_{0}^{\infty} e^u \frac{u^{n-1}}{(n-1)!} du$ should be one? Could somebody show me how to integrate this by parts? (I know I should be able to do it but I am really struggling).

2. Hello,
Originally Posted by C.E
A random variable Y is called gamma($\displaystyle \theta$, n) for $\displaystyle \theta$>0 and natural n if it takes positive values and takes the following PDF:

f(y)=$\displaystyle \frac{1}{\theta (n-1)!}$($\displaystyle \frac{y^{n-1}}{\theta^{n-1}}$) exp$\displaystyle \frac{-y}{\theta}$

Show how to find the moment generating function, expectation and variance of Y.

my attempt:

$\displaystyle \int_{0}^{\infty} e^{\frac{-y}{\theta}}e^{ty} \frac{y^{n-1}}{({\color{red}t\theta-1})^{n-1}}\frac{1}{\theta(n-1)!}dy$
I guess there's a little typo in red, though not important for your further working

=$\displaystyle \int_{0}^{\infty} e^\frac{y(t\theta-1)}{\theta} \frac{y^{n-1}}{\theta^{n-1}}\frac{1}{\theta(n-1)!}dy$

let u=$\displaystyle {\frac{y(t\theta-1)}{\theta}}$

Then du=$\displaystyle \frac{(t\theta-1)}{\theta}$dy

=$\displaystyle \int_{0}^{\infty} \frac{1}{(t\theta-1)(n-1)!} \frac{u^{n-1}}{(t\theta-1)^{n-1}}e^u du$

= $\displaystyle \frac{1}{(t\theta-1)^n}$ $\displaystyle \int_{0}^{\infty} e^u \frac{u^{n-1}}{(n-1)!} du$

Is this right so far? Is there some reason why $\displaystyle \int_{0}^{\infty} e^u \frac{u^{n-1}}{(n-1)!} du$ should be one? Could somebody show me how to integrate this by parts? (I know I should be able to do it but I am really struggling).
Well, actually, there's a problem, as for the convergence of the integral. But I'm a bit tired to study it ><

Make the substitution $\displaystyle u=\frac{y(1-t\theta)}{\theta}$, assuming that $\displaystyle t<\frac 1\theta$ . Otherwise, you'd have to change the boundaries of the integral, and it makes it more complicated.

Then, you'll get something like $\displaystyle \frac{1}{(1-t\theta)^n} \int_0^\infty e^{-u} \cdot \frac{u^{n-1}}{(n-1)!} ~du$

For this integral, see the Gamma function : Gamma function - Wikipedia, the free encyclopedia and it should be okay !

3. Do you think I am ok to assume t< $\displaystyle \frac{1}{\theta}$? I doesn't say anything about the value of t in the question.