Documentation

TauCeti.Probability.Distributions.Binomial.Basic

Elementary theory of the binomial distribution #

This file develops the moments, transforms, convolution law, and independent-sum characterization of Mathlib's binomial measure. The native law remains ProbabilityTheory.binomial n p on ℕ; real-valued moments and transforms use its cast pushforward Bin(ℝ, n, p). Its variance is n * p * (1 - p).

Main results #

References #

@[simp]
theorem TauCeti.Probability.pgf_binomial (n : ℕ) (p : ↑unitInterval) (t : ℝ) :
pgf id (ProbabilityTheory.binomial n p) t = (1 - ↑p + ↑p * t) ^ n

The probability-generating function of a binomial distribution.

The moment generating function of the real-valued binomial law.

The cumulant generating function of the real-valued binomial law.

The characteristic function of the real-valued binomial law.

The convolution of two native binomial laws with the same success probability is binomial, with the numbers of trials added.

theorem TauCeti.Probability.iIndepFun.hasLaw_sum_bernoulli {Ω : Type u_1} [MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} {ι : Type u_2} [Fintype ι] {p : ↑unitInterval} {X : ι → Ω → ℕ} (hindep : ProbabilityTheory.iIndepFun X P) (hX : ∀ (i : ι), ProbabilityTheory.HasLaw (X i) (ProbabilityTheory.bernoulliMeasure 1 0 p) P) :
ProbabilityTheory.HasLaw (fun (ω : Ω) => ∑ i : ι, X i ω) (ProbabilityTheory.binomial (Fintype.card ι) p) P

A finite sum of independent Bernoulli variables with common success probability p has the native binomial law, with as many trials as the index type has elements.

Variance #

The variance of the real-valued binomial measure itself.

The variance of a real-valued binomial random variable with parameters n and p is p(1-p)n.

The second raw moment of a real-valued binomial law.