Stat.Nonparametric

Nonparametric methods: approximation theory, fixed-weight linear smoothers, local-polynomial coercivity and derivative bounds, series/sieve estimators, projection-kernel risk building blocks, and moment-problem tools.

Linear­Smoother 3 core · 3 supporting · 2 submodules A linear smoother estimates f(t) by ∑ᵢ Sᵢ Yᵢ with weights that depend only on the design. Approximation 15 core · 17 supporting · 3 submodules Approximation-theoretic estimates behind the bias analysis of nonparametric estimators; nothing here is random. Higher­Order­Influence 7 core · 8 supporting · 4 submodules Two ingredients of the risk analysis of second-order U-statistic corrections built from a J-dimensional projection. Histogram­Regression 31 core · 34 supporting · 14 submodules This roll-up exports totalized finite-partition regression histograms, their integrated iid squared-risk bound, and the Hölder cubical specialization with an optimized ceiling-mesh rate. Local­Poly 62 core · 80 supporting · 9 submodules Finite-sample analysis of the degree-p local-polynomial estimator at an interior point. Series­Sieve 13 core · 9 supporting · 4 submodules Tools for regression on a finite set of basis functions.
Gaussian­Transfer 2 core · 2 supporting The variance recipe is the ordinary integral with design factor 16 and design interval [-1/2,1/2]. ★ shiftedVariance_le

Transferring a weighted energy to a Gaussian shifted design integral

The variance recipe is the ordinary integral with design factor 16 and design interval [-1/2,1/2]. The full joint integrability hypothesis is a standard Fubini hypothesis; no quantitative variance inequality is assumed. A shift costs at most the κ-th Gaussian moment times σ^κ times the zeroth physical energy.

Primary source fetched at the installed Mathlib revision db584cd6d46c92f209a44c0f1c829460d327499d: https://github.com/leanprover-community/mathlib4/blob/db584cd6d46c92f209a44c0f1c829460d327499d/Mathlib/Probability/Distributions/Gaussian/Real.lean This supplies memLp_id_gaussianReal, integral_id_gaussianReal, and variance_id_gaussianReal; no exact moment formula needs to be reimplemented.

def shiftedVariance reviewed
Causalean.Stat.Nonparametric

A moment exponent, a Gaussian noise scale, and a complex physical-space kernel determine the Gaussian-shifted design variance integral as sixteen times the integral, over the design interval [-1/2, 1/2], of the absolute design point raised to the moment exponent times the standard-Gaussian average of the squared modulus of the kernel evaluated at the design point plus the noise scale times the Gaussian draw.

Definition (Lean source)
κ σ :
ℝ
g :
ℝ → ℂ
shiftedVariance κ σ g :
ℝ
16 * ∫ t in Icc (-1 / 2 : ℝ) (1 / 2), |t| ^ κ * (∫ z, ‖g (t + σ * z)‖ ^ 2 ∂gaussianReal 0 1)
Causalean.Stat.Nonparametric.shiftedVariance · Causalean/Stat/Nonparametric/GaussianTransfer.lean:30
theorem shiftedVariance_le reviewed
Causalean.Stat.Nonparametric

A complex physical-space kernel, a moment exponent in the interval from zero to two, a nonnegative Gaussian noise scale, finite ordinary and weighted squared energies, and integrability of the weighted joint squared norm imply that the Gaussian-shifted design variance integral is at most 32 · (W + 2 σ^κ E), where W is the kernel's κ-weighted squared energy and E its ordinary squared energy.

