Stat.Bootstrap
Bootstrap foundations: resampling distributions and consistency of bootstrap approximations.
CI 5 core · 0 supporting This file turns the nonparametric bootstrap variance into a bootstrap standard error and then uses studentized central-limit and Wald-coverage results. ★ bootstrapSE_tendsto_inProb★ bootstrap_studentized_tendsto★ bootstrap_wald_coverage
Bootstrap Wald Intervals
This file turns the nonparametric bootstrap variance into a bootstrap standard error and then uses studentized central-limit and Wald-coverage results. It formalizes the standard route in which a consistent bootstrap standard error validates a studentized confidence interval for an asymptotically linear estimator.
The main declarations are IIDSample.bootstrapSE, its consistency theorem
IIDSample.bootstrapSE_tendsto_inProb, the studentized statistic
IIDSample.bootstrapStudentized, the distributional limit
bootstrap_studentized_tendsto, and the Wald coverage theorem
bootstrap_wald_coverage. The file does not prove percentile-bootstrap or
conditional weak-convergence results; it uses only the bootstrap standard-error
route.
For a measurable sample space, measurable observation space, sample-space measure, and observation-space measure, an independent, identically distributed sample, a real-valued influence function, and a sample size, the bootstrap standard error is the square root of the bootstrap variance at that sample size.
Definition (Lean source)
Consistency of the bootstrap standard error. Along an i.i.d. sample S, if the influence function ψ is measurable, integrable, square-integrable, and has population mean zero, then the bootstrap standard error of √n θ̂ converges in probability to the asymptotic standard deviation .
Formal statement
Proof (Lean source)
For a measurable sample space, measurable observation space, sample-space measure, and observation-space measure, a sequence of real-valued estimators, a target real value, an independent, identically distributed sample, a real-valued influence function, and a sample size, the bootstrap studentized statistic is , where the denominator is the bootstrap standard error computed from the full sample of that size.
Definition (Lean source)
Bootstrap studentized CLT. Let θ̂ₙ be asymptotically linear at θ₀ with influence function ψ along the i.i.d. sample S, where ψ is measurable, integrable, and square-integrable; suppose further that the influence function is nondegenerate, , the rescaled estimator is a.e. measurable at every sample size, and the bootstrap studentized statistic is a.e. measurable at every sample size. Then the bootstrap-studentized statistic converges in distribution to the standard normal law, where is the bootstrap standard error.
Formal statement
Proof (Lean source)
Bootstrap Wald asymptotic coverage. Under the asymptotic-linearity hypothesis, measurability, integrability, and square-integrability of ψ, influence-function nondegeneracy, and measurability of the rescaled estimator and of the studentized statistic at every sample size — the hypotheses of bootstrap_studentized_tendsto — fix a positive critical value z and a coverage-probability sequence coverProb that asymptotically tracks the studentized interval's true coverage event; then coverProb converges to the standard normal probability of the interval [-z, z], so the bootstrap studentized interval has asymptotic -coverage.
Formal statement
Proof (Lean source)
GaussianMultiplier 1 core · 1 supporting This file proves the exact Gaussian law of multiplier-bootstrap weighted sums with standard Gaussian multipliers. ★ multiplierBootstrap_law
Gaussian Multiplier Bootstrap
This file proves the exact Gaussian law of multiplier-bootstrap weighted sums with standard Gaussian multipliers. It specializes that law to the recentered sample mean, where the fixed-data variance is the empirical variance of the recentered sample.
The core theorem map_weighted_sum_gaussian says that a fixed linear
combination of independent standard Gaussian multipliers is Gaussian with
variance equal to the sum of squared weights. The specialization
multiplierBootstrap_law applies this to
n^{-1/2} Σ_i (x_i - xbar) ξ_i, giving the exact centered Gaussian law with
the empirical recentered variance.
Exact law of the √n-scaled multiplier-bootstrap mean. Fix a sample size n, data x : Fin n → ℝ, and a multiplier family ξ. If ξ is independent across coordinates, each ξ i is measurable, and each ξ i has the standard Gaussian law, then the scaled multiplier-bootstrap statistic has exactly the centered Gaussian law with variance equal to the sample variance .
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
map_weighted_sum_gaussiantheorem — Core multiplier lemma. Let ξ : Fin n → Ω → ℝ be a mutually independent family of measurable random variables, each with law gaussianReal 0 1 (standard Gaussian). Then for any fixed weights a : Fin n → ℝ, the weighted sum ω ↦ ∑ i, a i * ξ i ω has lawhypothesesn :ℕξ :Fin n → Ω → ℝhindep :iIndepFun ξ μhmeas :∀ i, Measurable (ξ i)hlaw :∀ i, μ.map (ξ i) = gaussianReal 0 1a :Fin n → ℝconclusionμ.map (fun ω => ∑ i, a i * ξ i ω) = gaussianReal 0 ⟨∑ i, (a i) ^ 2, by positivity⟩Proof (Lean source)
theorem map_weighted_sum_gaussian {n : ℕ} (ξ : Fin n → Ω → ℝ) (hindep : iIndepFun ξ μ) (hmeas : ∀ i, Measurable (ξ i)) (hlaw : ∀ i, μ.map (ξ i) = gaussianReal 0 1) (a : Fin n → ℝ) : μ.map (fun ω => ∑ i, a i * ξ i ω) = gaussianReal 0 ⟨∑ i, (a i) ^ 2, by positivity⟩ := by -- The summands `g i ω = a i * ξ i ω`. set g : Fin n → Ω → ℝ := fun i ω => a i * ξ i ω with hg -- Each summand is measurable, independent, and Gaussian with variance `(a i)²`. have hg_meas : ∀ i, Measurable (g i) := fun i => (hmeas i).const_mul (a i) have hg_indep : iIndepFun g μ := by have : g = fun i => (fun x => a i * x) ∘ ξ i := by funext i ω; simp [hg, comp] rw [this] exact hindep.comp _ (fun i => measurable_const_mul (a i)) have hg_law : ∀ i, μ.map (g i) = gaussianReal 0 ⟨(a i) ^ 2, sq_nonneg _⟩ := by intro i have hgi : g i = (fun x => a i * x) ∘ ξ i := rfl have hmap : μ.map (g i) = (gaussianReal 0 1).map (fun x => a i * x) := by rw [hgi, ← Measure.map_map (measurable_const_mul (a i)) (hmeas i), hlaw i] rw [hmap, gaussianReal_map_const_mul (a i)] congr 1 · ring · ext; simp; rfl -- General `Finset`-indexed statement, then specialise to `univ`. have key : ∀ s : Finset (Fin n), μ.map (fun ω => ∑ i ∈ s, g i ω) = gaussianReal 0 ⟨∑ i ∈ s, (a i) ^ 2, by positivity⟩ := by intro s induction s using Finset.induction with | empty => simp only [Finset.sum_empty] rw [Measure.map_const] simp only [measure_univ, one_smul] rw [show (⟨(0 : ℝ), by positivity⟩ : NNReal) = 0 from rfl] exact (gaussianReal_zero_var 0).symm | insert j s hj ih => -- Split off the `j`-th summand: rewrite as the Pi-sum `(partial sum) + g j`. have hsum : (fun ω => ∑ i ∈ insert j s, g i ω) = (fun ω => ∑ i ∈ s, g i ω) + g j := by funext ω; rw [Finset.sum_insert hj]; simp [Pi.add_apply]; ring rw [hsum] -- Independence of the partial sum and the new term. have hindepFun : IndepFun (fun ω => ∑ i ∈ s, g i ω) (g j) μ := by have h := hg_indep.indepFun_finset_sum_of_notMem hg_meas (s := s) (i := j) hj have heq : (∑ i ∈ s, g i) = (fun ω => ∑ i ∈ s, g i ω) := by funext ω; simp [Finset.sum_apply] rwa [heq] at h -- Convolution of the two Gaussian laws. have hconv := gaussianReal_add_gaussianReal_of_indepFun hindepFun ih (hg_law j) rw [hconv] congr 1 · simp · ext show (∑ i ∈ s, a i ^ 2) + a j ^ 2 = ∑ i ∈ insert j s, a i ^ 2 rw [Finset.sum_insert hj] ring have := key univ simpa using this
Variance 3 core · 1 supporting This file defines the nonparametric bootstrap variance for a statistic of an i.i.d. ★ bootstrapVar_eq_centered★ bootstrapVar_tendsto_inProb
Bootstrap Variance
This file defines the nonparametric bootstrap variance for a statistic of an i.i.d. sample as the empirical second moment minus the square of the empirical mean. It proves the exact centered-variance identity and the consistency result needed by bootstrap standard-error and Wald-inference arguments.
The public API is IIDSample.bootstrapVar for the plug-in bootstrap variance,
IIDSample.bootstrapVar_eq_centered for the exact centered empirical-variance
identity, IIDSample.bootstrapVar_nonneg for nonnegativity, and
IIDSample.bootstrapVar_tendsto_inProb for convergence in probability to the
population second moment under the usual mean-zero influence-function
hypotheses.
For an independent and identically distributed sample, a real-valued statistic of one observation, and a nonnegative integer sample size, the nonparametric bootstrap variance is the function that assigns to each sample-space outcome the empirical mean of the statistic squared minus the square of its empirical mean, computed from the first observations at that outcome.
Exact bootstrap-variance identity. For an iid sample S, a statistic ψ, a sample size n, and a sample-path outcome ω, the plug-in bootstrap variance of ψ equals the centered empirical second moment of ψ over the first n observations.
Formal statement
Proof (Lean source)
Consistency of the bootstrap variance. Along the i.i.d. sample S, if the influence function ψ is measurable, integrable, square-integrable, and has population mean zero, then the bootstrap variance converges in probability to the population second moment .
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
bootstrapVar_nonnegtheorem — The bootstrap variance is nonnegative: it is a centered empirical second moment (bootstrapVar_eq_centered).hypothesesconclusion0 ≤ bootstrapVar S ψ n ωProof (Lean source)
theorem bootstrapVar_nonneg (S : IIDSample Ω X μ P) (ψ : X → ℝ) (n : ℕ) (ω : Ω) : 0 ≤ bootstrapVar S ψ n ω := by rw [bootstrapVar_eq_centered] apply mul_nonneg · positivity · exact sum_nonneg (fun i _ => sq_nonneg _)