Finite uniform expectations #
Shared finite averages, trajectory expectations, independence, and reindexing. The average on an empty type is zero.
Expectation under the uniform distribution on a fintype.
Equations
- Dynamics.avg f = (∑ a : α, f a) / ↑(Fintype.card α)
Instances For
The expectation of an indicator is a counting ratio.
Expectation of a functional of T i.i.d. uniform draws from α,
in transition-operator form: the head draw is averaged out first.
Equations
- Dynamics.expList α 0 x✝ = x✝ []
- Dynamics.expList α T.succ x✝ = Dynamics.avg fun (a : α) => Dynamics.expList α T fun (l : List α) => x✝ (a :: l)
Instances For
Independence: average of a product over a product space #
Independence for a pair of coordinates: the average of a product
g p.1 * h p.2 over a product Fintype β × δ (uniform measure) equals the
product of the individual averages. No Nonempty hypothesis is needed:
if either factor is empty, both sides are 0 by the 0/0 = 0 convention.
Independence over a Fin n-indexed product: the average of a product
∏ i, f i (x i) over the product Fintype Fin n → γ (uniform measure)
equals the product of the individual averages avg (f i). This is the
discrete, measure-theory-free form of "coordinate projections on a product
space are independent."