Formal statement
g :
ℝ → ℂ
κ σ :
ℝ
hκ0 :
0 ≤ κ
hκ2 :
κ ≤ 2
hσ :
0 ≤ σ
h0 :
Integrable (fun v => ‖g v‖ ^ 2)
hκ :
Integrable (fun v => |v| ^ κ * ‖g v‖ ^ 2)
hjoint :
Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖g (p.1 + σ * p.2)‖ ^ 2) (volume.prod (gaussianReal 0 1))
shiftedVariance κ σ g ≤ 32 * (weightedEnergy κ g + 2 * σ ^ κ * energy g)
Proof (Lean source)
theorem shiftedVariance_le (g : ℝ → ℂ) (κ σ : ℝ) (hκ0 : 0 ≤ κ) (hκ2 : κ ≤ 2) (hσ : 0 ≤ σ) (h0 : Integrable (fun v => ‖g v‖ ^ 2)) (hκ : Integrable (fun v => |v| ^ κ * ‖g v‖ ^ 2)) (hjoint : Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖g (p.1 + σ * p.2)‖ ^ 2) (volume.prod (gaussianReal 0 1))) : shiftedVariance κ σ g ≤ 32 * (weightedEnergy κ g + 2 * σ ^ κ * energy g) := by obtain ⟨hm, hm2⟩ := gaussian_abs_moment_le_two κ hκ0 hκ2 have he : 0 ≤ energy g := integral_nonneg (fun v => sq_nonneg _) have hσk : 0 ≤ σ ^ κ := Real.rpow_nonneg hσ κ have hc (z : ℝ) : |σ * z| ^ κ = σ ^ κ * |z| ^ κ := by rw [abs_mul, abs_of_nonneg hσ, Real.mul_rpow hσ (abs_nonneg z)] have ho := hjoint.integral_prod_left simp only [integral_const_mul] at ho have hn : ∀ t : ℝ, 0 ≤ |t| ^ κ * (∫ z, ‖g (t + σ * z)‖ ^ 2 ∂gaussianReal 0 1) := by intro t exact mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (integral_nonneg fun z => sq_nonneg _) have hb : Integrable (fun z : ℝ => 2 * (weightedEnergy κ g + σ ^ κ * |z| ^ κ * energy g)) (gaussianReal 0 1) := by have hi := ((integrable_const (weightedEnergy κ g)).add (hm.const_mul (σ ^ κ * energy g))).const_mul 2 convert hi using 1 ext z dsimp only [Pi.add_apply] ring have hfixed (z : ℝ) : (∫ t, |t| ^ κ * ‖g (t + σ * z)‖ ^ 2) ≤ 2 * (weightedEnergy κ g + σ ^ κ * |z| ^ κ * energy g) := by simpa only [hc, mul_assoc] using shifted_energy_le g κ (σ * z) hκ0 hκ2 h0 hκ have hnoise : (∫ z, 2 * (weightedEnergy κ g + σ ^ κ * |z| ^ κ * energy g) ∂gaussianReal 0 1) ≤ 2 * (weightedEnergy κ g + 2 * σ ^ κ * energy g) := by have hi : Integrable (fun z : ℝ => σ ^ κ * |z| ^ κ * energy g) (gaussianReal 0 1) := (hm.const_mul _).mul_const _ rw [integral_const_mul, integral_add (integrable_const _) hi] simp only [integral_const, probReal_univ, one_smul, integral_mul_const, integral_const_mul] have h := mul_le_mul_of_nonneg_left hm2 (mul_nonneg hσk he) nlinarith unfold shiftedVariance calc _ ≤ 16 * ∫ t, |t| ^ κ * (∫ z, ‖g (t + σ * z)‖ ^ 2 ∂gaussianReal 0 1) := mul_le_mul_of_nonneg_left (setIntegral_le_integral ho (Filter.Eventually.of_forall hn)) (by norm_num) _ = 16 * ∫ z, (∫ t, |t| ^ κ * ‖g (t + σ * z)‖ ^ 2) ∂gaussianReal 0 1 := by congr 1 simp_rw [← integral_const_mul] exact integral_integral_swap hjoint _ ≤ 16 * ∫ z, 2 * (weightedEnergy κ g + σ ^ κ * |z| ^ κ * energy g) ∂gaussianReal 0 1 := mul_le_mul_of_nonneg_left (integral_mono hjoint.integral_prod_right hb hfixed) (by norm_num) _ ≤ 16 * (2 * (weightedEnergy κ g + 2 * σ ^ κ * energy g)) := mul_le_mul_of_nonneg_left hnoise (by norm_num) _ = _ := by ring
2 supporting declarations (lemmas, instances)
  • shiftedVariance_realPart_le theorem — A complex physical-space kernel, a moment exponent and Gaussian noise scale, kernel measurability, and integrability of its weighted joint squared norm imply that taking the real part cannot increase the Gaussian-shifted design variance.
    g :
    ℝ → ℂ
    κ σ :
    ℝ
    hg :
    hjoint :
    Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖g (p.1 + σ * p.2)‖ ^ 2) (volume.prod (gaussianReal 0 1))
    shiftedVariance κ σ (fun v => ((g v).re : ℂ)) ≤ shiftedVariance κ σ g
    Proof (Lean source)
    theorem shiftedVariance_realPart_le (g : ℝ → ℂ) (κ σ : ℝ) (hg : Measurable g) (hjoint : Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖g (p.1 + σ * p.2)‖ ^ 2) (volume.prod (gaussianReal 0 1))) : shiftedVariance κ σ (fun v => ((g v).re : ℂ)) ≤ shiftedVariance κ σ g := by have hp (v : ℝ) : ‖((g v).re : ℂ)‖ ^ 2 ≤ ‖g v‖ ^ 2 := by simpa only [Complex.norm_real, Real.norm_eq_abs] using pow_le_pow_left₀ (abs_nonneg (g v).re) (Complex.abs_re_le_norm (g v)) 2 have hw (t z : ℝ) : |t| ^ κ * ‖((g (t + σ * z)).re : ℂ)‖ ^ 2 ≤ |t| ^ κ * ‖g (t + σ * z)‖ ^ 2 := mul_le_mul_of_nonneg_left (hp _) (Real.rpow_nonneg (abs_nonneg t) κ) have hr : Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖((g (p.1 + σ * p.2)).re : ℂ)‖ ^ 2) (volume.prod (gaussianReal 0 1)) := by apply hjoint.mono' · fun_prop · filter_upwards [] with p rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (Real.rpow_nonneg (abs_nonneg p.1) κ) (sq_nonneg _))] exact hw _ _ have ho := hr.integral_prod_left have hoc := hjoint.integral_prod_left simp only [integral_const_mul] at ho hoc unfold shiftedVariance apply mul_le_mul_of_nonneg_left _ (by norm_num) apply integral_mono_ae ho.restrict hoc.restrict -- Keep the weight inside each slice. Integral linearity also holds when it -- vanishes, so no unweighted integrability is required on zero-weight slices. have hs : ∀ᵐ t ∂volume, |t| ^ κ * (∫ z, ‖((g (t + σ * z)).re : ℂ)‖ ^ 2 ∂gaussianReal 0 1) ≤ |t| ^ κ * (∫ z, ‖g (t + σ * z)‖ ^ 2 ∂gaussianReal 0 1) := by filter_upwards [hr.prod_right_ae, hjoint.prod_right_ae] with t ht htc simpa only [integral_const_mul] using integral_mono ht htc (hw t) exact ae_restrict_of_ae hs
    Causalean.Stat.Nonparametric.shiftedVariance_realPart_le · Causalean/Stat/Nonparametric/GaussianTransfer.lean:35
  • gaussian_abs_moment_le_two theorem — A moment exponent in the interval from zero to two has a finite standard-Gaussian absolute moment bounded by two.
    κ :
    ℝ
    hκ0 :
    0 ≤ κ
    hκ2 :
    κ ≤ 2
    conclusion 1
    Integrable (fun z : ℝ => |z| ^ κ) (gaussianReal 0 1)
    conclusion 2
    (∫ z : ℝ, |z| ^ κ ∂gaussianReal 0 1) ≤ 2
    Proof (Lean source)
    theorem gaussian_abs_moment_le_two (κ : ℝ) (hκ0 : 0 ≤ κ) (hκ2 : κ ≤ 2) : Integrable (fun z : ℝ => |z| ^ κ) (gaussianReal 0 1) ∧ (∫ z : ℝ, |z| ^ κ ∂gaussianReal 0 1) ≤ 2 := by have hsq : Integrable (fun z : ℝ => z ^ 2) (gaussianReal 0 1) := (memLp_id_gaussianReal (μ := 0) (v := 1) 2).integrable_sq have hsqi : (∫ z : ℝ, z ^ 2 ∂gaussianReal 0 1) = 1 := by have h := variance_id_gaussianReal (μ := 0) (v := 1) rw [variance_eq_integral measurable_id.aemeasurable] at h simpa [integral_id_gaussianReal] using h have hb (z : ℝ) : |z| ^ κ ≤ 1 + z ^ 2 := by by_cases hz : |z| ≤ 1 · have := Real.rpow_le_one (abs_nonneg z) hz hκ0 nlinarith [sq_nonneg z] · have := Real.rpow_le_rpow_of_exponent_le (le_of_not_ge hz) hκ2 simp only [Real.rpow_two, sq_abs] at this linarith have hm : AEStronglyMeasurable (fun z : ℝ => |z| ^ κ) (gaussianReal 0 1) := by fun_prop have hi := (integrable_const (1 : ℝ)).add hsq have hiκ : Integrable (fun z : ℝ => |z| ^ κ) (gaussianReal 0 1) := hi.mono' hm (Filter.Eventually.of_forall fun z => by rw [Real.norm_eq_abs, abs_of_nonneg (Real.rpow_nonneg (abs_nonneg z) κ)] exact hb z) refine ⟨hiκ, ?_⟩ calc _ ≤ ∫ z : ℝ, (1 + z ^ 2) ∂gaussianReal 0 1 := integral_mono hiκ hi hb _ = 2 := by rw [integral_add (integrable_const _) hsq, hsqi] norm_num
    Causalean.Stat.Nonparametric.gaussian_abs_moment_le_two · Causalean/Stat/Nonparametric/GaussianTransfer.lean:72
