Stat.Quantile
Quantile processes: empirical quantiles, Bahadur representations, and joint sample-quantile asymptotics.
EmpiricalCDF 7 core · 12 supporting This file defines the empirical cumulative distribution function of a real i.i.d. ★ cdfIF_variance★ empiricalCDF_isAsymLinear★ empiricalCDF_tendsto_normal★ empiricalCDF_tendsto_inProb
Empirical Distribution Functions
This file defines the empirical cumulative distribution function of a real i.i.d. sample and its pointwise influence function. It proves the boundedness, mean-zero, variance, weak-law, and asymptotic-linearity facts that support sample-quantile and quantile-treatment-effect inference.
The indicator statistic 1{· ≤ y} : ℝ → ℝ of the lower-ray event.
The empirical cumulative distribution function F̂ₙ(y) = (1/n) Σ_{i<n} 1{Z_i ≤ y}, the sampleMean of cdfStat y.
The fixed-y influence function of the empirical cdf: cdfIF P y z = 1{z ≤ y} − F(y).
Variance of the empirical-cdf influence function. At a fixed threshold y, the population second moment of the cdf influence function equals F(y)(1 − F(y)), the Bernoulli variance of the indicator event {Z ≤ y}.
Formal statement
Proof (Lean source)
Asymptotic linearity of the empirical cdf. For an i.i.d. real sample S at a fixed point y, the empirical cdf F̂ₙ(y) is asymptotically linear at F(y) with influence function cdfIF P y and an identically-zero remainder.
Formal statement
Proof (Lean source)
Empirical-cdf central limit theorem. For an i.i.d. real sample and a threshold y, provided the rescaled empirical-cdf estimator is almost-everywhere measurable at every sample size, the rescaled deviation converges in distribution, as , to the centered Gaussian law with variance , where is the population cdf and the empirical cdf.
Formal statement
Proof (Lean source)
Empirical-cdf consistency (WLLN). For an i.i.d. real sample S at a fixed point y, the empirical cdf F̂ₙ(y) converges to F(y) in probability.
Formal statement
Proof (Lean source)
12 supporting declarations (lemmas, instances)
-
measurable_cdfStatlemma — The lower-ray indicator is measurable.Proof (Lean source)
lemma measurable_cdfStat (y : ℝ) : Measurable (cdfStat y) := measurable_const.indicator measurableSet_Iic -
cdfStat_nonneglemma — The lower-ray indicator is nonnegative.Proof (Lean source)
lemma cdfStat_nonneg (y z : ℝ) : 0 ≤ cdfStat y z := by unfold cdfStat by_cases h : z ∈ Iic y <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h] -
cdfStat_le_onelemma — The lower-ray indicator is bounded above by one.Proof (Lean source)
lemma cdfStat_le_one (y z : ℝ) : cdfStat y z ≤ 1 := by unfold cdfStat by_cases h : z ∈ Iic y <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h] -
cdfStat_sqlemma — The indicator is idempotent: (1{z ≤ y})² = 1{z ≤ y}.Proof (Lean source)
lemma cdfStat_sq (y z : ℝ) : (cdfStat y z) ^ 2 = cdfStat y z := by unfold cdfStat by_cases h : z ∈ Iic y <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h] -
integrable_cdfStatlemma — cdfStat y is integrable (bounded by 1 on a finite measure).Proof (Lean source)
lemma integrable_cdfStat [IsProbabilityMeasure P] (y : ℝ) : Integrable (cdfStat y) P := by refine (integrable_const (1 : ℝ)).mono' (measurable_cdfStat y).aestronglyMeasurable ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (cdfStat_nonneg y z)] exact cdfStat_le_one y z -
integral_cdfStatlemma — The integral of the indicator statistic is the cdf value F(y).Proof (Lean source)
lemma integral_cdfStat [IsProbabilityMeasure P] (y : ℝ) : ∫ z, cdfStat y z ∂P = cdf P y := by rw [cdf_eq_real] unfold cdfStat rw [MeasureTheory.integral_indicator measurableSet_Iic, setIntegral_const] simp [measureReal_def] -
measurable_cdfIFlemma — The empirical-cdf influence function is measurable.Proof (Lean source)
lemma measurable_cdfIF (y : ℝ) : Measurable (cdfIF P y) := (measurable_cdfStat y).sub measurable_const -
cdfIF_mean_zerolemma — cdfIF has mean zero under P.Proof (Lean source)
lemma cdfIF_mean_zero [IsProbabilityMeasure P] (y : ℝ) : ∫ z, cdfIF P y z ∂P = 0 := by unfold cdfIF rw [integral_sub (integrable_cdfStat y) (integrable_const _), integral_cdfStat, integral_const, probReal_univ, one_smul, sub_self] -
abs_cdfIF_le_onelemma — cdfIF is bounded by 1 in absolute value.Proof (Lean source)
lemma abs_cdfIF_le_one [IsProbabilityMeasure P] (y z : ℝ) : |cdfIF P y z| ≤ 1 := by have hF0 : 0 ≤ cdf P y := by rw [cdf_eq_real]; exact measureReal_nonneg have hF1 : cdf P y ≤ 1 := by rw [cdf_eq_real]; exact measureReal_le_one unfold cdfIF by_cases hz : z ≤ y · have h1 : cdfStat y z = 1 := by unfold cdfStat; rw [Set.indicator_of_mem (Set.mem_Iic.mpr hz)] rw [h1, abs_le]; constructor <;> linarith · have h0 : cdfStat y z = 0 := by unfold cdfStat rw [Set.indicator_of_notMem (by simp only [Set.mem_Iic]; exact hz)] rw [h0, zero_sub, abs_neg, abs_of_nonneg hF0]; linarith -
cdfIF_sq_integrablelemma — cdfIF is square-integrable (it is bounded).Proof (Lean source)
lemma cdfIF_sq_integrable [IsProbabilityMeasure P] (y : ℝ) : Integrable (fun z => (cdfIF P y z) ^ 2) P := by refine (integrable_const (1 : ℝ)).mono' ((measurable_cdfIF y).pow_const 2).aestronglyMeasurable ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _), sq_le_one_iff_abs_le_one] exact abs_cdfIF_le_one y z -
isLittleOp_zerolemma — o_p-triviality of the zero sequence at the constant rate rₙ = 1.conclusionIsLittleOp (fun _ (_ : Ω) => (0 : ℝ)) (fun _ => (1 : ℝ)) μProof (Lean source)
lemma isLittleOp_zero : IsLittleOp (fun _ (_ : Ω) => (0 : ℝ)) (fun _ => (1 : ℝ)) μ := by intro ε hε have hset : {ω : Ω | ε * (1 : ℝ) < |(0 : ℝ)|} = (∅ : Set Ω) := by ext ω simp only [mul_one, abs_zero, Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false, not_lt] exact hε.le simp only [hset, measure_empty] exact tendsto_const_nhds -
rescaledEmpiricalCDF_eq_normalizedSumlemma — Key identity. The rescaled empirical-cdf deviation equals the normalized influence-function sum: √n (F̂ₙ(y) − F(y)) = (1/√n) Σ cdfIF(Z_i).hypothesesProof (Lean source)
lemma rescaledEmpiricalCDF_eq_normalizedSum (S : IIDSample Ω ℝ μ P) (y : ℝ) (n : ℕ) (ω : Ω) : sqrt ((range n).card : ℝ) * (S.empiricalCDF y n ω - cdf P y) = (sqrt ((range n).card : ℝ))⁻¹ * ∑ i ∈ range n, cdfIF P y (S.Z i ω) := by rcases Nat.eq_zero_or_pos n with hn | hn · subst hn simp [IIDSample.empiricalCDF, IIDSample.sampleMean] · have hcard : ((range n).card : ℝ) = (n : ℝ) := by rw [Finset.card_range] have hnpos : (0 : ℝ) < (n : ℝ) := by exact_mod_cast hn have hsum : ∑ i ∈ range n, cdfIF P y (S.Z i ω) = (∑ i ∈ range n, cdfStat y (S.Z i ω)) - (n : ℝ) * cdf P y := by simp only [cdfIF, Finset.sum_sub_distrib, Finset.sum_const, Finset.card_range, nsmul_eq_mul] rw [hcard, hsum] simp only [IIDSample.empiricalCDF, IIDSample.sampleMean] set t := ∑ i ∈ range n, cdfStat y (S.Z i ω) with ht set r := sqrt (n : ℝ) with hrdef have hr2 : r * r = (n : ℝ) := by rw [hrdef]; exact Real.mul_self_sqrt hnpos.le have hrne : r ≠ 0 := by rw [hrdef]; exact (Real.sqrt_pos.mpr hnpos).ne' have hrr : r * r ≠ 0 := mul_ne_zero hrne hrne rw [← hr2] field_simp [hrne, hrr]
SampleQuantile 5 core · 3 supporting This file develops the influence-function and asymptotic-normality layer for sample quantiles of an i.i.d. ★ quantileIF_variance★ QuantileRegularity★ isAsymLinear★ tendsto_normal
Sample Quantile Asymptotics
This file develops the influence-function and asymptotic-normality layer for sample quantiles of an i.i.d. real sample. It assumes the Bahadur representation as the regularity input and then derives the classical variance and Gaussian limit for the quantile estimator.
The sample-quantile influence function ψ_τ(z) = (τ − 1{z ≤ q₀}) / f₀.
Definition (Lean source)
Variance of the quantile influence function. Provided q₀ is the population τ-quantile, i.e. the population cdf satisfies , the second moment of the influence function under the population measure equals , the classical sample-quantile asymptotic variance.
Formal statement
Proof (Lean source)
Quantile-estimator regularity. Bundles the analytic and empirical-process hypotheses under which a quantile-estimator sequence is -asymptotically linear for the -quantile of with density : the level lies in the open unit interval , the density at the quantile is positive, is indeed the population -quantile, i.e. the cdf satisfies , the cdf is differentiable at with derivative , so that is the genuine asymptotic variance, and the rescaled estimator matches the normalized influence-function sum up to a term vanishing in probability — the Bahadur remainder.
Definition (Lean source)
Regularity implies asymptotic linearity. Given a QuantileRegularity witness h for the estimator sequence qn, the estimator is asymptotically linear at the quantile q₀ with influence function ψ_τ.
Formal statement
Proof (Lean source)
Sample-quantile asymptotic normality. Given a QuantileRegularity witness h for the estimator sequence qn — interior level , positive density at the population quantile , cdf identification, and the exposed Bahadur/Donsker remainder — provided the rescaled estimator is almost-everywhere measurable at each sample size and the normalized influence-function sum is almost-everywhere measurable at each sample size, then converges in distribution to the centered Gaussian law with variance .
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
measurable_quantileIFlemma — The sample-quantile influence function is measurable.Proof (Lean source)
lemma measurable_quantileIF (τ q₀ f₀ : ℝ) : Measurable (quantileIF τ q₀ f₀) := (measurable_const.sub (measurable_cdfStat q₀)).div_const f₀ -
quantileIF_mean_zerolemma — The quantile influence function has mean zero under P, given that q₀ is the population τ-quantile (F(q₀) = τ).hypothesesconclusion∫ z, quantileIF τ q₀ f₀ z ∂P = 0Proof (Lean source)
lemma quantileIF_mean_zero [IsProbabilityMeasure P] {τ q₀ f₀ : ℝ} (hcdf : cdf P q₀ = τ) : ∫ z, quantileIF τ q₀ f₀ z ∂P = 0 := by unfold quantileIF rw [integral_div, integral_sub (integrable_const _) (integrable_cdfStat q₀), integral_const, probReal_univ, one_smul, integral_cdfStat, hcdf, sub_self, zero_div] -
quantileIF_sq_integrablelemma — The quantile influence function is square-integrable (it is bounded).Proof (Lean source)
lemma quantileIF_sq_integrable [IsProbabilityMeasure P] {τ q₀ f₀ : ℝ} : Integrable (fun z => (quantileIF τ q₀ f₀ z) ^ 2) P := by refine (integrable_const (((|τ| + 1) / |f₀|) ^ 2)).mono' ((measurable_quantileIF τ q₀ f₀).pow_const 2).aestronglyMeasurable ?_ filter_upwards with z have hc0 : 0 ≤ cdfStat q₀ z := cdfStat_nonneg q₀ z have hc1 : cdfStat q₀ z ≤ 1 := cdfStat_le_one q₀ z have hnum : |τ - cdfStat q₀ z| ≤ |τ| + 1 := by rw [abs_le] refine ⟨?_, ?_⟩ · have := neg_abs_le τ; linarith · have := le_abs_self τ; linarith have hbound : |quantileIF τ q₀ f₀ z| ≤ (|τ| + 1) / |f₀| := by unfold quantileIF rw [abs_div, div_eq_mul_inv, div_eq_mul_inv] exact mul_le_mul_of_nonneg_right hnum (inv_nonneg.mpr (abs_nonneg _)) rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] calc (quantileIF τ q₀ f₀ z) ^ 2 = |quantileIF τ q₀ f₀ z| ^ 2 := (sq_abs _).symm _ ≤ ((|τ| + 1) / |f₀|) ^ 2 := by gcongr
EmpiricalQuantile 5 core · 3 supporting This file builds the sample quantile from the empirical measure of an i.i.d. ★ empiricalMeasure_cdf★ sampleQuantile_le_iff★ sampleQuantile_atom_bound
Empirical Measures and Sample Quantiles
This file builds the sample quantile from the empirical measure of an i.i.d.
real sample. The central definitions are IIDSample.empiricalMeasure, the
finite empirical probability measure, and IIDSample.sampleQuantile, the
generalized inverse of that measure's cdf.
The main structural results are the cdf bridge
IIDSample.empiricalMeasure_cdf, the switching relation
IIDSample.sampleQuantile_le_iff, monotonicity of IIDSample.empiricalCDF in
its real argument, and the atom bound IIDSample.sampleQuantile_atom_bound.
Together these deterministic facts feed the derived Bahadur representation for
the ordinary empirical sample quantile.
The empirical measure νₙ = (1/n) Σ_{i<n} δ_{Zᵢ} of an i.i.d. sample.
cdf bridge. For a positive sample size , the cumulative distribution function of the empirical measure S.empiricalMeasure n ω built from an i.i.d. sample at outcome ω coincides pointwise, at every threshold y, with the empirical cdf S.empiricalCDF y n ω.
Formal statement
The sample τ-quantile q̂ₙ(τ) = quantile νₙ τ, the generalized inverse of the empirical cdf.
Switching relation. For a positive sample size and an interior quantile level , the sample -quantile is at most a given point x exactly when is at most the empirical cdf at x.
Formal statement
Proof (Lean source)
Atom bound. If the population cdf is continuous, i.e. the population is atomless, the sample size is positive, and the quantile level is interior, , then almost surely the empirical cdf evaluated at the sample -quantile deviates from by at most .
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
empiricalMeasure_isProbabilityMeasurelemma — For 0 < n the empirical measure is a probability measure.hypothesesconclusionIsProbabilityMeasure (S.empiricalMeasure n ω)Proof (Lean source)
lemma IIDSample.empiricalMeasure_isProbabilityMeasure (S : IIDSample Ω ℝ μ P) {n : ℕ} (hn : 0 < n) (ω : Ω) : IsProbabilityMeasure (S.empiricalMeasure n ω) := by constructor unfold IIDSample.empiricalMeasure rw [Measure.smul_apply, Measure.coe_finset_sum, Finset.sum_apply, smul_eq_mul] simp only [MeasureTheory.measure_univ, Finset.sum_const, Finset.card_range, nsmul_eq_mul, mul_one] rw [ENNReal.inv_mul_cancel] · exact_mod_cast hn.ne' · exact ENNReal.natCast_ne_top n -
empiricalMeasure_real_Iiclemma — The empirical measure of the lower ray Iic y is F̂ₙ(y) (as ℝ).hypothesesProof (Lean source)
lemma IIDSample.empiricalMeasure_real_Iic (S : IIDSample Ω ℝ μ P) {n : ℕ} (_hn : 0 < n) (ω : Ω) (y : ℝ) : (S.empiricalMeasure n ω).real (Iic y) = S.empiricalCDF y n ω := by unfold IIDSample.empiricalMeasure IIDSample.empiricalCDF IIDSample.sampleMean rw [Measure.real, Measure.smul_apply, Measure.coe_finset_sum, Finset.sum_apply, smul_eq_mul] simp only [Measure.dirac_apply' _ measurableSet_Iic] rw [ENNReal.toReal_mul, ENNReal.toReal_inv, ENNReal.toReal_natCast] congr 1 rw [ENNReal.toReal_sum (fun i _ => by by_cases h : S.Z i ω ∈ Iic y <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h])] apply Finset.sum_congr rfl intro i _ unfold cdfStat by_cases h : S.Z i ω ∈ Iic y · rw [Set.indicator_of_mem h, Set.indicator_of_mem h, Pi.one_apply, ENNReal.toReal_one] · rw [Set.indicator_of_notMem h, Set.indicator_of_notMem h, ENNReal.toReal_zero] -
empiricalCDF_monotonelemma — The empirical cdf is monotone in its real argument y (a sum of monotone lower-ray indicators).Proof (Lean source)
lemma IIDSample.empiricalCDF_monotone (S : IIDSample Ω ℝ μ P) (n : ℕ) (ω : Ω) : Monotone (fun y => S.empiricalCDF y n ω) := by intro y y' hyy' unfold IIDSample.empiricalCDF IIDSample.sampleMean apply mul_le_mul_of_nonneg_left _ (by positivity) apply Finset.sum_le_sum intro i _ unfold cdfStat by_cases h : S.Z i ω ≤ y · rw [Set.indicator_of_mem (Set.mem_Iic.mpr h), Set.indicator_of_mem (Set.mem_Iic.mpr (h.trans hyy'))] · rw [Set.indicator_of_notMem (by simp only [Set.mem_Iic]; exact h)] exact cdfStat_nonneg y' _
Quantile 3 core · 7 supporting This file defines the lower quantile function of a real probability measure as the generalized inverse of its cumulative distribution function. ★ quantile_le_iff
Quantile Function
This file defines the lower quantile function of a real probability measure as the generalized inverse of its cumulative distribution function. It proves the basic order characterization that connects cumulative distribution functions and their quantiles away from the degenerate endpoints.
The defining super-level set of the cdf, {x | τ ≤ cdf μ x}.
Definition (Lean source)
The (lower) quantile function: the left-continuous generalized inverse of the cdf, quantile μ τ = inf {x : ℝ | τ ≤ cdf μ x}.
Definition (Lean source)
Quantile / cdf Galois connection. For an interior probability level , the quantile of a real measure at level is at most a point x exactly when is at most the cdf of that measure at x.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
quantileSet_up_closedlemma — The super-level set is up-closed (monotonicity of the cdf).Proof (Lean source)
lemma quantileSet_up_closed {τ x x' : ℝ} (hx : x ∈ quantileSet μ τ) (hxx' : x ≤ x') : x' ∈ quantileSet μ τ := le_trans hx (monotone_cdf μ hxx') -
bddBelow_quantileSetlemma — For 0 < τ, the super-level set is bounded below: since cdf μ → 0 at -∞, any point where the cdf already drops below τ is a lower bound.Proof (Lean source)
lemma bddBelow_quantileSet {τ : ℝ} (hτ : 0 < τ) : BddBelow (quantileSet μ τ) := by obtain ⟨N, hN⟩ := Filter.eventually_atBot.mp ((tendsto_cdf_atBot μ).eventually_lt_const hτ) refine ⟨N, fun s hs => ?_⟩ by_contra hlt push_neg at hlt exact absurd hs (not_le.mpr (hN s hlt.le)) -
nonempty_quantileSetlemma — For τ < 1, the super-level set is nonempty: since cdf μ → 1 at +∞, some point has cdf above τ.Proof (Lean source)
lemma nonempty_quantileSet {τ : ℝ} (hτ : τ < 1) : (quantileSet μ τ).Nonempty := by obtain ⟨N, hN⟩ := Filter.eventually_atTop.mp ((tendsto_cdf_atTop μ).eventually_const_lt hτ) exact ⟨N, (hN N le_rfl).le⟩ -
le_cdf_quantilelemma — Key membership lemma. For interior τ ∈ (0,1), the quantile lands in the super-level set: τ ≤ cdf μ (quantile μ τ). This is where right-continuity of the cdf is used.Proof (Lean source)
lemma le_cdf_quantile {τ : ℝ} (hτ1 : τ < 1) : τ ≤ cdf μ (quantile μ τ) := by set a := quantile μ τ with ha have hne : (quantileSet μ τ).Nonempty := nonempty_quantileSet hτ1 -- Every point strictly above the inf lies in the (up-closed) super-level set. have hgt : ∀ x, a < x → τ ≤ cdf μ x := by intro x hx obtain ⟨s, hs, hsx⟩ := exists_lt_of_csInf_lt hne hx exact quantileSet_up_closed hs hsx.le -- Right-continuity: cdf μ → cdf μ a along `𝓝[Ioi a] a`. have htends : Tendsto (cdf μ) (𝓝[Ioi a] a) (𝓝 (cdf μ a)) := ((cdf μ).right_continuous a).mono_left (nhdsWithin_mono a Ioi_subset_Ici_self) -- Along that filter we stay in the super-level set, so the limit dominates τ. have hev : ∀ᶠ x in 𝓝[Ioi a] a, τ ≤ cdf μ x := by filter_upwards [self_mem_nhdsWithin] with x hx using hgt x hx exact ge_of_tendsto htends hev -
le_cdf_of_quantile_lelemma — Galois connection (one direction). If the quantile lies at or below x, then the cdf has already reached level τ at x.Proof (Lean source)
lemma le_cdf_of_quantile_le {τ x : ℝ} (hτ1 : τ < 1) (hx : quantile μ τ ≤ x) : τ ≤ cdf μ x := le_trans (le_cdf_quantile hτ1) (monotone_cdf μ hx) -
quantile_le_of_le_cdflemma — Galois connection (other direction). If the cdf reaches τ at x, then the quantile is at or below x.Proof (Lean source)
lemma quantile_le_of_le_cdf {τ x : ℝ} (hτ0 : 0 < τ) (hx : τ ≤ cdf μ x) : quantile μ τ ≤ x := csInf_le (bddBelow_quantileSet hτ0) hx -
quantile_monolemma — The quantile function is monotone in the probability level τ on (0,1).Proof (Lean source)
lemma quantile_mono {τ τ' : ℝ} (hτ0 : 0 < τ) (hτ'1 : τ' < 1) (hττ' : τ ≤ τ') : quantile μ τ ≤ quantile μ τ' := quantile_le_of_le_cdf hτ0 (le_trans hττ' (le_cdf_quantile hτ'1))
SampleQuantileJoint 6 core · 8 supporting This file proves joint asymptotic normality for a finite vector of sample quantiles. ★ quantileIF_cross★ sampleQuantileVec_isAsymLinearVec★ sampleQuantileVec_tendsto_normal
Joint Normality of a Quantile Vector
This file proves joint asymptotic normality for a finite vector of sample quantiles. It packages the coordinatewise Bahadur representations into vector asymptotic linearity and uses the multivariate CLT to obtain an abstract Gaussian limit with covariance entries determined by quantile influence-function cross-moments.
Pack a coordinate function into Euclidean space (the PiLp 2 synonym).
Definition (Lean source)
The joint quantile influence function ψ(z)_j = (τⱼ − 1{z ≤ qⱼ}) / fⱼ, valued in EuclideanSpace ℝ (Fin k).
Definition (Lean source)
The sample-quantile vector (q̂ₙ(τ₁), …, q̂ₙ(τ_k)).
Definition (Lean source)
Covariance entry. Given qⱼ is the population τⱼ-quantile: and qₗ is the population τₗ-quantile: , the cross-moment of the two quantile influence functions and under the population measure equals .
Formal statement
Proof (Lean source)
The sample-quantile vector is asymptotically linear with the joint influence function ψ. Given a SampleQuantileReg regularity bundle at every coordinate j: interior level , positive density at the population quantile , cdf identification, differentiability of the population cdf, and an atomless population, the vector of sample -quantiles is jointly asymptotically linear at the vector of population quantiles, with influence function the joint quantile influence function .
Formal statement
Proof (Lean source)
Joint asymptotic normality of the sample-quantile vector. Given a SampleQuantileReg bundle at every coordinate j, a candidate limit measure Q on the joint quantile space whose characteristic function at every direction t matches , the Gaussian shape determined by the joint influence function , and almost-everywhere measurability of the rescaled estimator sequence at every sample size, then the law of the rescaled sample-quantile vector converges weakly to Q as .
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
measurable_quantileIFVeclemma — The joint quantile influence function is measurable.Proof (Lean source)
lemma measurable_quantileIFVec (τ q f : Fin k → ℝ) : Measurable (quantileIFVec τ q f) := by unfold quantileIFVec eucl refine ((EuclideanSpace.equiv (Fin k) ℝ).symm.continuous.measurable).comp ?_ exact measurable_pi_lambda _ (fun j => measurable_quantileIF (τ j) (q j) (f j)) -
norm_sq_eucllemma — Euclidean norm of a packed vector, squared, is the coordinatewise sum of squares.Proof (Lean source)
lemma norm_sq_eucl (v : Fin k → ℝ) : ‖eucl v‖ ^ 2 = ∑ j, (v j) ^ 2 := by rw [EuclideanSpace.norm_eq, Real.sq_sqrt (sum_nonneg fun j _ => sq_nonneg _)] refine Finset.sum_congr rfl fun j _ => ?_ rw [Real.norm_eq_abs, sq_abs] rfl -
norm_eucl_le_sum_abslemma — The Euclidean norm of a packed vector is bounded by the ℓ¹ norm of its coordinates: ‖eucl v‖ ≤ ∑ j, |v j|.Proof (Lean source)
lemma norm_eucl_le_sum_abs (v : Fin k → ℝ) : ‖eucl v‖ ≤ ∑ j, |v j| := by have hnonneg : 0 ≤ ∑ j, |v j| := sum_nonneg fun j _ => abs_nonneg _ have hsq : ‖eucl v‖ ^ 2 ≤ (∑ j, |v j|) ^ 2 := by rw [norm_sq_eucl] have hle : ∑ j, (v j) ^ 2 ≤ (∑ j, |v j|) ^ 2 := by rw [sq, Finset.sum_mul_sum] refine Finset.sum_le_sum fun j _ => ?_ calc (v j) ^ 2 = |v j| * |v j| := by rw [sq, ← abs_mul_abs_self] _ ≤ ∑ i, |v j| * |v i| := by refine Finset.single_le_sum (f := fun i => |v j| * |v i|) (fun i _ => mul_nonneg (abs_nonneg _) (abs_nonneg _)) (Finset.mem_univ j) exact hle exact le_of_pow_le_pow_left₀ (by norm_num) hnonneg hsq -
isLittleOp_zero_one'lemma — The zero sequence is o_p(1).conclusionIsLittleOp (fun _ (_ : Ω) => (0 : ℝ)) (fun _ => (1 : ℝ)) μProof (Lean source)
lemma isLittleOp_zero_one' : IsLittleOp (fun _ (_ : Ω) => (0 : ℝ)) (fun _ => (1 : ℝ)) μ := by intro ε hε have hempty : {ω : Ω | ε * (1 : ℝ) < |(0 : ℝ)|} = (∅ : Set Ω) := by ext ω; simp only [abs_zero, mul_one, Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false] exact hε.not_gt have heq : (fun _ : ℕ => μ {ω : Ω | ε * (1 : ℝ) < |(0 : ℝ)|}) = fun _ : ℕ => (0 : ENNReal) := by funext n; rw [hempty, measure_empty] rw [show (fun n : ℕ => μ {ω : Ω | ε * (fun _ => (1 : ℝ)) n < |(fun _ _ => (0 : ℝ)) n ω|}) = (fun _ : ℕ => μ {ω : Ω | ε * (1 : ℝ) < |(0 : ℝ)|}) from rfl, heq] exact tendsto_const_nhds -
isLittleOp_finset_sum_onelemma — A finite sum of o_p(1) sequences is o_p(1).hypothesesconclusionIsLittleOp (fun n ω => ∑ i ∈ s, g i n ω) (fun _ => (1 : ℝ)) μProof (Lean source)
lemma isLittleOp_finset_sum_one {ι : Type*} (s : Finset ι) (g : ι → ℕ → Ω → ℝ) (h : ∀ i ∈ s, IsLittleOp (g i) (fun _ => (1 : ℝ)) μ) : IsLittleOp (fun n ω => ∑ i ∈ s, g i n ω) (fun _ => (1 : ℝ)) μ := by classical induction s using Finset.induction_on with | empty => simpa using isLittleOp_zero_one' (μ := μ) | insert a s has ih => have ha := h a (mem_insert_self a s) have hs := ih (fun i hi => h i (mem_insert_of_mem hi)) have hadd := IsLittleOp.add_one ha hs simpa [Finset.sum_insert has] using hadd -
isLittleOp_of_abs_le_const_mul_onelemma — Domination: if |Xn| ≤ C·|Yn| with Yn o_p(1) and C > 0, then Xn is o_p(1).hypothesesX Y :ℕ → Ω → ℝC :ℝhC :0 < ChY :IsLittleOp Y (fun _ => (1 : ℝ)) μhbound :∀ n ω, |X n ω| ≤ C * |Y n ω|conclusionIsLittleOp X (fun _ => (1 : ℝ)) μProof (Lean source)
lemma isLittleOp_of_abs_le_const_mul_one {X Y : ℕ → Ω → ℝ} {C : ℝ} (hC : 0 < C) (hY : IsLittleOp Y (fun _ => (1 : ℝ)) μ) (hbound : ∀ n ω, |X n ω| ≤ C * |Y n ω|) : IsLittleOp X (fun _ => (1 : ℝ)) μ := IsLittleOp.of_abs_le_const_mul_one hC hY hbound -
isLittleOp_abslemma — The absolute value of an o_p(1) sequence is o_p(1) (the threshold events coincide).hypothesesR :ℕ → Ω → ℝhR :IsLittleOp R (fun _ => (1 : ℝ)) μconclusionIsLittleOp (fun n ω => |R n ω|) (fun _ => (1 : ℝ)) μProof (Lean source)
lemma isLittleOp_abs {R : ℕ → Ω → ℝ} (hR : IsLittleOp R (fun _ => (1 : ℝ)) μ) : IsLittleOp (fun n ω => |R n ω|) (fun _ => (1 : ℝ)) μ := by refine IsLittleOp.of_abs_le_const_mul_one (C := 1) one_pos hR ?_ intro n ω simp