Standardized random variables [UPSTREAM] #
The standardization of a real random variable X under a measure μ is its deviation from the
mean in standard deviations, (X - μ[X]) / √Var[X; μ]; under the uniform measure on a finite
set of observations these are the z-scores. Standardization keeps the order of the values,
centres them, scales them to unit variance, and forgets any positive affine change of units.
Main definitions #
ProbabilityTheory.standardize: the standardized random variable.
Main statements #
integral_standardize,variance_standardize: standardized values have mean0and, whenXis not almost surely constant, variance1.standardize_const_mul_add_const: standardization is invariant underX ↦ a * X + bfor0 < a.sign_integral_standardize: under a subpopulationν ≪ μthe mean standardized value has the sign ofν[X] - μ[X].
Implementation notes #
The order lemmas assume 0 < Var[X; μ], as mathlib's division lemmas assume a positive
divisor; when the variance is 0 the standardization is constantly 0.
The standardization of X under μ is its deviation from the mean in standard deviations.
Equations
- ProbabilityTheory.standardize X μ ω = (X ω - ∫ (x : Ω), X x ∂μ) / √(ProbabilityTheory.variance X μ)
Instances For
Standardization is invariant under a positive affine change of units.
The mean of the standardized values under a probability measure ν is the standardized
mean under ν.
Standardized values average to 0.
Standardized values have unit variance.
Under a measure ν ≪ μ the mean standardized value has the sign of ν[X] - μ[X].