Moment-generating function (source code)

= Moment-generating function
{title2=$M_X(t)$}
{wiki}

= MGF
{c}
{synonym}

The <moment-generating function> of a real <random variable> $X$ is the <moment-generating function>[exponential transform]
$$
M_X(t)=\mathbb E e^{tX},\qquad t\in\mathbb R,
$$
allowing the value $+\infty$. It always satisfies $M_X(0)=1$. The important regularity condition is finiteness on an <neighbourhood>[open neighbourhood] of zero; finiteness only at zero provides no <moment> information.

Under that <neighbourhood> condition, differentiating under the <expected value> gives $M_X^{(k)}(0)=\mathbb E X^k$ for every nonnegative <integer> $k$. In particular the <mean> is $M_X'(0)$ and the <variance> is $M_X''(0)-M_X'(0)^2$. Exponential bounds dominate powers locally and justify the <derivatives>. For <independent random variables>, $M_{X+Y}(t)=M_X(t)M_Y(t)$ wherever finite, making addition easier to analyze.

For a <Bernoulli random variable> with <probability>[success probability] $p$, $M_X(t)=1-p+pe^t$. For an <exponential distribution> of rate $\lambda>0$, $M_X(t)=\lambda/(\lambda-t)$ for $t<\lambda$, and it is infinite for $t\geq\lambda$. A <Standard Cauchy distribution>[standard Cauchy random variable] has infinite $M_X(t)$ at every nonzero real $t$, although its <characteristic function> $\mathbb E e^{itX}$ is defined for every real $t$.

Two <probability distributions> with equal <moment-generating functions> on a <neighbourhood> of zero are equal. The <neighbourhood> condition is what makes this <uniqueness theorem for moment-generating functions>[uniqueness theorem] stronger than merely listing formal <moments>.