Probability-generating functions #
This file defines the probability-generating function of a natural-number-valued random variable
and establishes its basic measure-theoretic API. The central results relate it to Mathlib's
moment-generating function and show that it turns sums of independent random variables into
products. The file then identifies the generating function of a finite measure on ℕ with the
sum of the power series carrying its singleton masses, so that the generating function is analytic
on (-1, 1) and its Taylor coefficients at the origin recover those masses;
consequently a law on ℕ is determined by its generating function near 0. Finally it computes
the generating functions of the standard discrete families: Bernoulli, binomial, Poisson, and
geometric, the last one on its exact integrability domain.
These results implement the definition, the generic API, the coefficient-recovery and uniqueness
statements, and the distribution-specific formulas of the probability-generating-function target
in TauCetiRoadmap/StandardDistributions/README.md, Layer 1.
The Poisson series calculation follows the proof pattern of Mathlib's
ProbabilityTheory.charFun_map_cast_poissonMeasure: both factor the Poisson weights out of the
exponential power series. The Bernoulli, binomial, and geometric calculations use Mathlib's
corresponding measure-integral formulas directly.
Main declarations #
TauCeti.Probability.pgf— the probability-generating function.TauCeti.Probability.pgf_exp— evaluation atexp tis a moment-generating function.TauCeti.Probability.integrable_pow_of_abs_le_one— on[-1, 1]the integrand is integrable under a finite measure.TauCeti.Probability.IndepFun.pgf_addandTauCeti.Probability.iIndepFun.pgf_sum— multiplicativity over binary and finite sums of independent random variables when the factor integrands are integrable.TauCeti.Probability.IndepFun.pgf_add_of_abs_le_oneandTauCeti.Probability.iIndepFun.pgf_sum_of_abs_le_one— the corresponding formulas on the interval[-1, 1], where integrability is automatic.Measure.pgf_convandMeasure.pgf_conv_of_abs_le_one— convolution becomes multiplication under the natural integrability hypotheses, and for finite measures on[-1, 1].TauCeti.Probability.hasSum_pgfandTauCeti.Probability.pgf_eq_tsum— the power-series expansion in the singleton masses, valid on[-1, 1].TauCeti.Probability.hasFPowerSeriesOnBall_pgfandTauCeti.Probability.analyticOnNhd_pgf— analyticity on the open unit ball.TauCeti.Probability.iteratedDeriv_pgf_zero— the Taylor coefficients at the origin are the singleton masses, withTauCeti.Probability.pgf_zeroandTauCeti.Probability.deriv_pgf_zeroreading off the first two.TauCeti.Probability.measure_eq_of_pgf_eventuallyEqandTauCeti.Probability.identDistrib_of_pgf_eventuallyEq— uniqueness of the law from the germ of the generating function at0, with the corollariesTauCeti.Probability.measure_eq_of_pgf_eqOnandTauCeti.Probability.identDistrib_of_pgf_eqOnreading the hypothesis off(-1, 1).TauCeti.Probability.pgf_bernoulliMeasure,pgf_binomial,pgf_poissonMeasure, andpgf_geometricMeasure— the standard discrete-family formulas.
The probability-generating function of a natural-number-valued random variable X with
respect to a measure μ.
Instances For
The defining integral formula for the probability-generating function. This is the canonical
way to unfold pgf, which is otherwise sealed.
The probability-generating function is unchanged by replacing the random variable almost everywhere.
The probability-generating function of the zero measure vanishes.
Evaluation of a probability-generating function at one gives the total mass.
A constant natural-number-valued random variable has the expected monomial generating function.
The probability-generating function can be computed on the law of the random variable.
Random variables with a given law have the same probability-generating function as that law.
Evaluating the probability-generating function at exp t recovers the moment-generating
function of the real-valued cast of the random variable.
For a finite measure, the integrand of a probability-generating function is integrable on
[-1, 1].
The probability-generating function of a sum of two independent natural-number-valued random variables is the product of their generating functions whenever both factor integrands are integrable.
The integrability hypotheses deliberately restrict the public statement so that it expresses a product of genuine expectations. Mathlib's totalized integral gives the same equality without these hypotheses, but in the non-integrable cases it is merely an artifact of totalization.
Under a finite measure, on [-1, 1] the probability-generating function of a
sum of two independent natural-number-valued random variables is the product of their generating
functions.
The probability-generating function sends convolution to multiplication whenever both factor integrands are integrable.
On [-1, 1], the probability-generating function sends convolution of finite measures to
multiplication.
A probability-generating function turns a finite sum of independent random variables into the product of their generating functions whenever every factor integrand is integrable.
On [-1, 1], a probability-generating function turns a finite sum of
independent random variables into the product of their generating functions.
Coefficient recovery and uniqueness #
A finite measure on ℕ is the weighted sum of Dirac masses ∑ ν {n} • δ n, so its
generating function is the sum of the power series ∑ ν.real {n} * t ^ n. The masses are
bounded by the total mass, so that series converges on the whole open unit ball and the generating
function is analytic there. Reading its Taylor coefficients at the origin returns the masses, and
hence a finite measure on ℕ, in particular a probability measure, is determined by its generating
function near 0.
Under a finite measure on ℕ, the probability-generating function is the sum of the power
series whose coefficients are the singleton masses, on [-1, 1].
The probability-generating function of a finite measure on ℕ has, at the origin, the formal
power series whose coefficients are the singleton masses, and that series converges on the open
unit ball.
The probability-generating function of a finite measure on ℕ is analytic on (-1, 1).
The Taylor coefficients at the origin of the probability-generating function of a finite
measure on ℕ are its singleton masses.
Evaluating at the origin the probability-generating function of a finite measure on ℕ gives
the mass of {0}. This is the n = 0 case of iteratedDeriv_pgf_zero, which simp normalises
away from iteratedDeriv.
The derivative at the origin of the probability-generating function of a finite measure on ℕ
is the mass of {1}. This is the n = 1 case of iteratedDeriv_pgf_zero, which simp
normalises away from iteratedDeriv.
A finite measure on ℕ, in particular a probability measure, is determined by the germ at the
origin of its probability-generating function.
A finite measure on ℕ, in particular a probability measure, is determined by its
probability-generating function on (-1, 1).
Two natural-number-valued random variables whose probability-generating functions agree near the origin are identically distributed.
Two natural-number-valued random variables whose probability-generating functions agree on
(-1, 1) are identically distributed.
The probability-generating function of a Bernoulli distribution.
The probability-generating function of a binomial distribution.
At the zero parameter, Mathlib's geometric distribution is a Dirac mass at zero, so its probability-generating function is identically one.
For a nonzero success probability, the geometric probability-generating-function integrand is integrable exactly on the open interval determined by the geometric-series ratio.
The probability-generating function of a geometric distribution with nonzero parameter, on its
exact integrability domain. The boundary case p = 1, whose law is a Dirac mass at zero, is
included.