Moment generating function of a discrete random variable that takes 0.5 or -0.5 with equal probabilities

144 Views Asked by At

Having a bit of a disagreement with a textbook I'm working through... the following question is from Schaum's Outlines of Probability and Statistics, 4th. edition. Problem 3.63.

The question is as follows:

First, find the moment generating function of the discrete random variable

X = {
$\frac{1}{2}$, prob. $\frac{1}{2}$
$-\frac{1}{2}$, prob. $\frac{1}{2}$
}

Not sure if I've managed to type out the density function in a clear fashion, but basically a coin flip where you get $\frac{1}{2}$ on heads and $-\frac{1}{2}$ on tails.

I find the moment generating function to be $\frac{1}{2}e^{\frac{1}{2}t} + \frac{1}{2}e^{-\frac{1}{2}t}$ using the fact that $M_X(t) = \mathbb{E}(e^{Xt})$. This matches the book answer. So far, so good.

The second part of the question asks me to find the first four moments about the origin. I calculated this out to be $\mu = 0, \mu_2'=\frac{1}{4}, \mu_3'=0, \mu_4'=\frac{1}{16}$, where $\mu_r' = \mathbb{E}(X^r)$. However, this does not match the book answer. The book states that $\mu = 0, \mu_2'=1, \mu_3'=0, \mu_4'=1$.

The way I reached my solution was by writing out the following:

$e^{\frac{1}{2}t} = 1 + \frac{1}{2}t + \frac{\frac{1}{4}t^2}{2!} + \frac{\frac{1}{8}t^3}{3!} + \frac{\frac{1}{16}t^4}{4!} +$ ...

$e^{-\frac{1}{2}t} = 1 - \frac{1}{2}t + \frac{\frac{1}{4}t^2}{2!} - \frac{\frac{1}{8}t^3}{3!} + \frac{\frac{1}{16}t^4}{4!} +$ ...

Thus $\frac{1}{2}e^{\frac{1}{2}t} + \frac{1}{2}e^{-\frac{1}{2}t} = 1 + \frac{\frac{1}{4}t^2}{2!} + \frac{\frac{1}{16}t^4}{4!} +$ ...

And using the fact that $M_X (t) = 1 + \mu t + \mu_2' \frac{t^2}{2!} + \mu_3' \frac{t^3}{3!} + \mu_4' \frac{t^4}{4!} + $ ...

Then, by comparison, we can pick out the values for $\mu$ and each $\mu_r'$ which I stated above.

The book doesn't state how it derived the moments from the moment generating function (this is one of the supplementary problems, so the full solution isn't worked through.) The only other piece of information it provides is that $\frac{1}{2}e^{\frac{1}{2}t} + \frac{1}{2}e^{-\frac{1}{2}t} = \cosh(t/2)$

Is the book's solution correct, or is mine? If I'm wrong, what was incorrect about my approach?

Thank you so much!