Documentation

ZPM.Probability.FintypePMF.Expectation

Expectations under a FintypePMF #

trueExpectation is the expectation of an ℝ-valued function under a FintypePMF; boolTestExpectation is the specialisation to indicator (Bool-valued) tests via the embedding if · then 1 else 0. The indicator form is [0, 1]-bounded and evaluates to the sample-average on an empirical PMF; these are the bricks used by the TV-based transfer principle in the next shard.

def ProbabilityTheory.FintypePMF.trueExpectation {α : Type u_1} [Fintype α] (p : FintypePMF α) (f : α) :

Expected value ∑ h, p.prob h * f h of a real-valued test under a FintypePMF.

Equations
Instances For

    Expected value of a Bool-valued test under a FintypePMF via the indicator embedding if f a then 1 else 0.

    Equations
    Instances For
      theorem ProbabilityTheory.FintypePMF.boolTestExpectation_empirical_eq_avg {α : Type u_1} [Fintype α] [DecidableEq α] {T : } (hT : 0 < T) (rs : Fin Tα) (f : αBool) :
      (empirical hT rs).boolTestExpectation f = (∑ t : Fin T, if f (rs t) = true then 1 else 0) / T

      Expectation of a Bool-valued test under an empirical FintypePMF equals the sample average along the underlying sequence. Bridges the distributional view to the sample-average view used by the MWU argument.