Specialization 1 core · 0 supporting A caller supplies a compact C¹ profile F with the sinc-six support and two uniform heights. ★ inverseGaussian_shiftedVariance_le

Inverse Gaussian sinc-six specialization recipe

A caller supplies a compact C¹ profile F with the sinc-six support and two uniform heights. The sixth convolution of the normalized sinc boxes has exactly the support radius 3/(πh) and heights of orders h and h². No paper-specific construction is imported. Standard absolute integrability of the inverse multiplier, of its derivative transform, and of the design/noise joint integrand may be supplied.

The recipe derives the whole quantitative estimate, including Gaussian averaging: Vq ≤ C h^(κ+1) (1+σ/h)^10 exp(36 (σ/h)^2) with an explicit C depending only on the two profile heights. For a real-valued kernel represented by the real part of the complex inverse transform, Complex.abs_re_le_norm transfers the same upper bound to its squared real variance integral.

theorem inverseGaussian_shiftedVariance_le reviewed
Causalean.Stat.Nonparametric

A compact continuously differentiable frequency profile, a moment exponent in the interval from zero to two, a nonnegative Gaussian noise scale σ and a bandwidth h in (0, 1/4], nonnegative envelope constants, support of the profile within 3/(πh) of the origin, the uniform bound a h on the profile and the uniform bound b h² on its derivative, and integrable inverse-transform and joint design-noise quantities imply that the Gaussian-shifted design variance integral of the inverse Fourier transform of the inverse-Gaussian multiplier of the profile is at most 32 · (6/π) · (3a² + (2π)⁻² (b + 12πa)²) · h^(κ+1) · (1 + σ/h)^10 · exp(36 (σ/h)²).

