Documentation

CslibFrontier.Probability.PMF.Coin

Biased coins #

Cslib.Probability.PMF.coin p is the coin on Bool showing true with probability p ∈ [0, 1]. Mathlib's PMF.bernoulli is deprecated in favor of ProbabilityTheory.bernoulliMeasure, which is a Measure; this is the PMF form, for building discrete distributions such as independent products (Cslib.Probability.PMF.pi) of coins.

Main definitions #

Main results #

noncomputable def Cslib.Probability.PMF.coin (p : ↑unitInterval) :

The coin showing true with probability p and false with probability 1 - p.

A fair coin is the uniform distribution on Bool.

As a measure, the coin is Mathlib's Bernoulli distribution with mass p on true.