時間序列︰生成函數《六》

唐‧孟郊 《登科後

昔日齷齪不足誇,
今朝放蕩思無涯。
春風得意馬蹄疾,
一日看盡長安花。

 

縱想暢寫生成花,高妙鉤沈難為功,祇得假借書自有,走馬看花總人情。

The book “generatingfunctionology”
 

gf3.jpg


This book was originally published by Academic Press in 1990. A Second Edition appeared in 1994, and the Third Edition is now available from the publisher or from your favorite bookstore.

The Second Edition can be downloaded from this page. If you download the book you are agreeing to the following terms:


Copyright 1990, 1994 by Academic Press, Inc.;
Copyright 2004 by Herbert S. Wilf; Copyright 2006 by A K Peters, Ltd.

Reproduction of the downloaded version is permitted for any valid educational purpose of an institution of learning, in which case only the reasonable costs of reproduction may be charged. Reproduction for profit or for any commercial purposes is strictly prohibited. It is not permitted for a web site other than this one to offer the book directly for downloading. Other web sites are cordially invited to link to this page, but must not take the file and offer it themselves.


 

雞飛時起鴻鵠志,狗跳主迎舊日結,眼前大好勢所趨,豈敢獨闖陰陽界。

Probability-generating function

 In probability theory, the probability generating function of a discrete random variable is a power series representation (the generating function) of the probability mass function of the random variable. Probability generating functions are often employed for their succinct description of the sequence of probabilities Pr(X = i) in the probability mass function for a random variable X, and to make available the well-developed theory of power series with non-negative coefficients.

Definition

Univariate case

If X is a discrete random variable taking values in the non-negative integers {0,1, …}, then the probability generating function of X is defined as [1]

G(z)=\operatorname {E} (z^{X})=\sum _{x=0}^{\infty }p(x)z^{x},

where p is the probability mass function of X. Note that the subscripted notations GX and pX are often used to emphasize that these pertain to a particular random variable X, and to its distribution. The power series converges absolutely at least for all complex numbers z with |z| ≤ 1; in many examples the radius of convergence is larger.

Multivariate case

If X = (X1,…,Xd ) is a discrete random variable taking values in the d-dimensional non-negative integer lattice {0,1, …}d, then the probability generating function of X is defined as

G(z)=G(z_{1},\ldots ,z_{d})=\operatorname {E} {\bigl (}z_{1}^{X_{1}}\cdots z_{d}^{X_{d}}{\bigr )}=\sum _{x_{1},\ldots ,x_{d}=0}^{\infty }p(x_{1},\ldots ,x_{d})z_{1}^{x_{1}}\cdots z_{d}^{x_{d}},

where p is the probability mass function of X. The power series converges absolutely at least for all complex vectors z = (z1,…,zd ) ∈ ℂd with max{|z1|,…,|zd |} ≤ 1.

Properties

Power series

Probability generating functions obey all the rules of power series with non-negative coefficients. In particular, G(1) = 1, where G(1) = limz→1G(z) from below, since the probabilities must sum to one. So the radius of convergence of any probability generating function must be at least 1, by Abel’s theorem for power series with non-negative coefficients.

Probabilities and expectations

The following properties allow the derivation of various basic quantities related to X:

1. The probability mass function of X is recovered by taking derivatives of G

  p(k)=\operatorname {Pr} (X=k)={\frac {G^{(k)}(0)}{k!}}.

2. It follows from Property 1 that if random variables X and Y have probability generating functions that are equal, GX = GY, then pX = pY. That is, if X and Y have identical probability generating functions, then they have identical distributions.

3. The normalization of the probability density function can be expressed in terms of the generating function by

\operatorname {E} (1)=G(1^{-})=\sum _{i=0}^{\infty }f(i)=1.

The expectation of X is given by

  \operatorname {E} \left(X\right)=G'(1^{-}).

More generally, the kth factorial moment, {\textrm {E}}(X(X-1)\cdots (X-k+1)) of X is given by

  {\textrm {E}}\left({\frac {X!}{(X-k)!}}\right)=G^{(k)}(1^{-}),\quad k\geq 0.

So the variance of X is given by

\operatorname {Var} (X)=G''(1^{-})+G'(1^{-})-\left[G'(1^{-})\right]^{2}.

4. G_{X}(e^{t})=M_{X}(t) where X is a random variable,  G_{X}(t) is the probability generating function (of X) and  M_{X}(t) is the moment-generating function (of X) .

……

Moment-generating function

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. Note, however, that not all random variables have moment-generating functions.

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

In probability theory and statistics, the moment-generating function of a random variable X is

M_{X}(t):=\mathbb {E} \!\left[e^{tX}\right],\quad t\in \mathbb {R} ,

wherever this expectation exists. In other terms, the moment-generating function can be interpreted as the expectation of the random variable  e^{tX}.

  M_{X}(0) always exists and is equal to 1.

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.

More generally, where  \mathbf {X} =(X_{1},\ldots ,X_{n})T, an n-dimensional random vector, and t a fixed vector, one uses  \mathbf {t} \cdot \mathbf {X} =\mathbf {t} ^{\mathrm {T} }\mathbf {X} instead of tX:

  M_{\mathbf {X} }(\mathbf {t} ):=\mathbb {E} \!\left(e^{\mathbf {t} ^{\mathrm {T} }\mathbf {X} }\right).

The reason for defining this function is that it can be used to find all the moments of the distribution.[1] The series expansion of etX is:

e^{t\,X}=1+t\,X+{\frac {t^{2}\,X^{2}}{2!}}+{\frac {t^{3}\,X^{3}}{3!}}+\cdots +{\frac {t^{n}\,X^{n}}{n!}}+\cdots .

Hence:

{\begin{aligned}M_{X}(t)=\mathbb {E} (e^{t\,X})&=1+t\,\mathbb {E} (X)+{\frac {t^{2}\,\mathbb {E} (X^{2})}{2!}}+{\frac {t^{3}\,\mathbb {E} (X^{3})}{3!}}+\cdots +{\frac {t^{n}\,\mathbb {E} (X^{n})}{n!}}+\cdots \\&=1+tm_{1}+{\frac {t^{2}m_{2}}{2!}}+{\frac {t^{3}m_{3}}{3!}}+\cdots +{\frac {t^{n}m_{n}}{n!}}+\cdots ,\end{aligned}}

where mn is the nth moment.

Differentiating MX(t) i times with respect to t and setting t = 0 we hence obtain the ith moment about the origin, mi, see Calculations of moments below.

───