3 QBS–Giry Bridge and Classical Distributions
This chapter connects the QBS probability monad to the classical Giry monad and provides concrete distributions (normal, Bernoulli, uniform) with their expected values.
3.1 Classical Distribution Embedding
Given a standard Borel space \(M\) with encoding \(f : M \to \mathbb {R}\) and decoding \(g : \mathbb {R} \to M\), and a probability \(P\) on \(\mathbb {R}\), the QBS probability \((\mathrm{id}, P)\) on \(R(M)\) represents \(P\).
\(\mathcal{N}(\mu , \sigma )\) as a QBS probability on \(\mathtt{realQ}\), using \((\mathrm{id}, \mathrm{normal\_ prob}\; \mu \; \sigma )\).
\(\mathrm{Bernoulli}(p)\) as a QBS probability on \(\mathtt{boolQ}\).
\(\mathrm{Uniform}[0,1]\) as a QBS probability on \(\mathtt{realQ}\).
The QBS probability recovers the original measure: \(\mu _{\mathrm{qbs}}(g^{-1}(U)) = P(g^{-1}(U))\) and \(\Pr _{\mathrm{qbs}}[U] = P(f(U))\).
The normal distribution is a QBS morphism in the mean parameter: \(\mu \mapsto \mathcal{N}(\mu , \sigma )\) is a morphism \(\mathtt{realQ} \to P(\mathtt{realQ})\).
\(\mathbb {E}[\mathrm{Bernoulli}(p)] = p\).
\(\mathbb {E}[\mathrm{Uniform}] = 1/2\).
\(\mathbb {E}[\mathcal{N}(\mu , \sigma )] = \mu \).
3.2 QBS–Giry Monad Connection
For \(p = (\alpha , \mu )\) on \(R(M)\), the pushforward \(\alpha _*(\mu )\) is a probability measure on \(M\).
For a probability \(P\) on a standard Borel \(M\), the QBS probability uses the standard Borel encoding/decoding.
\(\mathrm{qbs\_ to\_ giry}(\mathrm{giry\_ to\_ qbs}(P)) = P\).
\(\mathrm{giry\_ to\_ qbs}(\mathrm{qbs\_ to\_ giry}(p)) \sim p\) (up to equivalence).
QBS integration equals classical Lebesgue integration against the pushforward: \(\int _p f = \int _{\alpha _*(\mu )} f\).
Both sides reduce to \(\int _\mu f(\alpha (r))\, d\mu (r)\).