In probability theory and statistics, the moment-generating function of a random variable X is
The moment-generating function generates the moments of the probability distribution, as follows:
If X has a continuous probability density function f(x) then the moment generating function is given by
where mi is the ith moment.
Regardless of whether probability distribution is continuous or not, the moment-generating function is given by the Riemann-Stieltjes integral
where F is the cumulative distribution function.
If X1, X2, ..., Xn is a sequence of independent (and not necessarily identically distributed) random variables, and
where the a i are constants, then the probability density function for S n is the convolution of the probability density functions of each of the X i and the moment-generating function for S n is given by
Related concepts include the characteristic function, the probability-generating function, and the cumulant-generating function. The cumulant-generating function is the logarithm of the moment-generating function.