Empirical masses of a finite label sequence
DefinitionBianchiIX_Statistics_EmpiricalMassbianchi-ix-era-statisticsdynamical-systems
For a sequence of labels and , define the empirical probability mass
Definition code
import Mathlib.Analysis.Normed.Group.Tannery
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Positivity
/-! Finite empirical distributions with a strictly positive sample size. -/
open Filter
open scoped Topology
namespace BianchiIX
noncomputable section
open scoped Classical
/-- The distribution of the first `N + 1` labels. -/
def empiricalMass {ι : Type*} (label : ℕ → ι) (N : ℕ) (i : ι) : ℝ :=
((N + 1 : ℕ) : ℝ)⁻¹ * ∑ j ∈ Finset.range (N + 1), if i = label j then 1 else 0
end
end BianchiIX
Source