Binomial random variables #
This file defines the binomial distribution and binomial random variables,
and computes their expectation and variance. For n : ℕ and p : I,
the binomial distribution Bin(n, p) is defined as the cardinal of a random subset U
of Set.Iic n such that each k ∈ Set.Iic n belongs to U independently with probability p.
Main definition #
ProbabilityTheory.binomial: Binomial distribution on an arbitrary semiring with parametersnandp.
Implementation details #
We provide the definition binomial with notation Bin(n, P) as the corresponding measure
over ℕ. We also introduce a notation Bin(R, n p) for the same measure but over a general
AddMonoidWithOne R, that stands for Bin(n, p).map (Nat.cast : ℕ → R). This is in particular
useful if one is interested in the binomial distribution as a measure over ℝ or ℤ.
Results should be proven for both Bin(n, p) and Bin(R, n, p) when possible, using the first
one to prove the second. Note that results concerning Bin(R, n, p) may require
[MeasurableSingletonClass R] and/or [CharZero R].
When refering to Bin(n, p) in names, use binomial. When refering to Bin(R, n, p),
use map_cast_binomial.
Notation #
Bin(n, p) is the binomial distribution with parameters n and p in ℕ.
Bin(R, n, p) is the binomial distribution with parameters n and p in R.
The binomial probability distribution with parameter p.
Equations
Instances For
The binomial probability distribution with parameter p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The binomial probability distribution with parameter p valued in the semiring R.
Equations
- One or more equations did not get rendered due to their size.