# Thread: Method of moment generating function

1. ## Method of moment generating function

Suppose that Y follows an exponential distribution, with mean $\displaystyle \theta$. Use the method of moment generating functions to show that $\displaystyle \frac{2Y}{\theta}$ is a pivotal quantity and has a distribution with 2 df.

Attempt:

$\displaystyle f(y) = \left\{ \begin{array}{rcl} \frac{1}{\beta}e^{-y/\beta} & \mbox{for} & y>0 \\ 0 & \mbox{otherwise} & \end{array}\right.$

so substituting $\displaystyle \theta=\frac{1}{\beta}$, $\displaystyle Y = \frac{U\theta}{2}$ and $\displaystyle dy=\frac{\theta}{2} du$ I get:

$\displaystyle \int^\alpha_0 \theta \exp\left(-\theta \times \frac{U\theta}{2}\right) \frac{\theta}{2} du$

$\displaystyle = \int^\alpha_0 \frac{\theta^2}{2} \exp\left(-\theta^2 \times \frac{U}{2}\right) du$

$\displaystyle = \frac{\theta^2}{2} \int^\alpha_0 \exp\left(-\theta^2 \times \frac{U}{2}\right) du$

$\displaystyle = \frac{\theta^2}{2} \times -\frac{2}{\theta^2} \times \exp\left(-\theta^2\times \frac{U}{2}\right) \bigg{|}^{\alpha}_0$

$\displaystyle =-\exp\left(-\theta^2\times \frac{U}{2}\right) \bigg{|}^{\alpha}_0$

$\displaystyle =1-\exp\left(-\theta^2 \cdot \frac{\alpha}{2} \right) \neq (1-2t)^{\nu/2}$

2. Originally Posted by lllll
Suppose that Y follows an exponential distribution, with mean $\displaystyle \theta$. Use the method of moment generating functions to show that $\displaystyle \frac{2Y}{\theta}$ is a pivotal quantity and has a distribution with 2 df.

Attempt:

$\displaystyle f(y) = \left\{ \begin{array}{rcl} \frac{1}{\beta}e^{-y/\beta} & \mbox{for} & y>0 \\ 0 & \mbox{otherwise} & \end{array}\right.$ Mr F says: No. Instead of $\displaystyle {\color{red}\beta}$ you should have $\displaystyle {\color{red}\theta}$. Also, I'm sorry to say, all that follows is no good.

so substituting $\displaystyle \theta=\frac{1}{\beta}$, $\displaystyle Y = \frac{U\theta}{2}$ and $\displaystyle dy=\frac{\theta}{2} du$ I get:

$\displaystyle \int^\alpha_0 \theta \exp\left(-\theta \times \frac{U\theta}{2}\right) \frac{\theta}{2} du$

$\displaystyle = \int^\alpha_0 \frac{\theta^2}{2} \exp\left(-\theta^2 \times \frac{U}{2}\right) du$

$\displaystyle = \frac{\theta^2}{2} \int^\alpha_0 \exp\left(-\theta^2 \times \frac{U}{2}\right) du$

$\displaystyle = \frac{\theta^2}{2} \times -\frac{2}{\theta^2} \times \exp\left(-\theta^2\times \frac{U}{2}\right) \bigg{|}^{\alpha}_0$

$\displaystyle =-\exp\left(-\theta^2\times \frac{U}{2}\right) \bigg{|}^{\alpha}_0$

$\displaystyle =1-\exp\left(-\theta^2 \cdot \frac{\alpha}{2} \right) \neq (1-2t)^{\nu/2}$
Theorem (easy to prove): The moment generating function of $\displaystyle X = aY + b$ is $\displaystyle m_X(t) = e^{bt} \, m_Y (at)$ where $\displaystyle m_Y(t)$ is the moment generating function of Y.

Let $\displaystyle X = \frac{2Y}{\theta}$. Then using the above theorem, $\displaystyle m_X(t) = M_Y\left( \frac{2}{\theta} t\right)$.

It is well known (and easy to prove) that if $\displaystyle Y$ follows an exponential distribution with mean $\displaystyle \theta$ then $\displaystyle m_Y(t) = \frac{1}{1 - \theta t}$.

Therefore $\displaystyle m_X(t) = \frac{1}{1 - \theta \left( \frac{2}{\theta} \right) t} = \frac{1}{1 - 2t}$.

This is readily recognised as the moment generating function for an an exponential distribution with mean equal to 2.

Therefore the pdf of $\displaystyle X = \frac{2Y}{\theta}$ is $\displaystyle f(x) = \frac{1}{2} e^{-x/2}$.

(I'm not sure where the two degrees of freedom comes from because that's not the case here).

1. $\displaystyle X$ is a function of $\displaystyle Y$ and $\displaystyle \theta$.

2. The pdf of $\displaystyle X$ does not depend on $\displaystyle \theta$.

Therefore $\displaystyle X = \frac{2Y}{\theta}$ is a pivotal quantity.