# Math Help - Method of moment generating function

1. ## Method of moment generating function

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

Attempt:

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

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

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

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

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

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

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

$=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 $\theta$. Use the method of moment generating functions to show that $\frac{2Y}{\theta}$ is a pivotal quantity and has a distribution with 2 df.

Attempt:

$
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 ${\color{red}\beta}$ you should have ${\color{red}\theta}$. Also, I'm sorry to say, all that follows is no good.

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

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

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

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

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

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

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

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

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

Therefore $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 $X = \frac{2Y}{\theta}$ is $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. $X$ is a function of $Y$ and $\theta$.

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

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