Formal statement
F :
ℝ → ℂ
κ σ h a b :
ℝ
hF :
ContDiff ℝ 1 F
hcompact :
hκ0 :
0 ≤ κ
hκ2 :
κ ≤ 2
hh :
0 < h
hhmax :
h ≤ 1 / 4
hσ :
0 ≤ σ
ha :
0 ≤ a
hb :
0 ≤ b
hsupport :
support F ⊆ Icc (-(3 / (pi * h))) (3 / (pi * h))
hbound :
∀ ξ, ‖F ξ‖ ≤ a * h
hderiv :
∀ ξ, ‖deriv F ξ‖ ≤ b * h ^ 2
hinv :
Integrable (𝓕⁻ (inverseGaussian σ F))
hinvD :
Integrable (𝓕⁻ (deriv (inverseGaussian σ F)))
hjoint :
Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖𝓕⁻ (inverseGaussian σ F) (p.1 + σ * p.2)‖ ^ 2) (volume.prod (gaussianReal 0 1))
shiftedVariance κ σ (𝓕⁻ (inverseGaussian σ F))
≤ (32 * (6 / pi) * (3 * a ^ 2 + (2 * pi)⁻¹ ^ 2 * (b + 12 * pi * a) ^ 2)) * h ^ (κ + 1) * (1 + σ / h) ^ 10 * exp (36 * (σ / h) ^ 2)
Proof (Lean source)
theorem inverseGaussian_shiftedVariance_le (F : ℝ → ℂ) (κ σ h a b : ℝ) (hF : ContDiff ℝ 1 F) (hcompact : HasCompactSupport F) (hκ0 : 0 ≤ κ) (hκ2 : κ ≤ 2) (hh : 0 < h) (hhmax : h ≤ 1 / 4) (hσ : 0 ≤ σ) (ha : 0 ≤ a) (hb : 0 ≤ b) (hsupport : support F ⊆ Icc (-(3 / (pi * h))) (3 / (pi * h))) (hbound : ∀ ξ, ‖F ξ‖ ≤ a * h) (hderiv : ∀ ξ, ‖deriv F ξ‖ ≤ b * h ^ 2) (hinv : Integrable (𝓕⁻ (inverseGaussian σ F))) (hinvD : Integrable (𝓕⁻ (deriv (inverseGaussian σ F)))) (hjoint : Integrable (fun p : ℝ × ℝ => |p.1| ^ κ * ‖𝓕⁻ (inverseGaussian σ F) (p.1 + σ * p.2)‖ ^ 2) (volume.prod (gaussianReal 0 1))) : shiftedVariance κ σ (𝓕⁻ (inverseGaussian σ F)) ≤ (32 * (6 / pi) * (3 * a ^ 2 + (2 * pi)⁻¹ ^ 2 * (b + 12 * pi * a) ^ 2)) * h ^ (κ + 1) * (1 + σ / h) ^ 10 * exp (36 * (σ / h) ^ 2) := by have hG := inverseGaussian_compactInverseData F σ hF hcompact hinv hinvD obtain ⟨hi0, _, heq, _⟩ := inverse_energy_endpoints (inverseGaussian σ F) hG obtain ⟨hiκ, hw⟩ := inverseGaussian_weightedEnergy_le F κ σ h a b hF hcompact hκ0 hκ2 hh hσ ha hb hsupport hbound hderiv hinv hinvD have hv := shiftedVariance_le (𝓕⁻ (inverseGaussian σ F)) κ σ hκ0 hκ2 hσ hi0 hiκ hjoint rw [heq] at hv have he := inverseGaussian_energy_le F σ h a hF.continuous hh ha hsupport hbound have hr : 0 ≤ σ / h := div_nonneg hσ hh.le have hq : 1 ≤ 1 + σ / h := by linarith have hrκ : (σ / h) ^ κ ≤ (1 + σ / h) ^ (2 : ℕ) := by calc _ ≤ (1 + σ / h) ^ κ := Real.rpow_le_rpow hr (by linarith) hκ0 _ ≤ (1 + σ / h) ^ (2 : ℝ) := Real.rpow_le_rpow_of_exponent_le hq hκ2 _ = _ := Real.rpow_natCast _ 2 have hσeq : σ = h * (σ / h) := by field_simp have hscale : σ ^ κ * h = h ^ (κ + 1) * (σ / h) ^ κ := by calc _ = (h * (σ / h)) ^ κ * h := by rw [← hσeq] _ = h ^ (κ + 1) * (σ / h) ^ κ := by rw [Real.mul_rpow hh.le hr, Real.rpow_add hh, Real.rpow_one] ring have hnoise : σ ^ κ * energy (inverseGaussian σ F) ≤ (6 / pi) * a ^ 2 * h ^ (κ + 1) * (1 + σ / h) ^ 2 * exp (36 * (σ / h) ^ 2) := by calc _ ≤ σ ^ κ * ((6 / pi) * a ^ 2 * h * exp (36 * (σ / h) ^ 2)) := mul_le_mul_of_nonneg_left he (Real.rpow_nonneg hσ κ) _ = (6 / pi) * a ^ 2 * h ^ (κ + 1) * (σ / h) ^ κ * exp (36 * (σ / h) ^ 2) := by calc _ = (6 / pi) * a ^ 2 * (σ ^ κ * h) * exp (36 * (σ / h) ^ 2) := by ring _ = _ := by rw [hscale]; ring _ ≤ _ := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hrκ (by positivity)) (Real.exp_pos _).le have hq4 : (1 + σ / h) ^ (4 : ℕ) ≤ (1 + σ / h) ^ (10 : ℕ) := pow_le_pow_right₀ hq (by norm_num) have hq2 : (1 + σ / h) ^ (2 : ℕ) ≤ (1 + σ / h) ^ (10 : ℕ) := pow_le_pow_right₀ hq (by norm_num) have hw10 := hw.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hq4 (show 0 ≤ ((6 / pi) * (a ^ 2 + (2 * pi)⁻¹ ^ 2 * (b + 12 * pi * a) ^ 2)) * h ^ (κ + 1) by positivity)) (Real.exp_pos _).le) have hn10 := hnoise.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hq2 (show 0 ≤ (6 / pi) * a ^ 2 * h ^ (κ + 1) by positivity)) (Real.exp_pos _).le) calc _ ≤ 32 * (weightedEnergy κ (𝓕⁻ (inverseGaussian σ F)) + 2 * (σ ^ κ * energy (inverseGaussian σ F))) := by simpa only [mul_assoc] using hv _ ≤ 32 * ((((6 / pi) * (a ^ 2 + (2 * pi)⁻¹ ^ 2 * (b + 12 * pi * a) ^ 2)) * h ^ (κ + 1) * (1 + σ / h) ^ 10 * exp (36 * (σ / h) ^ 2)) + 2 * ((6 / pi) * a ^ 2 * h ^ (κ + 1) * (1 + σ / h) ^ 10 * exp (36 * (σ / h) ^ 2))) := mul_le_mul_of_nonneg_left (add_le_add hw10 (mul_le_mul_of_nonneg_left hn10 (by norm_num))) (by norm_num) _ = _ := by ring
Causalean.Stat.Nonparametric.inverseGaussian_shiftedVariance_le · Causalean/Stat/Nonparametric/Specialization.lean:28 · uses inverseGaussian , shiftedVariance