How to create a moment generating function for $Y$?

126 Views Asked by At

Consider a discrete random variable defined as follows: When $X=0$, $P(X=x) = .25$.

When $X=1, P(X=x) =.4$.

When $X=2, P(X=x) = .35$.

The moment generating function for $X$ will be: $$Mx(t) = .25 + .4e^t + .35e^{2t}$$

But then the question asks, Create the moment generating function for $Y = X^2 - X - 1$.

I don't understand how to do this.

2

There are 2 best solutions below

1
On

All you have to do is create a mapping of each of the possible outcomes of $X$ to the corresponding outcome of $Y$: for example, if $X = 0$, then $$Y = X^2 - X - 1 = 0^2 - 0 - 1 = -1.$$ Similarly, what are the other possible values of $Y$? Then you directly get the probability distribution of $Y$, and you get the MGF for $Y$ in the same way you did it for $X$: $$M_Y(t) = \operatorname{E}[e^{tY}].$$ But be careful: if $X = 1$, then $Y = 1^2 - 1 - 1 = -1$ also, so in particular, $$\Pr[Y = -1] = \Pr[X = 0] + \Pr[X = 1].$$ More generally, you have to make sure you calculate the distribution of $Y$ for all outcomes of $X$ that give you the same $Y$.

0
On

To add to heropup's excellent answer I like to use a table.

To begin with you have:

$\begin{array}{c|c|c|c}X&0&1&2\\\hline p(X=x)&0.25&0.4&0.35 \end{array}$

Applying the function $Y=f(X)$ where $ f(X)=X^2-X-1$ we end up with:

$\begin{array}{c|c|c}Y&-1&1\\\hline p(Y=y)&0.65&0.35 \end{array}$

The moment generating function is therefore:

$M(t)=E[e^{tY}]=0.65e^{-1t}+0.35e^{1t}$