Introduction to Probability Generating Functions (pgf)

Welcome to one of the most clever tools in statistics! A Probability Generating Function (pgf) might sound intimidating, but think of it as a "mathematical storage box." Instead of carrying around a long table of probabilities, we pack them all into a single algebraic expression.

In this chapter, you will learn how to turn a probability distribution into a function, how to use that function to find the mean and variance, and how to combine different random variables with ease. If you enjoy algebra and a bit of calculus, you’ll find that pgfs make complex statistical problems much simpler!

1. What is a PGF?

For a discrete random variable \(X\) that takes non-negative integer values (0, 1, 2...), the pgf is defined as:

\( G_X(t) = E(t^X) = \sum P(X=x)t^x \)

In plain English: To make a pgf, you take each possible outcome \(x\), use it as the power of a dummy variable \(t\), and multiply it by its probability.

A Simple Example

Imagine you have a weird 3-sided die where:
\(P(X=0) = 0.2\)
\(P(X=1) = 0.5\)
\(P(X=2) = 0.3\)

The pgf would be:
\(G_X(t) = 0.2t^0 + 0.5t^1 + 0.3t^2\)
Which simplifies to: \(G_X(t) = 0.2 + 0.5t + 0.3t^2\)

Quick Review:
The coefficient (the number in front) is the probability.
The power of \(t\) is the value of the random variable.

Did you know?
The variable \(t\) doesn't actually "stand" for anything in the real world. It’s just a placeholder to keep our probabilities organized by their powers.

2. Important Properties of PGFs

Before we dive deeper, there are two "golden rules" for pgfs that you should always remember:

1. The Sum of Probabilities: If you substitute \(t = 1\) into any valid pgf, the result must be 1.
\(G_X(1) = \sum P(X=x)(1)^x = \sum P(X=x) = 1\).

2. Finding Probabilities: To find \(P(X=k)\), you simply look for the coefficient of \(t^k\). For example, in our die example above, the coefficient of \(t^2\) is 0.3, so \(P(X=2) = 0.3\).

Key Takeaway: A pgf is just a different way of writing a probability distribution table. \(G_X(1)\) always equals 1!

3. Finding Mean and Variance using PGFs

This is where pgfs become really powerful. We can find the Expected Value (mean) and Variance using differentiation.

Finding the Mean (\(\mu\))

To find the mean, we take the first derivative of the pgf and then plug in \(t = 1\):
\(\mu = E(X) = G_X'(1)\)

Finding the Variance (\(\sigma^2\))

Finding the variance requires the second derivative as well. The formula is:
\(\sigma^2 = G_X''(1) + G_X'(1) - [G_X'(1)]^2\)
Or, written using \(\mu\):
\(\sigma^2 = G_X''(1) + \mu - \mu^2\)

Step-by-Step Process:
1. Differentiate \(G_X(t)\) to get \(G_X'(t)\).
2. Differentiate again to get \(G_X''(t)\).
3. Substitute \(t=1\) into both.
4. Plug the results into the variance formula.

Don't worry if this seems tricky at first! Just remember that \(G_X'(1)\) is the mean, and the variance formula is just a small extra step. Practice the derivation a few times and it will stick.

4. PGFs for Standard Distributions

The syllabus requires you to know (and be able to derive) the pgfs for common distributions. Here is a handy summary:

Bernoulli Distribution: \(X \sim B(1, p)\)
Outcomes are 0 (with probability \(q\)) and 1 (with probability \(p\)).
\(G_X(t) = q + pt\)

Binomial Distribution: \(X \sim B(n, p)\)
This is just \(n\) independent Bernoulli trials added together.
\(G_X(t) = (q + pt)^n\)

Geometric Distribution: \(X \sim Geo(p)\)
This describes the number of trials until the first success.
\(G_X(t) = \frac{pt}{1 - qt}\)

Discrete Uniform Distribution:
Where \(X\) takes values \(1, 2, ..., n\) with equal probability \(1/n\).
\(G_X(t) = \frac{1}{n}(t + t^2 + ... + t^n) = \frac{t(1 - t^n)}{n(1 - t)}\)

Common Mistake to Avoid:
In the Geometric distribution, remember that \(q = 1 - p\). Make sure you don't mix them up in the fraction!

5. Sum of Independent Random Variables

One of the best "tricks" in statistics is how pgfs handle sums. If you have two independent random variables \(X\) and \(Y\), and you want to find the pgf of their sum \(Z = X + Y\), you simply multiply their pgfs!

\(G_{X+Y}(t) = G_X(t) \times G_Y(t)\)

Analogy:
Think of it like combining two playlists. If playlist \(X\) is in one box and playlist \(Y\) is in another, multiplying the boxes gives you one giant playlist containing all possible combinations of songs (outcomes).

Example:
If \(X \sim B(n, p)\) and \(Y \sim B(m, p)\), then:
\(G_{X+Y}(t) = (q + pt)^n \times (q + pt)^m = (q + pt)^{n+m}\).
This proves that the sum of two Binomial variables is also a Binomial variable with \(n+m\) trials!

Key Takeaway: Summing independent variables = Multiplying their pgfs. This is much easier than creating a giant probability table!

Final Summary Checklist

Before you move on to practice questions, make sure you can:
• Create a pgf from a probability table.
• Find the mean by calculating \(G_X'(1)\).
• Find the variance using \(G_X''(1) + \mu - \mu^2\).
• Recognize and derive the pgfs for Bernoulli, Binomial, and Geometric distributions.
• Combine independent variables by multiplying their functions.

You've got this! PGFs are just a clever way of using algebra to do the "heavy lifting" of statistics for you.