I am studying probability theory and I need to understand moment generating functions (MGFs). The MGF of a random variable $X$ is:
$$M_X(t) = E[e^{tX}] = \begin{cases} \sum_x e^{tx} P(X = x) & \text{discrete} \\ \int_{-\infty}^{\infty} e^{tx} f_X(x) \, dx & \text{continuous} \end{cases}$$