- Probability-generating function
In
probability theory , the probability-generating function of adiscrete random variable is apower series representation (thegenerating function ) of theprobability mass function of the random variable. Probability-generating functions are often employed for their succinct description of the sequence of probabilities Pr("X" = "i"), and to make available the well-developed theory of power series with non-negative coefficients.Definition
If "N" is a discrete random variable taking values on some subset of the non-negative integers, {"0,1, ..."}, then the "probability-generating function" of "N" is defined as::where "fN" is the probability mass function of "N". Note that the equivalent notation "G""N" is sometimes used to distinguish between the probability-generating functions of several random variables.
Properties
Power series
Probability-generating functions obey all the rules of power series with non-negative coefficients. In particular, "G"(1−) = 1, since the probabilities must sum to one, and where "G"(1−) = limz→1"G"("z") from below. So the
radius of convergence of any probability-generating function must be at least 1, byAbel'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
derivative s of "G":
2. It follows from Property 1 that if we have two random variables "X" and "Y", and "G""X" = "G""Y", then "f""X" = "f""Y". That is, if "X" and "Y" have identical probability-generating functions, then they are identically distributed.
3. The normalization of the probability density function can be expressed in terms of the generating function by
:
The expectation of "X" is given by
:
More generally, the "k"th factorial moment, E("X"("X" − 1) ... ("X "− "k" + 1)), of "X" is given by
:
So the
variance of "X" is given by:
4."G""X"() = "M""X"(t) where "X" is a random variable, G(t) is the probability generating function and M(t) is the
moment-generating function .Functions of independent random variables
Probability-generating functions are particularly useful for dealing with functions of independent random variables. For example:
* If "X"1, "X"2, ..., "X"n is a sequence of independent (and not necessarily identically distributed) random variables, and
::
:where the "a"i are constants, then the probability-generating function is given by
::
:For example, if
::
:then the probability-generating function, "G""Sn"("z"), is given by
::
:It also follows that the probability-generating function of the difference of two independent random variables "S" = "X"1 − "X"2 is
::
*Suppose that "N" is also an independent, discrete random variable taking values on the non-negative integers, with probability-generating function "G""N". If the "X"1, "X"2, ..., "X"N are independent "and" identically distributed with common probability-generating function "G"X, then
::
:This can be seen as follows:
::
:This last fact is useful in the study of
Galton–Watson process es.:Suppose again that "N" is also an independent, discrete random variable taking values on the non-negative integers, with probability-generating function "G""N". If the "X"1, "X"2, ..., "X"N are independent, but "not" identically distributed random variables, where denotes the probability generating function of , then it holds
::
:For identically distributed "Xi" this simplifies to the identity stated before. The general case is sometimes useful to obtain a decomposition of "SN" by means of generating functions.
Examples
* The probability-generating function of a constant random variable, i.e. one with Pr("X" = "c") = 1, is
::
* The probability-generating function of a binomial random variable, the number of successes in "n" trials, with probability "p" of success in each trial, is
::
:Note that this is the "n"-fold product of the probability-generating function of a Bernoulli random variable with parameter "p".
* The probability-generating function of a negative binomial random variable, the number of trials required to obtain the "r"th success with probability of success in each trial "p", is
::
:Note that this is the "r"-fold product of the probability generating function of a geometric random variable.
* The probability-generating function of a Poisson random variable with rate parameter λ is
::
Example calculation: use of bivariate generating functions
The following example illustrates a very common technique the manipulation of PGFs: the use of bivariate super generating functions to compute the ordinary generating function (OGF) of the PGFs of a sequence of random variables.
Suppose you sample a system that can assume two states, "X" and "Y", "X" with probability "p" and "Y" with probability 1 − "p", e.g. a coin being flipped, obtaining the sequence of samples:where the system was sampled "n" times and has no memory.
Define the random variable to be the number of changes from one sample to the next in a sequence of "n" samples, i.e. how often was different from . For example, the sequence:has two changes, as does:We want to calculate the PGF of , which we will do by using bivariate generating functions.
We introduce the bivariate GF given by:i.e. is the ordinary generating function of the PGFs of the This step is completely general and indeed the core of the method.
Now let be the probability of having "k" changes in a sequence of "n" samples, where the last sample was an "X". Similarly, let be the probability of having "k" changes in a sequence of "n" samples, where the last sample was a "Y", and put:so that:
Now we clearly have:because having zero changes means getting a sequence of all "Xs" or "Ys."
For we find:because e.g. to have "k" changes in a sequence of length "n" that ends in "X", we either append an "X" to a sequence having "k" − 1 changes and ending in "Y", or append an "X" to a sequence having "k" changes and ending in "X".
Summing these equations over "n" and "k" and writing "X" for "X(z, u)" and "Y" for "Y(z, u)", we obtain:and:The solution of this system is:and:
We may now use the general identity:to calculate the factorial moments of E.g. the OGF of the expectations is given by:from which we find (extracting coefficients) that:
An extensive discussion of this problem, as well as solutions by other methods,may be found on "Les-Mathematiques.net" (external links).
Example calculation: bivariate generating functions and differential equations
Consider the following balls and urns problem: suppose we have an urn containing "n" distinguishable balls, i.e. bearing labels from "1" to "n". We pick one of the balls at random and remove it from the urn. We also remove all balls whose labels are larger than the one we picked from the urn. E.g. if we picked ball number one, the urn is emptied after one operation. We repeat until the urn is empty. E.g. for an urn containing ten balls, the sequence of picks 6-3-1 would empty the urn in three operations. We introduce the random variable , which gives the number of picks needed to empty the urn. Our goal is to compute all of its moments, and we will do so using exactly the same bivariate generating function as in the previous example, namely the OGF of the PGFs::
We let be the probability of emptying an urn containing "n" balls with "k" operations, so that:We find that:because to empty the urn with one operation, we must pick the ball labelled "1". The remaining probabilities are computed recursively, e.g. we pick the ball with the largest label with probability , leaving balls (this is ). We pick the ball with the next-to-largest label with probability , leaving balls (this is ), etc. The upper bound for "r" is , because we must have (we cannot e.g. empty an urn containing six balls using seven operations).
Next we set for
Wikimedia Foundation. 2010.