Moment-generating function

From The Right Wiki
(Redirected from Moment generating function)
Jump to navigationJump to search

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.

Definition

Let X be a random variable with CDF FX. The moment generating function (mgf) of X (or FX), denoted by MX(t), is

MX(t)=E[etX]

provided this expectation exists for t in some open neighborhood of 0. That is, there is an h>0 such that for all t in h<t<h, E[etX] exists. If the expectation does not exist in an open neighborhood of 0, we say that the moment generating function does not exist.[1] In other words, the moment-generating function of X is the expectation of the random variable etX. More generally, when X=(X1,,Xn)T, an n-dimensional random vector, and t is a fixed vector, one uses tX=tTX instead of tX:

MX(t):=E(etTX).

MX(0) 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 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.[2] The series expansion of etX is

etX=1+tX+t2X22!+t3X33!++tnXnn!+.

Hence

MX(t)=E(etX)=1+tE(X)+t2E(X2)2!+t3E(X3)3!++tnE(Xn)n!+=1+tm1+t2m22!+t3m33!++tnmnn!+,

where mn is the nth moment. Differentiating MX(t) i times with respect to t and setting t=0, we obtain the ith moment about the origin, mi; see Calculations of moments below. If X is a continuous random variable, the following relation between its moment-generating function MX(t) and the two-sided Laplace transform of its probability density function fX(x) holds:

MX(t)={fX}(t),

since the PDF's two-sided Laplace transform is given as

{fX}(s)=esxfX(x)dx,

and the moment-generating function's definition expands (by the law of the unconscious statistician) to

MX(t)=E[etX]=etxfX(x)dx.

This is consistent with the characteristic function of X being a Wick rotation of MX(t) when the moment generating function exists, as the characteristic function of a continuous random variable X is the Fourier transform of its probability density function fX(x), and in general when a function f(x) is of exponential order, the Fourier transform of f 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 of the moment-generating function MX(t) when the latter exists.

Distribution Moment-generating function MX(t) Characteristic function φ(t)
Degenerate δa eta eita
Bernoulli P(X=1)=p 1p+pet 1p+peit
Binomial B(n,p) (1p+pet)n (1p+peit)n
Geometric (1p)kp pet1(1p)et,t<ln(1p) peit1(1p)eit
Negative binomial NB(r,p) (p1et+pet)r,t<ln(1p) (p1eit+peit)r
Poisson Pois(λ) eλ(et1) eλ(eit1)
Uniform (continuous) U(a,b) etbetat(ba) eitbeitait(ba)
Uniform (discrete) DU(a,b) eate(b+1)t(ba+1)(1et) eaite(b+1)it(ba+1)(1eit)
Laplace L(μ,b) etμ1b2t2,|t|<1/b eitμ1+b2t2
Normal N(μ,σ2) etμ+12σ2t2 eitμ12σ2t2
Chi-squared χk2 (12t)k2,t<1/2 (12it)k2
Noncentral chi-squared χk2(λ) eλt/(12t)(12t)k2 eiλt/(12it)(12it)k2
Gamma Γ(k,1θ) (1tθ)k,t<1θ (1itθ)k
Exponential Exp(λ) (1tλ1)1,t<λ (1itλ1)1
Beta 1+k=1(r=0k1α+rα+β+r)tkk! 1F1(α;α+β;it) (see Confluent hypergeometric function)
Multivariate normal N(μ,Σ) etT(μ+12Σt) etT(iμ12Σt)
Cauchy Cauchy(μ,θ) Does not exist eitμθ|t|
Multivariate Cauchy

MultiCauchy(μ,Σ)[3]

Does not exist eitTμtTΣt

Calculation

The moment-generating function is the expectation of a function of the random variable, it can be written as:

Note that for the case where X has a continuous probability density function f(x), MX(t) is the two-sided Laplace transform of f(x).

MX(t)=etxf(x)dx=(1+tx+t2x22!++tnxnn!+)f(x)dx=1+tm1+t2m22!++tnmnn!+,

where mn is the nth moment.

