In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compared with working directly with probability density functions or cumulative distribution functions. There are particularly simple results for the moment-generating functions of distributions defined by the weighted sums of random variables. However, not all random variables have moment-generating functions.
As its name implies, the moment-generating function can be used to compute a distribution’s moments: the nth moment about 0 is the nth derivative of the moment-generating function, evaluated at 0.
In addition to real-valued distributions (univariate distributions), moment-generating functions can be defined for vector- or matrix-valued random variables, and can even be extended to more general cases.
The moment-generating function of a real-valued distribution does not always exist, unlike the characteristic function. There are relations between the behavior of the moment-generating function of a distribution and properties of the distribution, such as the existence of moments.
Let
X
FX
X
FX
MX(t)
MX(t)=\operatornameE\left[etX\right]
provided this expectation exists for
t
h>0
t
-h<t<h
\operatornameE\left[etX\right]
In other words, the moment-generating function of X is the expectation of the random variable
etX
X=(X1,\ldots,
T | |
X | |
n) |
n
t
t ⋅ X=tTX
tX
MX(t):=\operatornameE
tTX | |
\left(e |
\right).
MX(0)
The moment-generating function is so named because it can be used to find the moments of the distribution.[2] The series expansion of
etX
etX=1+tX+
t2X2 | |
2! |
+
t3X3 | |
3! |
+ … +
tnXn | |
n! |
+ … .
Hence
\begin{align} MX(t)=\operatornameE(etX)&=1+t\operatornameE(X)+
t2\operatornameE(X2) | |
2! |
+
t3\operatornameE(X3) | |
3! |
+ … +
tn\operatornameE(Xn) | |
n! |
+ … \\ &=1+tm1+
| |||||||
2! |
+
| |||||||
3! |
+ … +
| |||||||
n! |
+ … , \end{align}
where
mn
n
MX(t)
i
t
t=0
i
mi
If
X
MX(t)
fX(x)
MX(t)=l{L}\{fX\}(-t),
since the PDF's two-sided Laplace transform is given as
l{L}\{fX\}(s)=
infty | |
\int | |
-infty |
e-sxfX(x)dx,
and the moment-generating function's definition expands (by the law of the unconscious statistician) to
MX(t)=\operatornameE\left[etX\right]=
infty | |
\int | |
-infty |
etxfX(x)dx.
This is consistent with the characteristic function of
X
MX(t)
X
fX(x)
f(x)
f
Here are some examples of the moment-generating function and the characteristic function for comparison. It can be seen that the characteristic function is a Wick rotation of the moment-generating function
MX(t)
Distribution | Moment-generating function MX(t) | Characteristic function \varphi(t) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Degenerate \deltaa | eta | eita | ||||||||||||||||||||
Bernoulli P(X=1)=p | 1-p+pet | 1-p+peit | ||||||||||||||||||||
Geometric (1-p)k-1p |
,~t<-ln(1-p) |
| ||||||||||||||||||||
Binomial B(n,p) | \left(1-p+pet\right)n | \left(1-p+peit\right)n | ||||||||||||||||||||
Negative binomial \operatorname{NB}(r,p) |
\right)r,~t<-ln(1-p) |
\right)r | ||||||||||||||||||||
Poisson \operatorname{Pois}(λ) |
|
| ||||||||||||||||||||
Uniform (continuous) \operatornameU(a,b) |
|
| ||||||||||||||||||||
Uniform (discrete) \operatorname{DU}(a,b) |
|
| ||||||||||||||||||||
Laplace L(\mu,b) |
,~ | t | < 1/b |
| ||||||||||||||||||
Normal N(\mu,\sigma2) |
|
| ||||||||||||||||||||
Chi-squared
| (1-
,~t<1/2 | (1-
| ||||||||||||||||||||
Noncentral chi-squared
| eλ(1-
| eiλ(1-
| ||||||||||||||||||||
Gamma \Gamma(k,\tfrac{1}{\theta}) | (1-t\theta)-k,~t<\tfrac{1}{\theta} | (1-it\theta)-k | ||||||||||||||||||||
Exponential \operatorname{Exp}(λ) | \left(1-tλ-1\right)-1,~t<λ | \left(1-itλ-1\right)-1 | ||||||||||||||||||||
Beta | 1
\left(
\right)
| {}1F1(\alpha;\alpha+\beta;it) | ||||||||||||||||||||
Multivariate normal N(\mu,\Sigma) |
+
\Sigmat\right)} |
-
\boldsymbol{\Sigma}t\right)} | ||||||||||||||||||||
Cauchy \operatorname{Cauchy}(\mu,\theta) | Does not exist | eit\mu | ||||||||||||||||||||
Multivariate Cauchy \operatorname{MultiCauchy}(\mu,\Sigma) | Does not exist |
t | ||||||||||||||||||||
The moment-generating function is the expectation of a function of the random variable, it can be written as:
MX(t)=\sum
infty | |
i=0 |
txi | |
e |
pi
MX(t)=
infty | |
\int | |
-infty |
etxf(x)dx
MX(t)=
infty | |
\int | |
-infty |
etxdF(x)
F
F
Note that for the case where
X
f(x)
MX(-t)
f(x)
\begin{align} MX(t)&=
infty | |
\int | |
-infty |
etxf(x)dx\\ &=
infty | |
\int | |
-infty |
\left(1+tx+
t2x2 | |
2! |
+ … +
tnxn | |
n! |
+ … \right)f(x)dx\\ &=1+tm1+
| |||||||
2! |
+ … +
| |||||||
n! |
+ … , \end{align}
where
mn
n
If random variable
X
MX(t)
\alphaX+\beta
M\alpha(t)=e\betaMX(\alphat)
M\alpha(t)=E[e(\alpha]=e\betaE[e\alpha]=e\betaMX(\alphat)
If
Sn=
n | |
\sum | |
i=1 |
aiXi
M | |
Sn |
(t)=M | |
X1 |
(a1t)M
X2 |
(a2t) …
M | |
Xn |
(ant).
X
MX(t)=E\left(e\langle\right)
where
t
\langle ⋅ , ⋅ \rangle
Moment generating functions are positive and log-convex, with M(0) = 1.
An important property of the moment-generating function is that it uniquely determines the distribution. In other words, if
X
Y
MX(t)=MY(t),
then
FX(x)=FY(x)
for all values of x (or equivalently X and Y have the same distribution). This statement is not equivalent to the statement "if two distributions have the same moments, then they are identical at all points." This is because in some cases, the moments exist and yet the moment-generating function does not, because the limit
\limn
n | |
\sum | |
i=0 |
| |||||||
i! |
may not exist. The log-normal distribution is an example of when this occurs.
The moment-generating function is so called because if it exists on an open interval around t = 0, then it is the exponential generating function of the moments of the probability distribution:
mn=E\left(Xn\right)=
(n) | |
M | |
X |
(0)=\left.
dnMX | |
dtn |
\right|t=0.
That is, with n being a nonnegative integer, the nth moment about 0 is the nth derivative of the moment generating function, evaluated at t = 0.
Jensen's inequality provides a simple lower bound on the moment-generating function:
MX(t)\geqe\mu,
\mu
The moment-generating function can be used in conjunction with Markov's inequality to bound the upper tail of a real random variable X. This statement is also called the Chernoff bound. Since
x\mapstoext
t>0
P(X\gea)=P(etX\geeta)\lee-atE[etX]=e-atMX(t)
t>0
MX(t)
a>0
t=a
t2/2 | |
M | |
X(t)=e |
P(X\gea)\le
-a2/2 | |
e |
Various lemmas, such as Hoeffding's lemma or Bennett's inequality provide bounds on the moment-generating function in the case of a zero-mean, bounded random variable.
When
X
E[Xm]\le\left(
m | |
te |
\right)mMX(t),
X,m\ge0
t>0
This follows from the inequality
1+x\leex
x'=tx/m-1
tx/m\leetx/m-1
x,t,m\inR
t>0
x,m\ge0
xm\le(m/(te))metx
E[Xm]
E[etX]
As an example, consider
X\simChi-Squared
k
-k/2 | |
M | |
X(t)=(1-2t) |
t=m/(2m+k)
E[Xm]\le(1+2m/k)k/2e-m(k+2m)m.
E[Xm]\le2m\Gamma(m+k/2)/\Gamma(k/2)
k
km(1+m2/k+O(1/k2))
km(1+(m2-m)/k+O(1/k2))
Related to the moment-generating function are a number of other transforms that are common in probability theory:
\varphiX(t)
\varphiX(t)=MiX(t)=MX(it):
G(z)=E\left[zX\right].
G(et)=E\left[etX\right]=MX(t).