Stat.Bootstrap.SmoothZEstimator
Efron's bootstrap for estimators θ̂ solving a finite-dimensional estimating equation (1/n) Σ ψ(θ, Xᵢ) = 0 with a smooth score ψ.
Basic 9 core · 0 supporting This module gives names to the finite-sample score, the sampling and Efron-bootstrap linearization remainders, and the two conditional-in-probability hypotheses used by smooth Z-estimator bootstrap validity.
Bootstrap hypotheses and remainders for smooth Z-estimators
This module gives names to the finite-sample score, the sampling and Efron-bootstrap linearization remainders, and the two conditional-in-probability hypotheses used by smooth Z-estimator bootstrap validity. The definitions keep the inner bootstrap error tolerance and the outer sampling-probability tolerance separate.
Given an estimating function, a parameter, and finite data, the empirical estimating equation is the finite average of the observationwise scores.
For an iid sample, an estimating function, and an estimator, eventual exact solution of the data estimating equation in sampling measure means the sampling measure of outcomes with a nonzero empirical score tends to zero.
Definition (Lean source)
For an iid sample, an estimating function, and an estimator, the root-sample-size empirical score residual is negligible in probability.
Definition (Lean source)
For an iid sample, an estimating function, and an estimator, eventual exact solution of the resampled estimating equation in bootstrap probability, measured by the outer sampling measure means that, at every positive threshold, the sampling measure of data sets whose bootstrap probability of a nonzero score exceeds that threshold tends to zero.
Definition (Lean source)
For an iid sample, an estimating function, and an estimator, the root-sample-size resampled score residual is negligible in bootstrap probability, in outer sampling probability when every positive inner and outer tolerance eventually has vanishing sampling probability.
Definition (Lean source)
For an iid sample, a bootstrap statistic, and a data-dependent target, conditional convergence in bootstrap probability, in outer sampling probability means that every inner error tolerance and every outer probability tolerance have a vanishing outer sampling tail.
Definition (Lean source)
For an iid sample, an estimator, and a population target, bootstrap consistency for the target, in outer sampling probability is conditional convergence in probability of the resampled estimator to the fixed target.
Definition (Lean source)
Given an iid sample, an estimator, a target, an influence function, a sample size and an outcome, the sampling linearization remainder is the root-sample-size estimator error minus the normalized influence sum.
Given an estimator, an influence function, a sample size, data, and a resample, the bootstrap linearization remainder is the centered root-sample-size estimator difference minus the centered bootstrap influence mean.
Definition (Lean source)
FeasibleGMMHelpers 4 core · 1 supporting This module holds the finite-sample building blocks of the feasible-GMM bootstrap argument: the sample-function forms of the smooth GMM Jacobian, the normalized moment and the first-order-condition residual, together wit ★ feasibleGMM_populationRemainder_le
Feasible GMM: sample-function objects and the deterministic remainder bounds
This module holds the finite-sample building blocks of the feasible-GMM bootstrap argument: the
sample-function forms of the smooth GMM Jacobian, the normalized moment and the first-order-condition
residual, together with the two deterministic inequalities they satisfy on a single fixed sample.
gmmNormalizedMomentFn_expansion_le is the one-sample Taylor expansion of the normalized moment
around the target parameter, and feasibleGMM_populationRemainder_le turns operator, residual and
moment budgets on one sample into a bound on the influence-function linearization remainder.
Neither statement mentions probability; the probabilistic argument that supplies the budgets lives in
Causalean.Stat.Bootstrap.SmoothZEstimator.FeasibleGMMLinearization, and the user-facing constructor
in …SmoothZEstimator.FeasibleGMM.
Given smooth GMM regularity, a parameter, and finite data, the sample-function GMM Jacobian averages the observationwise moment derivatives.
Given a GMM problem, a parameter, and finite data, the sample-function normalized moment is the moment sum divided by the square root of sample size.
Definition (Lean source)
Given a smooth GMM problem, an estimated parameter and weight, and finite data, the normalized feasible-GMM first-order-condition residual applies the empirical Jacobian adjoint and estimated weight to the normalized moment.
Definition (Lean source)
On a single nonempty sample from a smooth feasible-GMM problem, at a parameter value and a weight operator with nonnegative budgets that bound the Taylor error of the normalized moment, the drift of the weighted sample Jacobian from its population counterpart, the first-order-condition residual and the normalized moment at the target, and where the drift is small enough for the absorption step, the influence-function linearization remainder is bounded by an explicit expression in those budgets.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
gmmNormalizedMomentFn_expansion_letheorem — On a single nonempty sample from a smooth GMM problem, at a parameter value, given a nonnegative Lipschitz constant for the moment derivative on a ball, a parameter in that ball, the normalized moment differs from its first-order expansion around the target by at most the Jacobian drift plus the Lipschitz term, times the scaled parameter displacement.hypothesesX :sharedType u_2E :sharedType u_3F :sharedType u_4reg :L :X → ℝdelta :ℝhLnonneg :∀ x, 0 ≤ L xhLbound :∀ theta ∈ closedBall prob.θ₀ delta,∀ theta' ∈ closedBall prob.θ₀ delta,∀ x, ‖reg.deriv theta x - reg.deriv theta' x‖ ≤ L x * ‖theta - theta'‖n :ℕhn :n ≠ 0x :Fin n → Xtheta :Ehtheta :theta ∈ closedBall prob.θ₀ deltaconclusion‖gmmNormalizedMomentFn prob theta x - (gmmNormalizedMomentFn prob prob.θ₀ x + prob.G (sqrt (n : ℝ) • (theta - prob.θ₀)))‖≤ (‖finMean (fun i ↦ reg.deriv prob.θ₀ (x i)) - prob.G‖ + finMean (fun i ↦ L (x i)) * ‖theta - prob.θ₀‖) * ‖Real.sqrt (n : ℝ) • (theta - prob.θ₀)‖Proof (Lean source)
theorem gmmNormalizedMomentFn_expansion_le {prob : GMMProblem (E := E) (F := F) P} (reg : SmoothGMomentRegularity prob) {L : X → ℝ} {delta : ℝ} (hLnonneg : ∀ x, 0 ≤ L x) (hLbound : ∀ theta ∈ closedBall prob.θ₀ delta, ∀ theta' ∈ closedBall prob.θ₀ delta, ∀ x, ‖reg.deriv theta x - reg.deriv theta' x‖ ≤ L x * ‖theta - theta'‖) {n : ℕ} (hn : n ≠ 0) (x : Fin n → X) (theta : E) (htheta : theta ∈ closedBall prob.θ₀ delta) : ‖gmmNormalizedMomentFn prob theta x - (gmmNormalizedMomentFn prob prob.θ₀ x + prob.G (sqrt (n : ℝ) • (theta - prob.θ₀)))‖ ≤ (‖finMean (fun i ↦ reg.deriv prob.θ₀ (x i)) - prob.G‖ + finMean (fun i ↦ L (x i)) * ‖theta - prob.θ₀‖) * ‖Real.sqrt (n : ℝ) • (theta - prob.θ₀)‖ := by let Delta : E := theta - prob.θ₀ let R : Fin n → F := fun i ↦ prob.g theta (x i) - prob.g prob.θ₀ (x i) - reg.deriv prob.θ₀ (x i) Delta have hnpos : 0 < (n : ℝ) := by exact_mod_cast Nat.pos_of_ne_zero hn have hsqrt : 0 < sqrt (n : ℝ) := Real.sqrt_pos.2 hnpos have hcoef : (sqrt (n : ℝ))⁻¹ = sqrt (n : ℝ) * (n : ℝ)⁻¹ := by field_simp [hsqrt.ne'] rw [Real.sq_sqrt hnpos.le] have hR : ∀ i : Fin n, ‖R i‖ ≤ L (x i) * ‖Delta‖ ^ 2 := by intro i exact reg.taylor_remainder_le theta hLnonneg hLbound htheta (x i) have hmeanExpansion : finMean (fun i ↦ prob.g theta (x i)) = finMean (fun i ↦ prob.g prob.θ₀ (x i)) + finMean (fun i ↦ reg.deriv prob.θ₀ (x i)) Delta + finMean R := by unfold finMean simp only [smul_apply] rw [← smul_add, ← smul_add] apply congrArg simp only [sum_apply] rw [← Finset.sum_add_distrib, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro i hi dsimp [R, Delta] abel have hRmean : ‖finMean R‖ ≤ finMean (fun i ↦ L (x i)) * ‖Delta‖ ^ 2 := by unfold finMean rw [norm_smul_of_nonneg (inv_nonneg.2 (Nat.cast_nonneg _))] calc (n : ℝ)⁻¹ * ‖∑ i, R i‖ ≤ (n : ℝ)⁻¹ * ∑ i, ‖R i‖ := by gcongr exact norm_sum_le _ _ _ ≤ (n : ℝ)⁻¹ * ∑ i, L (x i) * ‖Delta‖ ^ 2 := by gcongr with i exact hR i _ = ((n : ℝ)⁻¹ * ∑ i, L (x i)) * ‖Delta‖ ^ 2 := by rw [← Finset.sum_mul] ring have hscaledR : ‖Real.sqrt (n : ℝ) • finMean R‖ ≤ (finMean (fun i ↦ L (x i)) * ‖Delta‖) * ‖Real.sqrt (n : ℝ) • Delta‖ := by rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg hsqrt.le, norm_smul, Real.norm_eq_abs, abs_of_nonneg hsqrt.le] calc sqrt (n : ℝ) * ‖finMean R‖ ≤ sqrt (n : ℝ) * (finMean (fun i ↦ L (x i)) * ‖Delta‖ ^ 2) := mul_le_mul_of_nonneg_left hRmean hsqrt.le _ = (finMean (fun i ↦ L (x i)) * ‖Delta‖) * (sqrt (n : ℝ) * ‖Delta‖) := by ring have hid : gmmNormalizedMomentFn prob theta x - (gmmNormalizedMomentFn prob prob.θ₀ x + prob.G (sqrt (n : ℝ) • Delta)) = (finMean (fun i ↦ reg.deriv prob.θ₀ (x i)) - prob.G) (sqrt (n : ℝ) • Delta) + sqrt (n : ℝ) • finMean R := by unfold gmmNormalizedMomentFn rw [show (sqrt (n : ℝ))⁻¹ • ∑ i, prob.g theta (x i) = sqrt (n : ℝ) • finMean (fun i ↦ prob.g theta (x i)) by unfold finMean rw [smul_smul, hcoef]] rw [show (sqrt (n : ℝ))⁻¹ • ∑ i, prob.g prob.θ₀ (x i) = sqrt (n : ℝ) • finMean (fun i ↦ prob.g prob.θ₀ (x i)) by unfold finMean rw [smul_smul, hcoef]] rw [hmeanExpansion] simp only [smul_add, map_smul, sub_apply] module rw [show theta - prob.θ₀ = Delta by rfl, hid] exact (norm_add_le _ _).trans <| le_trans (add_le_add ((finMean (fun i ↦ reg.deriv prob.θ₀ (x i)) - prob.G).le_opNorm _) hscaledR) (by ring_nf; rfl)
OLS 3 core · 3 supporting This module realizes the generic smooth Z-estimator constructor for the heteroskedastic OLS score. ★ olsSampleEstimator_solvesInProbability★ olsContrast
Efron-bootstrap validity for OLS contrasts
This module realizes the generic smooth Z-estimator constructor for the heteroskedastic OLS score. Existing OLS results discharge smooth regularity, data consistency, and the sample normal equations; users supply only bootstrap consistency/root validity and contrast nondegeneracy.
Given regressors and an outcome and a finite data sample of size n, the OLS sample-function estimator applies the closed-form OLS coefficient map to the finite average of the raw moment vector.
Definition (Lean source)
Under iid sampling, regressors and an outcome, their measurability, integrable OLS raw moments, and a positive-definite population Gram matrix, the OLS sample-function estimator has a negligible root-sample-size score residual in probability.
Formal statement
Proof (Lean source)
Under iid sampling, regressors and an outcome, their measurability, integrability of all their augmented monomials through degree four, and a positive-definite population Gram matrix, for a continuous linear contrast, if the resampled OLS coefficient is consistent and has a negligible root-sample-size score residual in bootstrap probability, in outer sampling probability, and the contrast has positive influence variance, that OLS contrast is bootstrap asymptotically linear.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
measurable_olsSampleEstimatortheorem — For measurable regressors and outcome, the OLS sample-function estimator is measurable at every sample size.hypothesesX :sharedType u_2y :X → ℝhx :hy :n :ℕconclusionMeasurable (olsSampleEstimator x y n)Proof (Lean source)
@[fun_prop] theorem measurable_olsSampleEstimator {x : X → EuclideanSpace ℝ K} {y : X → ℝ} (hx : Measurable x) (hy : Measurable y) (n : ℕ) : Measurable (olsSampleEstimator x y n) := by letI : MeasurableSpace (Matrix K K ℝ) := MeasurableSpace.pi letI : BorelSpace (Matrix K K ℝ) := ⟨by change MeasurableSpace.pi = borel (K → K → ℝ) exact BorelSpace.measurable_eq⟩ have hM : Measurable (fun data : Fin n → X => finMean (fun i ↦ olsRawMoment x y (data i))) := by unfold finMean change Measurable (fun data : Fin n → X => (n : ℝ)⁻¹ • ∑ i, olsRawMoment x y (data i)) exact (Finset.measurable_sum _ fun i _ => (measurable_olsRawMoment hx hy).comp (measurable_pi_apply i)).const_smul ((n : ℝ)⁻¹) have hQ : Measurable (fun data : Fin n → X => olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))) := by unfold olsQFromMoments exact measurable_pi_lambda _ fun i => measurable_pi_lambda _ fun j => (measurable_pi_apply _).comp hM have hR : Measurable (fun data : Fin n → X => olsRFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))) := by unfold olsRFromMoments exact measurable_pi_lambda _ fun i => (measurable_pi_apply _).comp hM have hInv : Measurable (fun data : Fin n → X => (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))⁻¹) := by rw [show (fun data : Fin n → X => (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))⁻¹) = (fun data : Fin n → X => Ring.inverse (det (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))) • Matrix.adjugate (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))) by funext data exact Matrix.inv_def _] change Measurable ((fun data : Fin n → X => Ring.inverse (det (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))))) • (fun data : Fin n → X => Matrix.adjugate (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))))) simpa [Function.comp_def] using (measurable_inv.comp (continuous_id.matrix_det.measurable.comp hQ)).smul (continuous_id.matrix_adjugate.measurable.comp hQ) have hV : Measurable (fun data : Fin n → X => (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))⁻¹ *ᵥ olsRFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))) := by unfold mulVec dotProduct exact measurable_pi_lambda _ fun i => Finset.measurable_sum _ fun j _ => ((measurable_pi_apply j).comp ((measurable_pi_apply i).comp hInv)).mul ((measurable_pi_apply j).comp hR) unfold olsSampleEstimator olsBetaFromMoments rw [show (fun data : Fin n → X => (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))⁻¹.toEuclideanLin (toLp 2 (olsRFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))))) = (fun data : Fin n → X => toLp 2 ((olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))⁻¹ *ᵥ olsRFromMoments (finMean (fun i ↦ olsRawMoment x y (data i))))) by funext data rw [Matrix.toEuclideanLin_apply]] exact (PiLp.continuous_toLp (2 : ℝ≥0∞) (fun _ : K => ℝ)).measurable.comp hV -
olsSampleEstimator_sampleVectortheorem — For an iid sample, regressors and an outcome, the sample-function OLS estimator evaluated on the sample vector equals the library OLS estimator.hypothesesOmega :sharedType u_1X :sharedType u_2K :sharedType u_3S :IIDSample Omega X mu Px :X → EuclideanSpace ℝ Ky :X → ℝn :ℕomega :OmegaconclusionolsSampleEstimator x y n (S.sampleVector n omega) = olsBetaHat S x y n omegaProof (Lean source)
theorem olsSampleEstimator_sampleVector (S : IIDSample Omega X mu P) (x : X → EuclideanSpace ℝ K) (y : X → ℝ) (n : ℕ) (omega : Omega) : olsSampleEstimator x y n (S.sampleVector n omega) = olsBetaHat S x y n omega := by unfold olsSampleEstimator olsBetaHat olsEmpiricalMoments IIDSample.sampleMeanVec IIDSample.sampleVector finMean exact congrArg (fun M : OLSMoment K => olsBetaFromMoments ((n : ℝ)⁻¹ • M)) (Fin.sum_univ_eq_sum_range (fun i => olsRawMoment x y (S.Z i omega)) n) -
olsSampleEstimator_eventuallySolvesExactlytheorem — Under iid sampling, regressors and an outcome, their measurability, integrable OLS raw moments, and a positive-definite population Gram matrix, the OLS sample-function estimator eventually solves its score equation exactly, with probability tending to one.hypothesesOmega :sharedType u_1X :sharedType u_2K :sharedType u_3S :IIDSample Omega X mu Px :X → EuclideanSpace ℝ Ky :X → ℝhx :hy :hraw :Integrable (olsRawMoment x y) PconclusionProof (Lean source)
theorem olsSampleEstimator_eventuallySolvesExactly [IsProbabilityMeasure mu] (S : IIDSample Omega X mu P) {x : X → EuclideanSpace ℝ K} {y : X → ℝ} (hx : Measurable x) (hy : Measurable y) (hraw : Integrable (olsRawMoment x y) P) (hQ : (olsQ P x y).PosDef) : EventuallySolvesEstimatingEquationExactly S (olsScore x y) (olsSampleEstimator x y) := by have hsing := olsQHat_singular_probability_tendsto_zero S hx hy hraw hQ unfold EventuallySolvesEstimatingEquationExactly refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hsing (fun _ => zero_le) (fun n => measure_mono ?_) intro omega homega simp only [Set.mem_setOf_eq] at homega ⊢ by_contra hdet apply homega rw [olsSampleEstimator_sampleVector] unfold zEstimatorSampleScore finMean IIDSample.sampleVector rw [show (∑ i : Fin n, olsScore x y (olsBetaHat S x y n omega) (S.Z i omega)) = ∑ t ∈ range n, olsScore x y (olsBetaHat S x y n omega) (S.Z t omega) from Fin.sum_univ_eq_sum_range (fun t => olsScore x y (olsBetaHat S x y n omega) (S.Z t omega)) n, ols_sampleMean_score, ols_normalEquation S n omega hdet] simp
BootstrapLinearization 1 core · 0 supporting This module is the bootstrap analogue of smooth Z-estimator asymptotic linearity. ★ zEstimator_bootstrapLinearization
Conditional bootstrap linearization for smooth Z-estimators
This module is the bootstrap analogue of smooth Z-estimator asymptotic linearity. It combines Taylor expansion at the population target, the bootstrap weak law for the target Jacobian and Lipschitz envelope, and conditional tightness of the centered target score mean. No bootstrap Donsker or stochastic-equicontinuity premise appears.
For a score, target, and population law, a smooth Z-estimator regularity package, an iid sample and sample-function estimator, data and bootstrap consistency, and data and bootstrap solution of the estimating equation up to negligible root-sample-size residuals, the conditional bootstrap vector linearization remainder vanishes in bootstrap probability, in outer sampling probability.
Formal statement
Proof (Lean source)
FeasibleGMM 1 core · 0 supporting This module turns the feasible-GMM sampling and bootstrap linearizations into the BootstrapAsymLinear bundle for a contrast of the coefficient vector, so the percentile and basic bootstrap intervals apply to feasible GMM ★ feasibleGMM
Feasible GMM: the bootstrap-asymptotic-linearity constructor
This module turns the feasible-GMM sampling and bootstrap linearizations into the
BootstrapAsymLinear bundle for a contrast of the coefficient vector, so the percentile and basic
bootstrap intervals apply to feasible GMM with a general weight matrix.
Under a smooth feasible-GMM problem, an iid sample, measurable estimator, weight estimator, and contrast, data and bootstrap consistency of the parameter and weight, negligible data and bootstrap first-order-condition residuals, and positive contrast influence variance, the feasible-GMM contrast is bootstrap asymptotically linear. The sampling linearization is supplied by feasibleGMM_asymLinear_of_smoothMoment_of_sampleFn.
Formal statement
Proof (Lean source)
FeasibleGMMLinearization 1 core · 0 supporting This module proves that the centered feasible-GMM bootstrap estimator has the GMM influence-function linearization in bootstrap probability, in outer sampling probability. ★ feasibleGMM_bootstrapLinearization_of_smoothMoment
Feasible GMM: the conditional bootstrap linearization
This module proves that the centered feasible-GMM bootstrap estimator has the GMM influence-function linearization in bootstrap probability, in outer sampling probability.
For a smooth GMM problem, an iid sample, sample-function estimator, and sample-function weight estimator, data and bootstrap parameter consistency, data and bootstrap weight consistency, and negligible data and bootstrap first-order-condition residuals, the centered feasible-GMM bootstrap estimator has the GMM influence-function linearization in bootstrap probability, in outer sampling probability.
Formal statement
Proof (Lean source)
Main 3 core · 0 supporting This module constructs BootstrapAsymLinear for every nondegenerate continuous linear contrast of a smooth finite-dimensional Z-estimator. ★ zEstimator★ zEstimator_percentileCI_coverage★ zEstimator_basicCI_coverage
Bootstrap validity for smooth finite-dimensional Z-estimators
This module constructs BootstrapAsymLinear for every nondegenerate continuous linear contrast
of a smooth finite-dimensional Z-estimator. It then exposes percentile and basic bootstrap
confidence-interval coverage as direct corollaries of the existing interval API.
For a smooth Z-estimator regularity package, an iid sample, measurable sample-function estimator, and continuous linear contrast, data and bootstrap consistency, a negligible root-sample-size data-score residual, a negligible root-sample-size bootstrap-score residual in conditional probability, in outer sampling probability, and a positive contrast influence variance, the contrasted estimator is bootstrap asymptotically linear with influence -c(J₀⁻¹ psi(theta0,·)).
Formal statement
Proof (Lean source)
For a score, target and population law with smooth Z-estimator regularity, an iid sample, a measurable estimator sequence, a linear contrast, sampling consistency, a negligible root-sample-size sampling-score residual, bootstrap consistency, a negligible root-sample-size bootstrap-score residual in conditional probability, in outer sampling probability, a positive influence variance, and an interior error level, the percentile bootstrap interval for the contrast covers the true contrast with probability tending to one minus that level.
Formal statement
Proof (Lean source)
For a score, target and population law with smooth Z-estimator regularity, an iid sample, a measurable estimator sequence, a linear contrast, sampling consistency, a negligible root-sample-size sampling-score residual, bootstrap consistency, a negligible root-sample-size bootstrap-score residual in conditional probability, in outer sampling probability, a positive influence variance, and an interior error level, the basic bootstrap interval for the contrast covers the true contrast with probability tending to one minus that level.
Formal statement
Proof (Lean source)
OLSConditions 4 core · 4 supporting The generic constructor in SmoothZEstimator.OLS asks the user for two bootstrap-side hypotheses: that the resampled coefficient is consistent, and that it solves its own normal equations, both in conditional probability. ★ olsSampleEstimator_bootstrapSolves★ olsSampleEstimator_bootstrapConsistent★ olsContrast_of_moments★ olsContrast_percentileCI_coverage_of_moments
OLS bootstrap validity from population moments alone
The generic constructor in SmoothZEstimator.OLS asks the user for two bootstrap-side
hypotheses: that the resampled coefficient is consistent, and that it solves its own normal
equations, both in conditional probability. This module discharges them from measurability,
integrability of every augmented regressor/outcome monomial through degree four, and a
positive-definite population Gram matrix, so that bootstrap asymptotic linearity and
percentile-interval coverage follow with no resampling-side assumptions at all.
Two deterministic facts carry the argument: the closed-form coefficient map is continuous wherever the Gram matrix is nonsingular, and on any finite data set with nonsingular Gram matrix the closed-form estimator satisfies the empirical score equation exactly. A bootstrap weak law for the raw moment vector then places the resample inside the neighbourhood where both apply.
Under iid sampling, measurable regressors and outcome, integrable raw OLS moments, and a positive-definite population Gram matrix, the root-sample-size score residual of the resampled OLS estimator is negligible in bootstrap probability, in sampling probability.
Formal statement
Proof (Lean source)
Under iid sampling, measurable regressors and outcome, integrable raw OLS moments, and a positive-definite population Gram matrix, the resampled OLS estimator converges to the population OLS coefficient in bootstrap probability, in sampling probability.
Formal statement
Proof (Lean source)
Under iid sampling, measurable regressors and outcome, integrable raw OLS moments, and a positive-definite population Gram matrix, and for a contrast with positive influence variance, the OLS contrast is bootstrap asymptotically linear.
Formal statement
Proof (Lean source)
Under iid sampling, measurable regressors and outcome, integrable raw OLS moments, and a positive-definite population Gram matrix, for a contrast with positive influence variance, and at an interior nominal error level, the percentile bootstrap interval for the OLS contrast attains limiting coverage one minus that level.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
continuousAt_olsBetaFromMomentstheorem — At a raw-moment vector whose extracted Gram matrix is nonsingular, the closed-form OLS coefficient depends continuously on the raw moments.hypothesesconclusionProof (Lean source)
theorem continuousAt_olsBetaFromMoments (M : OLSMoment K) (hdet : (olsQFromMoments M).det ≠ 0) : ContinuousAt (olsBetaFromMoments : OLSMoment K → EuclideanSpace ℝ K) M := by have hQ : Continuous (fun N : OLSMoment K => olsQFromMoments N) := by unfold olsQFromMoments exact continuous_pi fun i => continuous_pi fun j => continuous_apply _ have hR : Continuous (fun N : OLSMoment K => olsRFromMoments N) := by unfold olsRFromMoments exact continuous_pi fun i => continuous_apply _ have hinv : ContinuousAt (fun N : OLSMoment K => (olsQFromMoments N)⁻¹) M := by apply (continuousAt_matrix_inv (olsQFromMoments M) (NormedRing.inverse_continuousAt (Units.mk0 _ hdet))).comp exact hQ.continuousAt unfold olsBetaFromMoments change ContinuousAt (fun N => toLp 2 ((olsQFromMoments N)⁻¹ *ᵥ olsRFromMoments N)) M have hmul : Continuous (fun p : Matrix K K ℝ × (K → ℝ) => p.1 *ᵥ p.2) := continuous_fst.matrix_mulVec continuous_snd exact (PiLp.continuous_toLp (2 : ENNReal) (fun _ : K => ℝ)).continuousAt.comp (hmul.continuousAt.comp (hinv.prodMk hR.continuousAt)) -
olsSampleEstimator_score_eq_zero_of_det_ne_zerotheorem — For regressors and an outcome, a finite data set, and a nonsingular empirical Gram matrix, the closed-form sample OLS estimator satisfies its empirical score equation exactly — not approximately, and with no probabilistic qualifier.hypothesesX :sharedType u_2K :sharedType u_3x :X → EuclideanSpace ℝ Ky :X → ℝn :ℕdata :Fin n → Xhdet :conclusionProof (Lean source)
theorem olsSampleEstimator_score_eq_zero_of_det_ne_zero (x : X → EuclideanSpace ℝ K) (y : X → ℝ) (n : ℕ) (data : Fin n → X) (hdet : (olsQFromMoments (finMean (fun i ↦ olsRawMoment x y (data i)))).det ≠ 0) : zEstimatorSampleScore (olsScore x y) (olsSampleEstimator x y n data) data = 0 := by let M : OLSMoment K := finMean (fun i ↦ olsRawMoment x y (data i)) have hscore (b : EuclideanSpace ℝ K) : zEstimatorSampleScore (olsScore x y) b data = toLp 2 (olsRFromMoments M - olsQFromMoments M *ᵥ b.ofLp) := by ext i simp only [zEstimatorSampleScore, finMean, PiLp.smul_apply, olsScore, olsResidual, olsRFromMoments, olsQFromMoments, M, mulVec, dotProduct, Pi.sub_apply] simp only [WithLp.ofLp_sum, WithLp.ofLp_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul, olsRawMoment, Fin.prod_univ_four, olsMomentIndex, olsAugmented, mul_one] have hpoint : ∀ t ∈ univ, (y (data t) - ∑ j, x (data t) j * b j) * x (data t) i = x (data t) i * y (data t) - ∑ j, (x (data t) i * x (data t) j) * b j := by intro t _ have hdist : (∑ j, x (data t) j * b j) * x (data t) i = ∑ j, (x (data t) j * b j) * x (data t) i := map_sum (AddMonoidHom.mulRight (x (data t) i)) _ univ rw [sub_mul, hdist] congr 1 · ring · apply Finset.sum_congr rfl intro j _ ring rw [Finset.sum_congr rfl hpoint, Finset.sum_sub_distrib, mul_sub] congr 1 rw [Finset.sum_comm] have hout : (n : ℝ)⁻¹ * ∑ j, ∑ t, (x (data t) i * x (data t) j) * b j = ∑ j, (n : ℝ)⁻¹ * (∑ t, (x (data t) i * x (data t) j) * b j) := map_sum (AddMonoidHom.mulLeft (n : ℝ)⁻¹) _ univ rw [hout] apply Finset.sum_congr rfl intro j _ have hinner : (∑ t, (x (data t) i * x (data t) j) * b j) = (∑ t, x (data t) i * x (data t) j) * b j := (map_sum (AddMonoidHom.mulRight (b j)) _ univ).symm rw [hinner] ring have hu : IsUnit (olsQFromMoments M).det := by apply isUnit_iff_ne_zero.mpr exact hdet have hnormal : olsQFromMoments M *ᵥ (olsSampleEstimator x y n data).ofLp = olsRFromMoments M := by unfold olsSampleEstimator olsBetaFromMoments change olsQFromMoments M *ᵥ ((olsQFromMoments M)⁻¹ *ᵥ olsRFromMoments M) = olsRFromMoments M rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv _ hu, Matrix.one_mulVec] rw [hscore, hnormal, sub_self] rfl -
olsRawMoment_bootstrap_tendstoInProbabilitytheorem — Under iid sampling, measurable regressors and outcome, and integrable raw OLS moments, the raw-moment vector of an Efron resample converges to the population raw-moment vector in bootstrap probability, itself in sampling probability.hypothesesOmega :sharedType u_1X :sharedType u_2K :sharedType u_3S :IIDSample Omega X mu Px :X → EuclideanSpace ℝ Ky :X → ℝhx :hy :hraw :Integrable (olsRawMoment x y) Pepsilon :ℝ0 < epsilondelta :ℝ0 < deltaconclusionTendsto (fun n ↦ mu.real {omega | delta < (bootstrapResample (S.sampleVector n omega)).real {xstar | epsilon < ‖finMean (fun i ↦ olsRawMoment x y (xstar i)) - olsPopulationMoments P x y‖}}) atTop (nhds 0)Proof (Lean source)
theorem olsRawMoment_bootstrap_tendstoInProbability [IsProbabilityMeasure mu] (S : IIDSample Omega X mu P) {x : X → EuclideanSpace ℝ K} {y : X → ℝ} (hx : Measurable x) (hy : Measurable y) (hraw : Integrable (olsRawMoment x y) P) : ∀ epsilon : ℝ, 0 < epsilon → ∀ delta : ℝ, 0 < delta → Tendsto (fun n ↦ mu.real {omega | delta < (bootstrapResample (S.sampleVector n omega)).real {xstar | epsilon < ‖finMean (fun i ↦ olsRawMoment x y (xstar i)) - olsPopulationMoments P x y‖}}) atTop (nhds 0) := by classical intro epsilon hepsilon delta hdelta let e := toEuclidean (E := OLSMoment K) let T := e.toContinuousLinearMap let g : X → EuclideanSpace ℝ (Fin (finrank ℝ (OLSMoment K))) := fun z ↦ e (olsRawMoment x y z) have hg : Measurable g := e.continuous.measurable.comp (measurable_olsRawMoment hx hy) have hg_int : Integrable g P := T.integrable_comp hraw have hint : (∫ z, g z ∂P) = e (olsPopulationMoments P x y) := by simpa [g, T, olsPopulationMoments] using T.integral_comp_comm hraw have hmean (n : ℕ) (xstar : Fin n → X) : finMean (fun i ↦ g (xstar i)) = e (finMean (fun i ↦ olsRawMoment x y (xstar i))) := by simp [g, finMean] let q : ℕ → Omega → ℝ := fun n omega ↦ (bootstrapResample (S.sampleVector n omega)).real {xstar | epsilon < ‖finMean (fun i ↦ olsRawMoment x y (xstar i)) - olsPopulationMoments P x y‖} have hq_meas (n : ℕ) : Measurable (q n) := by let A : Set ((Fin n → X) × (Fin n → X)) := {z | epsilon < ‖finMean (fun i ↦ olsRawMoment x y (z.2 i)) - olsPopulationMoments P x y‖} have hA : MeasurableSet A := by apply measurableSet_lt measurable_const unfold finMean fun_prop have hsamp : Measurable (fun omega ↦ S.sampleVector n omega) := by apply measurable_pi_iff.mpr intro i exact S.meas i change Measurable ((fun data : Fin n → X ↦ (bootstrapResample data).real {xstar | (data, xstar) ∈ A}) ∘ fun omega ↦ S.sampleVector n omega) exact (measurable_bootstrapResample_real_of_measurableSet A hA).comp hsamp have hq_ae : ∀ᵐ omega ∂mu, Tendsto (fun n ↦ q n omega) atTop (nhds 0) := by filter_upwards [bootstrapMeanVec_sub_populationMean_tendsto_zero_ae S g hg hg_int] with omega homega let C : ℝ := max ‖e.symm.toContinuousLinearMap‖ 1 have hC : 0 < C := lt_of_lt_of_le zero_lt_one (le_max_right _ _) let eta := epsilon / C have heta : 0 < eta := div_pos hepsilon hC have hlarge := homega eta heta apply squeeze_zero' · exact Eventually.of_forall fun n ↦ measureReal_nonneg · filter_upwards [eventually_ne_atTop 0] with n hn let _ : IsProbabilityMeasure (bootstrapResample (S.sampleVector n omega)) := bootstrapResample_isProbabilityMeasure _ hn have hsubset : {xstar : Fin n → X | epsilon < ‖finMean (fun i ↦ olsRawMoment x y (xstar i)) - olsPopulationMoments P x y‖} ⊆ {xstar : Fin n → X | eta < ‖finMean (fun i ↦ g (xstar i)) - ∫ z, g z ∂P‖} := by intro xstar hxstar let v := finMean (fun i ↦ olsRawMoment x y (xstar i)) - olsPopulationMoments P x y have hv : ‖v‖ ≤ ‖e v‖ * C := calc ‖v‖ = ‖e.symm (e v)‖ := by rw [e.symm_apply_apply] _ ≤ ‖e.symm.toContinuousLinearMap‖ * ‖e v‖ := e.symm.toContinuousLinearMap.le_opNorm _ _ ≤ C * ‖e v‖ := mul_le_mul_of_nonneg_right (le_max_left _ _) (norm_nonneg _) _ = ‖e v‖ * C := mul_comm _ _ change epsilon < ‖v‖ at hxstar change eta < ‖finMean (fun i ↦ g (xstar i)) - ∫ z, g z ∂P‖ rw [hmean, hint, ← e.map_sub] exact (div_lt_iff₀ hC).2 (hxstar.trans_le hv) exact measureReal_mono hsubset (h₂ := measure_ne_top _ _) · exact hlarge exact measureReal_gt_tendsto_zero_of_ae_tendsto hq_meas hq_ae delta hdelta -
olsSampleEstimator_bootstrapEventuallySolvesExactlytheorem — Under iid sampling, measurable regressors and outcome, integrable raw OLS moments, and a positive-definite population Gram matrix, the resampled OLS estimator eventually solves its own normal equations exactly in bootstrap probability, in sampling probability.hypothesesOmega :sharedType u_1X :sharedType u_2K :sharedType u_3S :IIDSample Omega X mu Px :X → EuclideanSpace ℝ Ky :X → ℝhx :hy :hraw :Integrable (olsRawMoment x y) PconclusionProof (Lean source)
theorem olsSampleEstimator_bootstrapEventuallySolvesExactly [IsProbabilityMeasure mu] (S : IIDSample Omega X mu P) {x : X → EuclideanSpace ℝ K} {y : X → ℝ} (hx : Measurable x) (hy : Measurable y) (hraw : Integrable (olsRawMoment x y) P) (hQ : (olsQ P x y).PosDef) : BootstrapEventuallySolvesEstimatingEquationExactly S (olsScore x y) (olsSampleEstimator x y) := by let M₀ := olsPopulationMoments P x y have hdet : (olsQFromMoments M₀).det ≠ 0 := by have hu : IsUnit (olsQ P x y) := hQ.isUnit have hudet : IsUnit (olsQ P x y).det := (Matrix.isUnit_iff_isUnit_det _).mp hu simpa [M₀, olsQ] using hudet.ne_zero have hdet_cont : Continuous (fun M : OLSMoment K ↦ (olsQFromMoments M).det) := continuous_id.matrix_det.comp (continuous_pi fun i ↦ continuous_pi fun j ↦ continuous_apply _) have hdet_nhds : {M : OLSMoment K | (olsQFromMoments M).det ≠ 0} ∈ nhds M₀ := hdet_cont.continuousAt (isOpen_ne.mem_nhds hdet) obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp hdet_nhds let eta := r / 2 have heta : 0 < eta := half_pos hr unfold BootstrapEventuallySolvesEstimatingEquationExactly intro delta hdelta have htail := olsRawMoment_bootstrap_tendstoInProbability S hx hy hraw eta heta delta hdelta refine squeeze_zero' (Eventually.of_forall fun n ↦ measureReal_nonneg) ?_ htail filter_upwards [eventually_ne_atTop 0] with n hn apply measureReal_mono · intro omega homega let _ : IsProbabilityMeasure (bootstrapResample (S.sampleVector n omega)) := bootstrapResample_isProbabilityMeasure _ hn refine homega.trans_le (measureReal_mono ?_) intro xstar hscore by_contra hnot have hle : ‖finMean (fun i ↦ olsRawMoment x y (xstar i)) - M₀‖ ≤ eta := le_of_not_gt hnot have hlt : dist (finMean (fun i ↦ olsRawMoment x y (xstar i))) M₀ < r := by rw [dist_eq_norm] exact hle.trans_lt (half_lt_self hr) have hdet_star := hball (Metric.mem_ball.mpr hlt) exact hscore (olsSampleEstimator_score_eq_zero_of_det_ne_zero x y n xstar hdet_star) · exact measure_ne_top _ _
SamplingLinearization 1 core · 2 supporting This module records that eventual exact roots imply the standard negligible normalized-score condition, and exposes smooth Z-estimator finite-dimensional vector linearization in convergence-in-probability form under that ★ zEstimator_samplingLinearization
Sampling linearization for smooth Z-estimators
This module records that eventual exact roots imply the standard negligible normalized-score condition, and exposes smooth Z-estimator finite-dimensional vector linearization in convergence-in-probability form under that standard condition.
For a score, target, and population law, a smooth Z-estimator regularity package, an iid sample and sample-function estimator, data consistency, and a negligible root-sample-size estimating-equation residual, the vector sampling linearization remainder converges to zero in probability.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
solvesEstimatingEquationInProbability_of_eventuallyExactlytheorem — For an iid sample, estimating function, and sample-function estimator, if the estimator solves its estimating equation exactly with probability tending to one, then its root-sample-size normalized score is negligible in probability. The claim needs no bound on the score away from the solution event.hypothesesOmega :sharedType u_1X :sharedType u_2E :sharedType u_3S :IIDSample Omega X mu Ppsi :E → X → Eest :(n : ℕ) → (Fin n → X) → EhSolve :conclusionSolvesEstimatingEquationInProbability S psi estProof (Lean source)
theorem solvesEstimatingEquationInProbability_of_eventuallyExactly [IsProbabilityMeasure mu] (S : IIDSample Omega X mu P) (psi : E → X → E) (est : (n : ℕ) → (Fin n → X) → E) (hSolve : EventuallySolvesEstimatingEquationExactly S psi est) : SolvesEstimatingEquationInProbability S psi est := by -- Proof plan: for `n ≠ 0`, a nonzero normalized sum forces the finite score mean to be -- nonzero; at `n = 0` the sum vanishes. Bound every fixed positive tail by the failure event -- in `hSolve`, then unfold `IsLittleOp`. unfold EventuallySolvesEstimatingEquationExactly at hSolve unfold SolvesEstimatingEquationInProbability intro epsilon hepsilon simp only [mul_one] refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hSolve (fun _ ↦ zero_le) (fun n ↦ measure_mono fun omega homega ↦ ?_) simp only [Set.mem_ofPred_eq] at homega ⊢ by_cases hn : n = 0 · subst n simp at homega exfalso exact (not_le_of_gt hepsilon) homega · intro hscore unfold zEstimatorSampleScore finMean at hscore have hfin : (∑ i : Fin n, psi (est n (S.sampleVector n omega)) (S.sampleVector n omega i)) = 0 := (smul_eq_zero.mp hscore).resolve_left (inv_ne_zero (Nat.cast_ne_zero.mpr hn)) change (∑ i : Fin n, psi (est n (S.sampleVector n omega)) (S.Z (i : ℕ) omega)) = 0 at hfin have hsum : (∑ i ∈ range n, psi (est n (S.sampleVector n omega)) (S.Z i omega)) = 0 := by rw [← Fin.sum_univ_eq_sum_range] exact hfin simp [hsum] at homega exact (not_le_of_gt hepsilon) homega -
bootstrapSolvesEstimatingEquationInProbability_of_eventuallyExactlytheorem — For an iid sample, estimating function, and sample-function estimator, if the estimator solves its bootstrap estimating equation exactly with conditional probability tending to one in outer sampling probability, then its root-sample-size bootstrap score residual is negligible in the same nested-probability sense. The claim needs no bound on the score away from the exact-root event.hypothesesOmega :sharedType u_1X :sharedType u_2E :sharedType u_3S :IIDSample Omega X mu Ppsi :E → X → Eest :(n : ℕ) → (Fin n → X) → EhSolve :conclusionProof (Lean source)
theorem bootstrapSolvesEstimatingEquationInProbability_of_eventuallyExactly [IsProbabilityMeasure mu] (S : IIDSample Omega X mu P) (psi : E → X → E) (est : (n : ℕ) → (Fin n → X) → E) (hSolve : BootstrapEventuallySolvesEstimatingEquationExactly S psi est) : BootstrapSolvesEstimatingEquationInProbability S psi est := by unfold BootstrapEventuallySolvesEstimatingEquationExactly at hSolve unfold BootstrapSolvesEstimatingEquationInProbability intro epsilon hepsilon delta hdelta refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hSolve delta hdelta) (fun _ ↦ measureReal_nonneg) (fun n ↦ ?_) by_cases hn : n = 0 · subst n simp [not_lt_of_ge hepsilon.le, not_lt_of_ge hdelta.le] apply measureReal_mono _ (measure_ne_top _ _) intro omega homega simp only [Set.mem_ofPred_eq] at homega ⊢ let _ : IsProbabilityMeasure (bootstrapResample (S.sampleVector n omega)) := bootstrapResample_isProbabilityMeasure _ hn refine homega.trans_le (measureReal_mono ?_ (measure_ne_top _ _)) intro xstar hxstar simp only [Set.mem_ofPred_eq] at hxstar ⊢ intro hzero rw [hzero, smul_zero, norm_zero] at hxstar exact (not_lt_of_ge hepsilon.le) hxstar