Linear transformations of random variables

If random variable X has moment generating function MX(t), then αX+β has moment generating function MαX+β(t)=eβtMX(αt)

MαX+β(t)=E[e(αX+β)t]=eβtE[eαXt]=eβtMX(αt)

Linear combination of independent random variables

If Sn=i=1naiXi, where the Xi are independent random variables and the ai are constants, then the probability density function for Sn is the convolution of the probability density functions of each of the Xi, and the moment-generating function for Sn is given by

MSn(t)=MX1(a1t)MX2(a2t)MXn(ant).

Vector-valued random variables

For vector-valued random variables X with real components, the moment-generating function is given by

MX(t)=E(et,X)

where t is a vector and , is the dot product.

Important properties

Moment generating functions are positive and log-convex,[citation needed] with M(0) = 1. An important property of the moment-generating function is that it uniquely determines the distribution. In other words, if X and Y are two random variables and for all values of t,

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

limni=0ntimii!

may not exist. The log-normal distribution 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 t = 0, then it is the exponential generating function of the moments of the probability distribution:

mn=E(Xn)=MX(n)(0)=dnMXdtn|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.

Other properties

Jensen's inequality provides a simple lower bound on the moment-generating function:

MX(t)eμt,

where μ is the mean of X. 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 xext is monotonically increasing for t>0, we have

P(Xa)=P(etXeta)eatE[etX]=eatMX(t)

for any t>0 and any a, provided MX(t) exists. For example, when X is a standard normal distribution and a>0, we can choose t=a and recall that MX(t)=et2/2. This gives P(Xa)ea2/2, which is within a factor of 1+a 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 X is non-negative, the moment generating function gives a simple, useful bound on the moments:

E[Xm](mte)mMX(t),

For any X,m0 and t>0. This follows from the inequality 1+xex into which we can substitute x=tx/m1 implies tx/metx/m1 for any x,t,m. Now, if t>0 and x,m0, this can be rearranged to xm(m/(te))metx. Taking the expectation on both sides gives the bound on E[Xm] in terms of E[etX]. As an example, consider XChi-Squared with k degrees of freedom. Then from the examples MX(t)=(12t)k/2. Picking t=m/(2m+k) and substituting into the bound:

E[Xm](1+2m/k)k/2em(k+2m)m.

We know that in this case the correct bound is E[Xm]2mΓ(m+k/2)/Γ(k/2). To compare the bounds, we can consider the asymptotics for large k. Here the moment-generating function bound is km(1+m2/k+O(1/k2)), where the real bound is km(1+(m2m)/k+O(1/k2)). The moment-generating function bound is thus very strong in this case.

Relation to other functions

Related to the moment-generating function are a number of other transforms that are common in probability theory:

Characteristic function
The characteristic function φX(t) is related to the moment-generating function via φX(t)=MiX(t)=MX(it): the characteristic function is the moment-generating function of iX or the moment generating function of X evaluated on the imaginary axis. This function can also be viewed as the Fourier transform of the probability density function, which can therefore be deduced from it by inverse Fourier transform.
Cumulant-generating function
The cumulant-generating function is defined as the logarithm of the moment-generating function; some instead define the cumulant-generating function as the logarithm of the characteristic function, while others call this latter the second cumulant-generating function.
Probability-generating function
The probability-generating function is defined as G(z)=E[zX]. This immediately implies that G(et)=E[etX]=MX(t).

See also

References

Citations

  1. Casella, George; Berger, Roger L. (1990). Statistical Inference. Wadsworth & Brooks/Cole. p. 61. ISBN 0-534-11958-1.
  2. Bulmer, M. G. (1979). Principles of Statistics. Dover. pp. 75–79. ISBN 0-486-63760-3.
  3. Kotz et al.[full citation needed] p. 37 using 1 as the number of degree of freedom to recover the Cauchy distribution

Sources

  • Casella, George; Berger, Roger (2002). Statistical Inference (2nd ed.). Thomson Learning. pp. 59–68. ISBN 978-0-534-24312-8.