PO.ID.Exact.QTE
Quantile treatment effects (Firpo 2007): backdoor identification of the marginal QTE at level τ — the τ-quantile of the treated potential outcome Y(1) minus that of the control Y(0). DistributionalBackdoor lifts the mean-level backdoor to the whole potential-outcome law via inverse-probability weighting; QuantileEffect adds the quantile layer, identifying the QTE as the difference of the identified laws quantiles.
DistributionalBackdoor 5 core · 7 supporting This file lifts backdoor identification from conditional means to full potential-outcome laws under the Firpo distributional bundle: consistency, unconfoundedness, and two-sided common support. ★ integral_comp_YofD_eq★ cfUnderLaw_eq_ipwLaw
Distributional Backdoor Identification
This file lifts backdoor identification from conditional means to full
potential-outcome laws under the Firpo distributional bundle: consistency,
unconfoundedness, and two-sided common support. It defines the observable IPW
density ipwDensity, the observable reweighted outcome law ipwLaw, and the
weaker causal bundle DistributionalAssumptions; Assumptions.toDistributional
projects the ordinary ATE backdoor assumptions to this distributional bundle.
The main technical steps are propScore_pos,
integral_mul_indicator_eq_integral_mul_propScore, ipwDensity_integrable,
and integral_comp_YofD_eq. The theorem cfUnderLaw_eq_ipwLaw identifies the
law of Y(d) with the observable IPW law, providing the distributional input
for quantile-treatment-effect identification.
The inverse-probability weight for a backdoor system targets a selected treatment arm by dividing its observed-arm indicator by that arm's propensity score given covariates.
Definition (Lean source)
The observable IPW outcome law for a backdoor system and a selected treatment arm reweights the sampling measure by the nonnegative inverse-probability weight and then takes the observed-outcome law.
Distributional backdoor assumptions. For a backdoor system, Firpo's distributional identification under its sampling law uses consistency, conditional ignorability of treatment given covariates, and common support for both treatment arms. It does not require the outcome-integrability assumptions bundled in the ATE backdoor theorem, because laws and quantiles are defined without first moments.
Definition (Lean source)
Consistency links the observed outcome to the potential outcome of the realized treatment arm.
Conditional ignorability: treatment is independent of (Y(1), Y(0))
given covariates.
Core distributional backdoor identity. For a backdoor system, under the distributional backdoor assumption bundle, for a selected treatment arm and every measurable real function g that is bounded by a constant C, the mean of g applied to the potential outcome Y(d) equals the mean of g applied to the factual outcome, weighted by the inverse-probability-weighting density ipwDensity d.
Formal statement
Proof (Lean source)
Distributional backdoor identification. Under the distributional backdoor assumption bundle — consistency, unconfoundedness, and common support, a backdoor system, and a selected treatment arm, the law of the potential outcome Y(d) equals the observable inverse-probability-weighted law ipwLaw d.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
toDistributionallemma — The ATE backdoor bundle projects to the weaker distributional bundle.hypothesesconclusionS.DistributionalAssumptions where consistencyProof (Lean source)
lemma Assumptions.toDistributional [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (hA : S.Assumptions) : S.DistributionalAssumptions where consistency := hA.consistency unconfoundedness := hA.unconfoundedness overlap := hA.overlap -
stronglyMeasurable_propScorelemma — The propensity score for a treatment arm is strongly measurable with respect to covariate information, as required for pulling inverse-probability factors through conditional expectations.hypothesesconclusionStronglyMeasurable[S.sigmaX] (S.propScore d)Proof (Lean source)
@[fun_prop] lemma stronglyMeasurable_propScore [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (d : Bool) : StronglyMeasurable[S.sigmaX] (S.propScore d) := S.xVar.stronglyMeasurable_condExpGiven_comap (S.dVar.indicator d) -
measurable_ipwDensitylemma — The observable inverse-probability weight for a treatment arm is measurable, so it defines a valid density for reweighting observed outcomes.hypothesesconclusionMeasurable (S.ipwDensity d)Proof (Lean source)
@[fun_prop] lemma measurable_ipwDensity (d : Bool) : Measurable (S.ipwDensity d) := by unfold POBackdoorSystem.ipwDensity fun_prop -
propScore_nonneglemma — propScore d ≥ 0 a.e. (conditional expectation of a nonnegative function).Proof (Lean source)
lemma propScore_nonneg [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (d : Bool) : 0 ≤ᵐ[P.μ] S.propScore d := condExp_nonneg (Filter.Eventually.of_forall (fun ω => by rcases S.dVar.indicator_eq_one_or_zero d ω with h | h <;> simp [h])) -
propScore_poslemma — Under bare overlap, both arms have a.e.-positive propensity score.hypothesesconclusion∀ᵐ ω ∂P.μ, 0 < S.propScore d ωProof (Lean source)
lemma propScore_pos [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (hA : S.DistributionalAssumptions) (d : Bool) : ∀ᵐ ω ∂P.μ, 0 < S.propScore d ω := by match d with | true => filter_upwards [hA.overlap] with ω hω; exact hω.1 | false => have hindD : ∀ e : Bool, Integrable (S.dVar.indicator e) P.μ := fun e => S.dVar.integrable_indicator e (measurableSet_singleton e) have hsum_pt : (fun ω => S.dVar.indicator true ω + S.dVar.indicator false ω) = (fun _ : P.Ω => (1:ℝ)) := by funext ω; exact S.dVar.indicator_add_indicator_not ω have hsum : P.μ[fun ω => S.dVar.indicator true ω + S.dVar.indicator false ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1:ℝ)) := by rw [hsum_pt] condexp_linearity have hadd : P.μ[fun ω => S.dVar.indicator true ω + S.dVar.indicator false ω | S.sigmaX] =ᵐ[P.μ] P.μ[S.dVar.indicator true | S.sigmaX] + P.μ[S.dVar.indicator false | S.sigmaX] := by condexp_linearity [hindD true, hindD false] filter_upwards [hsum, hadd, hA.overlap] with ω h1 h2 hT have heq : S.propScore true ω + S.propScore false ω = 1 := by have hh : P.μ[S.dVar.indicator true | S.sigmaX] ω + P.μ[S.dVar.indicator false | S.sigmaX] ω = 1 := by rw [← Pi.add_apply, ← h2, h1] unfold POBackdoorSystem.propScore; exact hh linarith [hT.2] -
integral_mul_indicator_eq_integral_mul_propScorelemma — Conditional-expectation pull-out. For a σ(X)-strongly-measurable h, ∫ h·1_{D=d} dμ = ∫ h·e_d dμ.hypothesesγ :sharedType u_1IsFiniteMeasure P.μd :h :P.Ω → ℝhh_sm :StronglyMeasurable[S.sigmaX] hhh_ind_int :Integrable (fun ω => h ω * S.dVar.indicator d ω) P.μconclusion∫ ω, h ω * S.dVar.indicator d ω ∂P.μ = ∫ ω, h ω * S.propScore d ω ∂P.μProof (Lean source)
lemma integral_mul_indicator_eq_integral_mul_propScore [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (d : Bool) {h : P.Ω → ℝ} (hh_sm : StronglyMeasurable[S.sigmaX] h) (hh_ind_int : Integrable (fun ω => h ω * S.dVar.indicator d ω) P.μ) : ∫ ω, h ω * S.dVar.indicator d ω ∂P.μ = ∫ ω, h ω * S.propScore d ω ∂P.μ := by have hsm' : StronglyMeasurable[comap S.xVar.factual inferInstance] h := by fun_prop -- `μ[h·1_{D=d} | σX] =ᵐ h · μ[1_{D=d} | σX] = h · e_d` (pull out the σX-meas factor `h`). have key : (fun ω => S.xVar.condExpGiven (fun ω => h ω * S.dVar.indicator d ω) P.μ ω) =ᵐ[P.μ] (fun ω => h ω * S.propScore d ω) := S.xVar.condExpGiven_mul_of_stronglyMeasurable_left (f := h) (g := S.dVar.indicator d) hsm' hh_ind_int (S.dVar.integrable_indicator d (measurableSet_singleton d)) -- `∫ h·1_{D=d} = ∫ μ[h·1_{D=d}|σX]` then rewrite by `key`. have hint : ∫ ω, h ω * S.dVar.indicator d ω ∂P.μ = ∫ ω, S.xVar.condExpGiven (fun ω => h ω * S.dVar.indicator d ω) P.μ ω ∂P.μ := by unfold POVar.condExpGiven exact (MeasureTheory.integral_condExp S.xVar.comap_factual_le).symm rw [hint] exact MeasureTheory.integral_congr_ae key -
ipwDensity_integrablelemma — Integrability of the IPW weight. For a backdoor system, bare common support makes the inverse-probability weight for either selected treatment arm integrable, even without a uniform propensity lower bound.hypothesesconclusionIntegrable (S.ipwDensity d) P.μProof (Lean source)
@[fun_prop] lemma ipwDensity_integrable [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (hA : S.DistributionalAssumptions) (d : Bool) : Integrable (S.ipwDensity d) P.μ := by have hmeas : Measurable (S.ipwDensity d) := by fun_prop have he_sm : StronglyMeasurable[S.sigmaX] (S.propScore d) := by fun_prop have he_meas : Measurable (S.propScore d) := by fun_prop have he_pos : ∀ᵐ ω ∂P.μ, 0 < S.propScore d ω := S.propScore_pos hA d -- the truncations set f : ℕ → P.Ω → ℝ := S.ipwTrunc d with hf -- `min n (1/e_d)` is σX-strongly-measurable. have hmin_sm : ∀ n : ℕ, StronglyMeasurable[S.sigmaX] (fun ω => min (n : ℝ) (1 / S.propScore d ω)) := by intro n fun_prop -- measurability of each `f n`. have hf_meas : ∀ n, Measurable (f n) := by intro n rw [hf] exact (S.dVar.measurable_indicator d (measurableSet_singleton d)).mul (measurable_const.min (measurable_const.div he_meas)) -- each `f n` is bounded by `n` a.e., hence integrable. have hf_int : ∀ n, Integrable (f n) P.μ := by intro n refine (integrable_const (n : ℝ)).mono' (hf_meas n).aestronglyMeasurable ?_ filter_upwards [he_pos] with ω hω rw [hf] change ‖S.dVar.indicator d ω * min (n : ℝ) (1 / S.propScore d ω)‖ ≤ (n : ℝ) rw [Real.norm_eq_abs, abs_mul] have h1 : |S.dVar.indicator d ω| ≤ 1 := by rcases S.dVar.indicator_eq_one_or_zero d ω with h | h <;> rw [h] <;> simp have hmn : 0 ≤ min (n : ℝ) (1 / S.propScore d ω) := le_min (Nat.cast_nonneg n) (le_of_lt (one_div_pos.mpr hω)) have h2 : |min (n : ℝ) (1 / S.propScore d ω)| ≤ (n : ℝ) := by rw [abs_of_nonneg hmn]; exact min_le_left _ _ calc |S.dVar.indicator d ω| * |min (n : ℝ) (1 / S.propScore d ω)| ≤ 1 * (n : ℝ) := mul_le_mul h1 h2 (abs_nonneg _) zero_le_one _ = (n : ℝ) := one_mul _ -- monotone in `n`. have hf_mono : ∀ᵐ ω ∂P.μ, Monotone fun n => f n ω := by filter_upwards with ω intro a b hab simp only [hf, POBackdoorSystem.ipwTrunc] rcases S.dVar.indicator_eq_one_or_zero d ω with h | h · rw [h] exact mul_le_mul_of_nonneg_left (min_le_min (Nat.cast_le.mpr hab) le_rfl) zero_le_one · rw [h]; simp -- a.e. convergence `f n ω → ipwDensity d ω`. have hf_tend : ∀ᵐ ω ∂P.μ, Tendsto (fun n => f n ω) atTop (nhds (S.ipwDensity d ω)) := by filter_upwards [he_pos] with ω hω have hfω : (fun n => f n ω) = (fun n : ℕ => S.dVar.indicator d ω * min (n : ℝ) (1 / S.propScore d ω)) := rfl have hd : S.ipwDensity d ω = S.dVar.indicator d ω * (1 / S.propScore d ω) := by rw [POBackdoorSystem.ipwDensity, div_eq_mul_one_div] rw [hfω, hd] have hev : (fun n : ℕ => min (n : ℝ) (1 / S.propScore d ω)) =ᶠ[atTop] (fun _ => 1 / S.propScore d ω) := by filter_upwards [(tendsto_natCast_atTop_atTop (R := ℝ)).eventually_ge_atTop (1 / S.propScore d ω)] with n hn exact min_eq_right hn exact (((Filter.tendsto_congr' hev).mpr tendsto_const_nhds).const_mul (S.dVar.indicator d ω)) -- nonnegativity of `f n` and of `ipwDensity d`. have hf_nn : ∀ n, 0 ≤ᵐ[P.μ] f n := by intro n; filter_upwards [he_pos] with ω hω rw [hf] refine mul_nonneg ?_ (le_min (Nat.cast_nonneg n) (le_of_lt (one_div_pos.mpr hω))) rcases S.dVar.indicator_eq_one_or_zero d ω with h | h <;> rw [h]; norm_num have hnn : 0 ≤ᵐ[P.μ] S.ipwDensity d := by filter_upwards [he_pos] with ω hω refine div_nonneg ?_ (le_of_lt hω) rcases S.dVar.indicator_eq_one_or_zero d ω with h | h <;> rw [h]; norm_num -- per-`n` integral bound `∫ f n ≤ 1`, via pull-out and `g n = min n (1/e_d)·e_d ≤ 1`. have hf_bd : ∀ n, ∫ ω, f n ω ∂P.μ ≤ 1 := by intro n have hcomm : (fun ω => f n ω) = (fun ω => min (n : ℝ) (1 / S.propScore d ω) * S.dVar.indicator d ω) := by funext ω; simp only [hf, POBackdoorSystem.ipwTrunc]; ring have hpull := S.integral_mul_indicator_eq_integral_mul_propScore d (hmin_sm n) (by rw [← hcomm]; exact hf_int n) have hg_int : Integrable (fun ω => min (n : ℝ) (1 / S.propScore d ω) * S.propScore d ω) P.μ := by refine (integrable_const (1 : ℝ)).mono' ((measurable_const.min (measurable_const.div he_meas)).mul he_meas).aestronglyMeasurable ?_ filter_upwards [he_pos] with ω hω have h0 : 0 ≤ min (n : ℝ) (1 / S.propScore d ω) * S.propScore d ω := mul_nonneg (le_min (Nat.cast_nonneg n) (le_of_lt (one_div_pos.mpr hω))) (le_of_lt hω) rw [Real.norm_eq_abs, abs_of_nonneg h0] calc min (n : ℝ) (1 / S.propScore d ω) * S.propScore d ω ≤ (1 / S.propScore d ω) * S.propScore d ω := mul_le_mul_of_nonneg_right (min_le_right _ _) (le_of_lt hω) _ = 1 := by field_simp calc ∫ ω, f n ω ∂P.μ = ∫ ω, min (n : ℝ) (1 / S.propScore d ω) * S.dVar.indicator d ω ∂P.μ := by rw [hcomm] _ = ∫ ω, min (n : ℝ) (1 / S.propScore d ω) * S.propScore d ω ∂P.μ := hpull _ ≤ ∫ _ω, (1 : ℝ) ∂P.μ := by refine integral_mono_ae hg_int (integrable_const 1) ?_ filter_upwards [he_pos] with ω hω calc min (n : ℝ) (1 / S.propScore d ω) * S.propScore d ω ≤ (1 / S.propScore d ω) * S.propScore d ω := mul_le_mul_of_nonneg_right (min_le_right _ _) (le_of_lt hω) _ = 1 := by field_simp _ = 1 := by simp -- `HasFiniteIntegral` via the ENNReal lintegral bound `∫⁻ ofReal (ipwDensity) ≤ 1 < ∞`. refine ⟨hmeas.aestronglyMeasurable, ?_⟩ rw [hasFiniteIntegral_iff_ofReal hnn] -- monotone convergence `∫⁻ ofReal (f n) → ∫⁻ ofReal (ipwDensity d)`. have htends : Tendsto (fun n => ∫⁻ ω, ofReal (f n ω) ∂P.μ) atTop (nhds (∫⁻ ω, ofReal (S.ipwDensity d ω) ∂P.μ)) := by refine lintegral_tendsto_of_tendsto_of_monotone (fun n => (ENNReal.measurable_ofReal.comp (hf_meas n)).aemeasurable) ?_ ?_ · filter_upwards [hf_mono] with ω hmono a b hab exact ENNReal.ofReal_le_ofReal (hmono hab) · filter_upwards [hf_tend] with ω htend exact (ENNReal.continuous_ofReal.tendsto _).comp htend -- each `∫⁻ ofReal (f n) = ofReal (∫ f n) ≤ 1`. have hbound : ∀ n, ∫⁻ ω, ofReal (f n ω) ∂P.μ ≤ 1 := by intro n rw [← ofReal_integral_eq_lintegral_ofReal (hf_int n) (hf_nn n)] exact ENNReal.ofReal_le_one.mpr (hf_bd n) exact lt_of_le_of_lt (le_of_tendsto' htends hbound) ENNReal.one_lt_top
QuantileEffect 4 core · 1 supporting This file identifies the totalized generalized-quantile version of the marginal quantile treatment effect. ★ qte_eq_of_law_eq★ qte_backdoor
Quantile Treatment Effect
This file identifies the totalized generalized-quantile version of the
marginal quantile treatment effect. It defines qtdQuantile, the arm-specific
quantile of Y(d), and qte, the difference between the treatment and control
quantiles for any real level τ.
The theorem qte_eq_of_law_eq is the assumption-free functional step: if the
two potential-outcome laws are identified by measures ν₁ and ν₀, then QTE
is the difference of their quantiles. The theorem qte_backdoor supplies the
causal backdoor corollary by using cfUnderLaw_eq_ipwLaw from
DistributionalBackdoor to identify those two laws with observable IPW laws.
The arm-specific potential-outcome quantile for a backdoor system takes the generalized quantile at the selected level of the outcome under the selected treatment arm, evaluated under the chosen population law, thereby turning an identified counterfactual law into an arm-level distributional estimand.
Definition (Lean source)
The totalized quantile treatment effect for a backdoor system compares outcomes under a chosen population law at a real quantile level by subtracting the control potential-outcome quantile from the treated potential-outcome quantile; interior levels recover the usual econometric QTE.
Definition (Lean source)
QTE as a functional of the identified potential-outcome laws. If the law of the potential outcome Y(1) equals a given observable measure ν₁ and the law of the potential outcome Y(0) equals a given observable measure ν₀, then for the chosen backdoor system and population law and every real quantile level, the totalized quantile treatment effect equals the difference of the τ-quantiles of ν₁ and ν₀. This is the payoff of the quantile layer: identification of the QTE reduces to distributional identification of the two potential-outcome laws.
Formal statement
Proof (Lean source)
Backdoor QTE identification. Under the ATE backdoor identifying assumption bundle for a backdoor system, at any selected real quantile level, the totalized generalized-quantile treatment effect equals the difference of the quantiles of the two observable inverse-probability-weighted outcome laws:
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
qtdQuantile_eq_quantile_cfUnderLawlemma — The quantile of Y(d) is the quantile of the law of Y(d).hypothesesconclusionS.qtdQuantile d μ τ = quantile (S.yVar.cfUnderLaw S.dVar d μ) τProof (Lean source)
lemma qtdQuantile_eq_quantile_cfUnderLaw (d : Bool) (μ : Measure P.Ω) (τ : ℝ) : S.qtdQuantile d μ τ = quantile (S.yVar.cfUnderLaw S.dVar d μ) τ := rfl