In
probability theory
Probability theory or probability calculus is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expre ...
and
statistics
Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
, the moment-generating function of a real-valued
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
is an alternative specification of its
probability distribution
In probability theory and statistics, a probability distribution is a Function (mathematics), function that gives the probabilities of occurrence of possible events for an Experiment (probability theory), experiment. It is a mathematical descri ...
. Thus, it provides the basis of an alternative route to analytical results compared with working directly with
probability density function
In probability theory, a probability density function (PDF), density function, or density of an absolutely continuous random variable, is a Function (mathematics), function whose value at any given sample (or point) in the sample space (the s ...
s or
cumulative distribution function
In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x.
Ever ...
s. 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
In mathematics, a generating function is a representation of an infinite sequence of numbers as the coefficients of a formal power series. Generating functions are often expressed in closed form (rather than as a series), by some expression invo ...
can be used to compute a distribution’s
moments: the -th moment about 0 is the -th derivative of the moment-generating function, evaluated at 0.
In addition to univariate real-valued distributions, moment-generating functions can also 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 In mathematics, the term "characteristic function" can refer to any of several distinct concepts:
* The indicator function of a subset, that is the function
\mathbf_A\colon X \to \,
which for a given subset ''A'' of ''X'', has value 1 at points ...
. 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.
Definition
Let
be a
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
with
CDF . The moment generating function (mgf) of
(or
), denoted by
, is
provided this
expectation exists for
in some open
neighborhood
A neighbourhood (Commonwealth English) or neighborhood (American English) is a geographically localized community within a larger town, city, suburb or rural area, sometimes consisting of a single street and the buildings lining it. Neigh ...
of 0. That is, there is an
such that for all
in
,
exists. If the expectation does not exist in an open neighborhood of 0, we say that the moment generating function does not exist.
In other words, the moment-generating function of is the
expectation of the random variable
. More generally, when
, an
-dimensional
random vector
In probability, and statistics, a multivariate random variable or random vector is a list or vector of mathematical variables each of whose value is unknown, either because the value has not yet occurred or because there is imperfect knowledge ...
, and
is a fixed vector, one uses
instead of
always exists and is equal to 1. However, a key problem with moment-generating functions is that moments and the moment-generating function may not exist, as the integrals need not converge absolutely. By contrast, the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts:
* The indicator function of a subset, that is the function
\mathbf_A\colon X \to \,
which for a given subset ''A'' of ''X'', has value 1 at points ...
or Fourier transform always exists (because it is the integral of a bounded function on a space of finite
measure), and for some purposes may be used instead.
The moment-generating function is so named because it can be used to find the moments of the distribution.
The series expansion of
is
Hence,
where
is the
moment. Differentiating
times with respect to
and setting
, we obtain the
-th moment about the origin,
; see below.
If
is a continuous random variable, the following relation between its moment-generating function
and the
two-sided Laplace transform
In mathematics, the two-sided Laplace transform or bilateral Laplace transform is an integral transform equivalent to probability's moment-generating function. Two-sided Laplace transforms are closely related to the Fourier transform, the Melli ...
of its probability density function
holds:
since the PDF's two-sided Laplace transform is given as
and the moment-generating function's definition expands (by the
law of the unconscious statistician) to
This is consistent with the characteristic function of
being a
Wick rotation
In physics, Wick rotation, named after Italian physicist Gian Carlo Wick, is a method of finding a solution to a mathematical problem in Minkowski space from a solution to a related problem in Euclidean space by means of a transformation that sub ...
of
when the moment generating function exists, as the characteristic function of a continuous random variable
is the
Fourier transform
In mathematics, the Fourier transform (FT) is an integral transform that takes a function as input then outputs another function that describes the extent to which various frequencies are present in the original function. The output of the tr ...
of its probability density function
, and in general when a function
is of
exponential order, the Fourier transform of
is a Wick rotation of its two-sided Laplace transform in the region of convergence. See
the relation of the Fourier and Laplace transforms for further information.
Examples
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
In physics, Wick rotation, named after Italian physicist Gian Carlo Wick, is a method of finding a solution to a mathematical problem in Minkowski space from a solution to a related problem in Euclidean space by means of a transformation that sub ...
of the moment-generating function
when the latter exists.
Calculation
The moment-generating function is the expectation of a function of the random variable, it can be written as:
* For a discrete
probability mass function
In probability and statistics, a probability mass function (sometimes called ''probability function'' or ''frequency function'') is a function that gives the probability that a discrete random variable is exactly equal to some value. Sometimes i ...
,
* For a continuous
probability density function
In probability theory, a probability density function (PDF), density function, or density of an absolutely continuous random variable, is a Function (mathematics), function whose value at any given sample (or point) in the sample space (the s ...
,
* In the general case:
, using the
Riemann–Stieltjes integral, and where
is the
cumulative distribution function
In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x.
Ever ...
. This is simply the
Laplace-Stieltjes transform of
, but with the sign of the argument reversed.
Note that for the case where
has a continuous
probability density function
In probability theory, a probability density function (PDF), density function, or density of an absolutely continuous random variable, is a Function (mathematics), function whose value at any given sample (or point) in the sample space (the s ...
,
is the
two-sided Laplace transform
In mathematics, the two-sided Laplace transform or bilateral Laplace transform is an integral transform equivalent to probability's moment-generating function. Two-sided Laplace transforms are closely related to the Fourier transform, the Melli ...
of
.
where
is the
th
moment.
Linear transformations of random variables
If random variable
has moment generating function
, then
has moment generating function
Linear combination of independent random variables
If
, where the are independent random variables and the are constants, then the probability density function for is the
convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
of the probability density functions of each of the , and the moment-generating function for is given by
Vector-valued random variables
For
vector-valued random variables with
real components, the moment-generating function is given by
where
is a vector and
is the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
.
Important properties
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
and
are two random variables and for all values of ,
then
for all values of (or equivalently and 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
may not exist. The
log-normal distribution
In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normal distribution, normally distributed. Thus, if the random variable is log-normally distributed ...
is an example of when this occurs.
Calculations of moments
The moment-generating function is so called because if it exists on an open interval around , then it is the
exponential generating function of the
moments of the
probability distribution
In probability theory and statistics, a probability distribution is a Function (mathematics), function that gives the probabilities of occurrence of possible events for an Experiment (probability theory), experiment. It is a mathematical descri ...
:
That is, with being a nonnegative integer, the -th moment about 0 is the -th derivative of the moment generating function, evaluated at .
Other properties
Jensen's inequality provides a simple lower bound on the moment-generating function:
where
is the mean of .
The moment-generating function can be used in conjunction with
Markov's inequality
In probability theory, Markov's inequality gives an upper bound on the probability that a non-negative random variable is greater than or equal to some positive Constant (mathematics), constant. Markov's inequality is tight in the sense that for e ...
to bound the upper tail of a real random variable . This statement is also called the
Chernoff bound. Since
is monotonically increasing for
, we have
for any
and any , provided
exists. For example, when is a standard normal distribution and
, we can choose
and recall that
. This gives
, which is within a factor of of the exact value.
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
is non-negative, the moment generating function gives a simple, useful bound on the moments:
For any
and
.
This follows from the inequality
into which we can substitute
implies
for any
Now, if
and
, this can be rearranged to
.
Taking the expectation on both sides gives the bound on