Sampling a random population along a random selection #
A population is a map x : κ → α, and a selection is an index map k : ι → κ; reading the
selected entries gives the sample x ∘ k : ι → α. This file builds the law of that sample when
the population and the selection are drawn independently: for a population law
ρ : Measure (κ → α) and a selection law σ : Measure (ι → κ), samplePopulation σ ρ is the
pushforward of σ.prod ρ along (k, x) ↦ x ∘ k.
Its evaluation and mixture lemmas take the population index countable with measurable
singletons, which is what makes the reindexing map measurable for an arbitrary state space α.
Finite sampling with and without replacement are the cases where σ is uniform on all index maps,
respectively on the injective ones (TauCeti.Probability.sampleWithReplacement,
TauCeti.Probability.sampleWithoutReplacement).
Main declarations #
measurable_reindexPopulation— measurability of the joint selection/population evaluation;samplePopulation— sample a random population along an independent random selection;samplePopulation_apply,samplePopulation_apply_population— its evaluation by conditioning on the selection or on the population;samplePopulation_eq_bind,samplePopulation_eq_bind_population— its form as a mixture, over the selection law or over the population law, of the samples with that input fixed.
Reindexing a population by a simultaneously supplied selection of its indices is measurable.
The measurable-space hypothesis on the population index is discrete: it lets the variable index be split into countably many measurable fibres.
Sampling a random population along an independent random selection of its indices.
First draw a population x : κ → α with law ρ; independently draw an index map k : ι → κ with
law σ; then return the sample i ↦ x (k i). Sampling without replacement
(sampleWithoutReplacement) and with replacement (sampleWithReplacement) are the cases where
σ is uniform on the injective index maps, respectively on all of them.
The definition is the pushforward Measure.map of σ.prod ρ along (k, x) ↦ x ∘ k. Following
Measure.map, when that map is not almost everywhere measurable the result is an arbitrary Dirac
mass, or zero if σ.prod ρ = 0. When the population index is countable with measurable singletons
the map is measurable for an arbitrary α (measurable_reindexPopulation), and the evaluation
and mixture lemmas below assume this.
Instances For
The defining pushforward form of samplePopulation.
Sampling a finite population law along a finite selection law gives a finite law.
Sampling a probability population along a probability selection law is a probability law.
Reading a fixed population along a varying selection is measurable.
Sampling a deterministic population is the pushforward of the selection law by reading that population at the selected indices.
Evaluating a sampled law by conditioning first on the selection: it averages the laws of the selected entries of the population over the selection law.
Evaluating a sampled law by conditioning first on the population: it averages, over the population law, the selection probability of the event.
Sampling a random population is the mixture, over the selection law, of reading each fixed selection off the random population.
Sampling a random population is the mixture, over the population law, of sampling each fixed population along the selection law.