The binomial distribution #
This file defines the probability mass function of the binomial distribution.
Main results #
binomial_one_eq_bernoulli
: Forn = 1
, it is equal toPMF.bernoulli
.
The binomial PMF
: the probability of observing exactly i
“heads” in a sequence of n
independent coin tosses, each having probability p
of coming up “heads”.
Equations
Instances For
@[simp]
theorem
PMF.binomial_apply_zero
(p : ENNReal)
(h : p ≤ 1)
(n : ℕ)
:
(PMF.binomial p h n) 0 = (1 - p) ^ n
@[simp]
theorem
PMF.binomial_apply_last
(p : ENNReal)
(h : p ≤ 1)
(n : ℕ)
:
(PMF.binomial p h n) (Fin.last n) = p ^ n
theorem
PMF.binomial_one_eq_bernoulli
(p : ENNReal)
(h : p ≤ 1)
:
PMF.binomial p h 1 = PMF.map (fun (x : Bool) => bif x then 1 else 0) (PMF.bernoulli p h)
The binomial distribution on one coin is the bernoully distribution.