Exact Bayes for the posterior kernel at atoms #
Mathlib characterizes the posterior kernel κ†μ almost everywhere. On discrete spaces an
ae-fact holds at every atom of positive mass (MeasureTheory.ae_of_singleton_ne_zero), which
gives Bayes' rule pointwise at any positive-mass observation — no Radon–Nikodym derivative —
and reduces comparisons of posterior masses over finite events, and over the marginals of a
product parameter space, to comparisons of prior-weighted likelihood sums.
Main results #
ProbabilityTheory.posterior_apply_singleton—(κ†μ) x {ω} = μ {ω} * κ ω {x} / (κ ∘ₘ μ) {x}.ProbabilityTheory.posterior_deterministic_eq_cond— a deterministic observation's posterior is the prior conditioned on the observation's fibre.ProbabilityTheory.posterior_real_finset_lt_iff— event comparison of the posterior.ProbabilityTheory.sum_real_mul_le_sum_posterior_real_mul— conditioning on an observation raises the expectation of a statistic that monovaries with the observation's likelihood.ProbabilityTheory.posterior_fst_real_lt_iff,posterior_snd_real_lt_iff— marginal comparison over a product parameter space.
An almost-everywhere property holds at any atom of positive mass.
Exact Bayes for the posterior kernel at a positive-mass observation: evaluate the defining compProd identity on a singleton rectangle.
The posterior is positive at a state exactly when the prior and the likelihood are.
Two states with the same likelihood of the observation and the same prior mass have the same posterior mass.
Comparing posterior masses of finite events reduces to comparing prior-weighted likelihood sums; the observation marginal cancels.
The posterior mass of a finite event: prior-weighted likelihoods over the event, normalized by the observation marginal.
A deterministic observation's posterior is the prior conditioned on the observation's fibre.
The observation marginal at an atom: prior mass times emission mass, summed over states.
Exact Bayes on reals at a positive-mass observation.
The posterior exceeds the prior at a state exactly when the state's likelihood of the observation exceeds the observation's marginal.
The posterior falls below the prior at a state exactly when the state's likelihood of the observation falls below the observation's marginal.
Expectations under the posterior #
Bayes' rule reweights the prior by the likelihood, so the posterior expectation of a statistic compares with its prior expectation as the statistic's covariance with the likelihood: the weighted Chebyshev sum inequality.
Conditioning on an observation raises the expectation of a statistic that monovaries with the observation's likelihood.
Conditioning on an observation lowers the expectation of a statistic that antivaries with the observation's likelihood.
Priors carried by two atoms #
The _of_pair lemmas assume the prior's support lies in a pair {ω, ω'}, so that the
observation's marginal has two terms and the comparison of the posterior with the prior at
one atom is the comparison of the two likelihoods.
Under a prior carried by two atoms, the observation's marginal is the prior-weighted sum of the two likelihoods.
A probability measure carried by two atoms puts mass one on them together.
Under a prior carried by two atoms, the posterior exceeds the prior at one of them exactly when its likelihood of the observation exceeds the other's.
Under a prior carried by two atoms, the posterior falls below the prior at one of them exactly when its likelihood of the observation falls below the other's.
A single state of positive prior mass and positive emission witnesses a positive observation marginal.
A prior-times-kernel joint at an atom is the prior mass times the kernel's mass.
The state marginal of the posterior over a product parameter space, on reals: prior-weighted likelihoods pooled over the latent, normalized by the observation marginal.
The latent marginal of the posterior over a product parameter space, on reals: prior-weighted likelihoods pooled over the states, normalized by the observation marginal.
Marginal listener preference over a product parameter space, on reals: for latent-in-the-state models, the observation's marginal cancels and the latent pools.
Marginal listener preference over the latent component of a product parameter space, on reals: the states pool.
The observation marginal of a kernel against the uniform prior: the mean likelihood.
Bayes against the uniform prior: the posterior at a state is its likelihood of the observation normalized over the states, the prior cancelling.