Template:Short description 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.
DefinitionEdit
Univariate caseEdit
If X is a discrete random variable taking values x in the non-negative integers {0,1, ...}, then the probability generating function of X is defined as <ref>Template:Cite book</ref>
<math display="block">G(z) = \operatorname{E} (z^X) = \sum_{x=0}^{\infty} p(x) z^x,</math> where <math>p</math> is the probability mass function of <math>X</math>. Note that the subscripted notations <math>G_X</math> and <math>p_X</math> are often used to emphasize that these pertain to a particular random variable <math>X</math>, and to its distribution. The power series converges absolutely at least for all complex numbers <math>z</math> with <math>|z|<1</math>; the radius of convergence being often larger.
Multivariate caseEdit
If Template:Math is a discrete random variable taking values Template:Math in the Template:Mvar-dimensional non-negative integer lattice Template:Math, then the probability generating function of Template:Math is defined as <math display="block">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},</math> where Template:Mvar is the probability mass function of Template:Mvar. The power series converges absolutely at least for all complex vectors <math>z = (z_1, ... z_d) \isin \mathbb{C}^d</math> with <math>\text{max}\{|z_1|, ..., |z_d|\} \le 1.</math>
PropertiesEdit
Power seriesEdit
Probability generating functions obey all the rules of power series with non-negative coefficients. In particular, <math>G(1^-) = 1</math>, where <math>G(1^-) = \lim_{x\to 1, x<1} G(x)</math>, x approaching 1 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 expectationsEdit
The following properties allow the derivation of various basic quantities related to <math>X</math>:
- The probability mass function of <math>X</math> is recovered by taking derivatives of <math>G</math>, <math display="block">p(k) = \operatorname{Pr}(X = k) = \frac{G^{(k)}(0)}{k!}.</math>
- It follows from Property 1 that if random variables <math>X</math> and <math>Y</math> have probability-generating functions that are equal, <math>G_X = G_Y</math>, then <math>p_X = p_Y</math>. That is, if <math>X</math> and <math>Y</math> have identical probability-generating functions, then they have identical distributions.
- The normalization of the probability mass function can be expressed in terms of the generating function by <math display="block">\operatorname{E}[1] = G(1^-) = \sum_{i=0}^\infty p(i) = 1.</math> The expectation of <math>X</math> is given by <math display="block"> \operatorname{E}[X] = G'(1^-).</math> More generally, the <math>k^{th}</math>factorial moment, <math>\operatorname{E}[X(X - 1) \cdots (X - k + 1)]</math> of <math>X</math> is given by <math display="block">\operatorname{E}\left[\frac{X!}{(X-k)!}\right] = G^{(k)}(1^-), \quad k \geq 0.</math> So the variance of <math>X</math> is given by <math display="block">\operatorname{Var}(X)=G(1^-) + G'(1^-) - \left [G'(1^-)\right ]^2.</math> Finally, the Template:Mvar-th raw moment of X is given by <math display="block">\operatorname{E}[X^k] = \left(z\frac{\partial}{\partial z}\right)^k G(z) \Big|_{z=1^-}</math>
- <math>G_X(e^t) = M_X(t)</math> where X is a random variable, <math>G_X(t)</math> is the probability generating function (of <math>X</math>) and <math>M_X(t)</math> is the moment-generating function (of <math>X</math>).
Functions of independent random variablesEdit
Probability generating functions are particularly useful for dealing with functions of independent random variables. For example:
- If <math>X_i, i=1,2,\cdots,N</math> is a sequence of independent (and not necessarily identically distributed) random variables that take on natural-number values, and
<math display="block">S_N = \sum_{i=1}^N a_i X_i,</math> where the <math>a_i</math> are constant natural numbers, then the probability generating function is given by <math display="block">G_{S_N}(z) = \operatorname{E}(z^{S_N}) = \operatorname{E} \left( z^{\sum_{i=1}^N a_i X_i,} \right) = G_{X_1}( z^{a_1})G_{X_2}(z^{a_2})\cdots G_{X_N}(z^{a_N}).</math>
- In particular, if <math>X</math> and <math>Y</math> are independent random variables:
<math display="block">G_{X+Y}(z) = G_X(z) \cdot G_Y(z)</math> and <math display="block">G_{X-Y}(z) = G_X(z) \cdot G_Y(1/z).</math>
- In the above, the number <math>N</math> of independent random variables in the sequence is fixed. Assume <math>N</math> is discrete random variable taking values on the non-negative integers, which is independent of the <math>X_i</math>, and consider the probability generating function <math>G_N</math>. If the <math>X_i</math> are not only independent but also identically distributed with common probability generating function <math>G_X = G_{X_i}</math>, then
<math display="block">G_{S_N}(z) = G_N(G_X(z)).</math> This can be seen, using the law of total expectation, as follows: <math display="block"> \begin{align} G_{S_N}(z) & = \operatorname{E}(z^{S_N}) = \operatorname{E}(z^{\sum_{i=1}^N X_i}) \\[4pt] & = \operatorname{E}\big(\operatorname{E}(z^{\sum_{i=1}^N X_i} \mid N) \big) = \operatorname{E}\big( (G_X(z))^N\big) =G_N(G_X(z)). \end{align} </math> This last fact is useful in the study of Galton–Watson processes and compound Poisson processes.
- When the <math>X_i</math> are not supposed identically distributed (but still independent and independent of <math>N</math>), we have
<math display="block">G_{S_N}(z) = \sum_{n \ge 1} f_n \prod_{i=1}^n G_{X_i}(z),</math> where <math>f_n = \Pr(N=n).</math> For identically distributed <math>X_i</math>s, this simplifies to the identity stated before, but the general case is sometimes useful to obtain a decomposition of <math>S_N</math> by means of generating functions.
ExamplesEdit
- The probability generating function of an almost surely constant random variable, i.e. one with <math>Pr(X=c) = 1</math> and <math>Pr(X\neq c) = 0</math> is <math display="block">G(z) = z^c. </math>
- The probability generating function of a binomial random variable, the number of successes in <math>n</math> trials, with probability <math>p</math> of success in each trial, is <math display="block">G(z) = \left[(1-p) + pz\right]^n. </math> Note: it is the <math>n</math>-fold product of the probability generating function of a Bernoulli random variable with parameter <math>p</math>. Template:Pb So the probability generating function of a fair coin, is <math display="block">G(z) = 1/2 + z/2. </math>
- The probability generating function of a negative binomial random variable on <math>\{0,1,2 \cdots\}</math>, the number of failures until the <math>r^{th}</math> success with probability of success in each trial <math>p</math>, is <math display="block">G(z) = \left(\frac{p}{1 - (1-p)z}\right)^r,</math> which converges for <math>|z| < \frac{1}{1-p}</math>. Template:Pb Note that this is the <math>r</math>-fold product of the probability generating function of a geometric random variable with parameter <math>1-p</math> on <math>\{0,1,2,\cdots\}</math>.
- The probability generating function of a Poisson random variable with rate parameter <math>\lambda</math> is <math display="block">G(z) = e^{\lambda(z - 1)}.</math>
Related conceptsEdit
The probability generating function is an example of a generating function of a sequence: see also formal power series. It is equivalent to, and sometimes called, the z-transform of the probability mass function.
Other generating functions of random variables include the moment-generating function, the characteristic function and the cumulant generating function. The probability generating function is also equivalent to the factorial moment generating function, which as <math>\operatorname{E}\left[z^X\right]</math> can also be considered for continuous and other random variables.
Template:More citations needed