Explore modules

Probability Generating Functions

Multiply probability polynomials to discover sums, zero mass and moments.

Free theory article

Multiply probability polynomials to discover sums, zero mass and moments.

Concept & interpretation

In probability theory, the probability generating function (PGF) is a useful tool for dealing with discrete random variables that take non-negative integer values. By representing the probabilities of a random variable as the coefficients of a polynomial (or power series), we can use algebraic operations like differentiation and polynomial multiplication to derive moments and distributions of sums.

Experiment

Use the Probability Generating Functions module to visualize how generating functions multiply when adding independent random variables.

  1. Set the Distribution to Die.
  2. Set Independent copies to 2. The canvas visualizes the probabilities of the sum of two dice (from 2 to 12).
  3. Notice the triangular shape of the probabilities, which results from the polynomial convolution (multiplication) of the uniform distributions.
  4. Change the Probe z to 0.5. Observe the computed PGF of sum, which evaluates the combined polynomial at z = 0.5.
  5. Set Independent copies to 0. The polynomial becomes exactly G(z) = 1 (an empty sum is identically zero with probability 1).
Read the full free theory article