Exchangeable coin flips: the worked example of a random bias #
This file discharges the second worked example of the Exchangeability roadmap
(TauCetiRoadmap/Exchangeability/README.md, "Worked examples"):
A
Bool-valued sequence generated conditionally i.i.d. given a randomθ(drawθ, then flip i.i.d.κ (θ ω)-coins) is exchangeable, withω ↦ κ (θ ω)(κa two-point kernel) as the directing measure — genuinely: the generating construction makes it a witness ofConditionallyIIDWith, not merely a mixing representative.
The two-point kernel is coinKernel p = Ber(true, false, p), Mathlib's bernoulliMeasure bundled
as a ProbabilityMeasure Bool; the parameter θ is the first coordinate of the canonical space
I × (ℕ → Bool) and the bias measure π is arbitrary. As the roadmap insists, the directing
measure is the random probability measure ω ↦ coinKernel ω.1, not the bias ω ↦ ω.1 itself.
The example carries weight because the sequence is exchangeable without being independent:
not_iIndepFun_coinFlips exhibits a two-point bias law for which the coordinates are dependent, so
ConditionallyIID really is a wider class than i.i.d. and the constructed directing measure is not
a disguised constant.
Main results #
coinKernel— the two-point kernelp ↦ Ber(true, false, p), withmeasurable_coinKerneland the bias readoutcoinKernel_apply_true.conditionallyIIDWith_coinFlips— the coin-flip sequence is conditionally i.i.d. with directing measureω ↦ coinKernel ω.1, henceexchangeable_coinFlipsandcontractable_coinFlips.not_iIndepFun_coinFlips— for a bias that is genuinely random the flips are not independent.
The construction it instantiates is iidMixtureLaw in
TauCeti/Probability/Exchangeability/ConditionallyIID/Construct.lean. Nothing here is adapted from
cameronfreer/exchangeability.
The two-point kernel. coinKernel p is the law of one Bool-valued flip of a coin that
comes up true with probability p.
Phrasing the example through this kernel — rather than through a Bernoulli random variable —
keeps it independent of any particular parametrized-distribution API: all it needs is that the
family is measurable in the bias.
Equations
Instances For
The measure underlying coinKernel p is Mathlib's Bernoulli measure on Bool.
The bias is read back off the coin: coinKernel p gives mass p to {true}.
The two-point kernel is measurable in the bias, so it can direct a mixture.
The worked example. Draw a bias from π, then flip i.i.d. coins with that bias: the
resulting Bool-valued sequence is conditionally i.i.d. with directing measure
ω ↦ coinKernel ω.1.
This is the sharp conditional statement, not just the mixture identity: the generating construction puts the sequence and its directing measure on one space and pins their joint law.
The coin-flip sequence is conditionally i.i.d. (existential form).
The coin-flip sequence is exchangeable.
The coin-flip sequence is contractable.
Independent flips force a deterministic bias. If the coordinates of the coin-flip sequence
are independent, then the law of the bias — pushed forward along toNNReal — is a Dirac
measure.
Exchangeable but not independent. With the bias itself drawn from a nondegenerate two-point
law Ber(a, b, r) — two distinct biases a ≠ b, each of positive probability — the coin flips are
exchangeable (exchangeable_coinFlips) yet dependent.
So ConditionallyIID is strictly wider than i.i.d., and the directing measure the construction
supplies is genuinely random rather than an a.e. constant.