please help if I make any mistake on my answer for the following question below:
My answer:
And for b)
I do not know what to do next. Please help. Thank you!
The moment generating function of a random variable $X$ is defined by
$$ M_X(t) = E(e^{tX}) = \begin{cases} \sum_i e^{tx_i}p_X(x_i), & \text{(discrete case)} \\ \\ \int_{-\infty}^{\infty} e^{tx}f_X(x)dx, & \text{(continuous case)} \end{cases} $$
And you have the discret case and your calculation is correct.
If we express $e^{tX}$ formally and take expectation
$$M_X(t) = E(e^{tX}) = 1 + tE(X) + \frac{t^2}{2!}E(X^2)+\ldots+ \frac{t^k}{k!}E(X^k)+\ldots$$
then the $k$th moment of $X$ is given by
$$E(X^k) = M_X^{(k)}(0) \:\:\:\:\:\:k = 1, 2\ldots$$
$$M_X^{(k)}(0) = \frac{d^k}{dt^k} M_X(t) |_{t=0}$$
Hence
$E[X] = M'(0)$
$E[X^2] = M''(0)$
$E(X) = \frac{\,d}{\,dt} M_X(t)\mid_{t=0}$ and $E(X^2) = \frac{\,d^2}{\,dt^2} M_X(t)\mid_{t=0}$. So, just take derivative at 0 and that should give you your answer.
Copyright © 2021 JogjaFile Inc.
The moment generating function of a random variable $X$ is defined by
$$ M_X(t) = E(e^{tX}) = \begin{cases} \sum_i e^{tx_i}p_X(x_i), & \text{(discrete case)} \\ \\ \int_{-\infty}^{\infty} e^{tx}f_X(x)dx, & \text{(continuous case)} \end{cases} $$
And you have the discret case and your calculation is correct.
If we express $e^{tX}$ formally and take expectation
$$M_X(t) = E(e^{tX}) = 1 + tE(X) + \frac{t^2}{2!}E(X^2)+\ldots+ \frac{t^k}{k!}E(X^k)+\ldots$$
then the $k$th moment of $X$ is given by
$$E(X^k) = M_X^{(k)}(0) \:\:\:\:\:\:k = 1, 2\ldots$$
$$M_X^{(k)}(0) = \frac{d^k}{dt^k} M_X(t) |_{t=0}$$
Hence
$E[X] = M'(0)$
$E[X^2] = M''(0)$