Consider the function where is a positive constant. The following shows the derivatives of this function.

Note that the derivative of at each order is a multiple of a Poisson probability. Thus the Poisson distribution is coded by the function . Because of this reason, such a function is called a generating function (or probability generating function). This post discusses some basic facts about the generating function (gf) and its cousin, the moment generating function (mgf). One important characteristic is that these functions generate probabilities and moments. Another important characteristic is that there is a one-to-one correspondence between a probability distribution and its generating function and moment generating function, i.e. two random variables with different cumulative distribution functions cannot have the same gf or mgf. In some situations, this fact is useful in working with independent sum of random variables.

________________________________________________

**The Generating Function**

Suppose that is a random variable that takes only nonegative integer values with the probability function given by

The idea of the generating function is that we use a power series to capture the entire probability distribution. The following defines the generating function that is associated with the above sequence , .

Since the elements of the sequence are probabilities, we can also call the generating function of the probability distribution defined by the sequence in . The generating function is defined wherever the power series converges. It is clear that at the minimum, the power series in converges for .

We discuss the following three properties of generating functions:

- The generating function completely determines the distribution.
- The moments of the distribution can be derived from the derivatives of the generating function.
- The generating function of a sum of independent random variables is the product of the individual generating functions.

The Poisson generating function at the beginning of the post is an example demonstrating property 1 (see Example 0 below for the derivation of the generating function). In some cases, the probability distribution of an independent sum can be deduced from the product of the individual generating functions. Some examples are given below.

________________________________________________

**Generating Probabilities**

We now discuss the property 1 indicated above. To see that generates the probabilities, let’s look at the derivatives of :

By letting above, all the terms vanishes except for the constant term. We have:

Thus the generating function is a compact way of encoding the probability distribution. The probability distribution determines the generating function as seen in . On the other hand, and demonstrate that the generating function also determines the probability distribution.

________________________________________________

**Generating Moments**

The generating function also determines the moments (property 2 indicated above). For example, we have:

Note that . Thus the higher moment can be expressed in terms of and where .

________________________________________________

**More General Definitions**

Note that the definition in can also be interpreted as the mathematical expectation of , i.e., . This provides a way to define the generating function for random variables that may take on values outside of the nonnegative integers. The following is a more general definition of the generating function of the random variable , which is defined for all where the expectation exists.

________________________________________________

**The Generating Function of Independent Sum**

Let be independent random variables with generating functions , respectively. Then the generating function of is given by the product .

Let be the generating function of the independent sum . The following derives . Note that the general form of generating function is used.

The probability distribution of a random variable is uniquely determined by its generating function. In particular, the generating function of the independent sum that is derived in is unique. So if the generating function is of a particular distribution, we can deduce that the distribution of the sum must be of the same distribution. See the examples below.

________________________________________________

**Example 0**

In this example, we derive the generating function of the Poisson distribution. Based on the definition, we have:

**Example 1**

Suppose that are independent random variables where each has a Bernoulli distribution with probability of success . Let . The following is the generating function for each .

Then the generating function of the sum is . The following is the binomial expansion:

By definition , the generating function of is:

Comparing and , we have

The probability distribution indicated by and is that of a binomial distribution. Since the probability distribution of a random variable is uniquely determined by its generating function, the independent sum of Bernoulli distributions must ave a Binomial distribution.

**Example 2**

Suppose that are independent and have Poisson distributions with parameters , respectively. Then the independent sum has a Poisson distribution with parameter .

Let be the generating function of . For each , the generating function of is . The key to the proof is that the product of the has the same general form as the individual .

The generating function in is that of a Poisson distribution with mean . Since the generating function uniquely determines the distribution, we can deduce that the sum has a Poisson distribution with parameter .

**Example 3**

In rolling a fair die, let be the number shown on the up face. The associated generating function is:

The generating function can be further reduced as:

Suppose that we roll the fair dice 4 times. Let be the sum of the 4 rolls. Then the generating function of is

The random variable ranges from 4 to 24. Thus the probability function ranges from to . To find these probabilities, we simply need to decode the generating function . For example, to find , we need to find the coefficient of the term in the polynomial . To help this decoding, we can expand two of the polynomials in .

Based on the above polynomials, there are three ways of forming . They are: , , . Thus we have:

To find the other probabilities, we can follow the same decoding process.

________________________________________________

**Remark**

The probability distribution of a random variable is uniquely determined by its generating function. This fundamental property is useful in determining the distribution of an independent sum. The generating function of the independent sum is simply the product of the individual generating functions. If the product is of a certain distributional form (as in Example 1 and Example 2), then we can deduce that the sum must be of the same distribution.

We can also decode the product of generating functions to obtain the probability function of the independent sum (as in Example 3). The method in Example 3 is quite tedious. But one advantage is that it is a “machine process”, a pretty fool proof process that can be performed mechanically.

The machine process is this: Code the individual probability distribution in a generating function . Then raise it to . After performing some manipulation to , decode the probabilities from .

As long as we can perform the algebraic manipulation carefully and correctly, this process will be sure to provide the probability distribution of an independent sum.

________________________________________________

**The Moment Generating Function**

The moment generating function of a random variable is on all real numbers for which the expected value exists. The moments can be computed more directly using an mgf. From the theory of mathematical analysis, it can be shown that if exists on some interval , then the derivatives of of all orders exist at . Furthermore, it can be show that .

Suppose that is the generating function of a random variable. The following relates the generating function and the moment generating function.

________________________________________________

**Reference**

- Feller W.
*An Introduction to Probability Theory and Its Applications*, Third Edition, John Wiley & Sons, New York, 1968

thank you for the details for moment generating functions

if you can add more about mgf (moment generating functions) such as their properties it’s may be very useful more than this

thank you again

Pingback: The big 3 claim frequency models | Topics in Actuarial Modeling