Experimentation.Two­Stage­Interference.Asymptotic

Asymptotic theory for two-stage interference experiments: setup, consistency, CLT discharge, studentized direct effects, and Wald intervals.

Setup 7 core · 0 supporting LHExperiment packages one Hudgens-Halloran two-stage experiment for Liu-Hudgens large-sample inference on the treatment-minus-control direct-effect contrast. ★ LHExperiment★ E_estD★ var_estD

Liu-Hudgens asymptotic setup

LHExperiment packages one Hudgens-Halloran two-stage experiment for Liu-Hudgens large-sample inference on the treatment-minus-control direct-effect contrast.

The structure carries the group population, group sizes, stage-1 strategy design, within-group strategies ψ and φ, partial-interference potential outcomes, fixed treated/control counts, the number C of ψ-selected groups, and the known design propensities needed by the finite-sample unbiasedness and variance theorems. Its namespace defines the joint two-stage design jointD, the Horvitz-Thompson direct-effect estimator estD, the estimand DEbar, and the closed-form variance directVar.

The main theorems are the reusable bridges E_estD and var_estD: they specialize the finite-sample Hudgens-Halloran unbiasedness and variance results to each packaged experiment, so later consistency, CLT, and Wald arguments can reason through LHExperiment alone.

structure LHExperiment reviewed
Causalean.Experimentation.TwoStageInterference

A single Liu–Hudgens (2014) two-stage experiment, packaged so that a sequence of them can be studied for large-sample inference. Carries a finite population of groups with per-group sizes, a stage-1 design assigning each group a strategy, the per-group allocation strategies ψ and φ, partial-interference potential outcomes, and design-fixed control and treatment unit counts per group, together with the regularity conditions that the number C of ψ-selected groups is nonzero, every group has nonzero control and treatment counts and nonzero size, the population has at least one group and at least two groups, every unit's within-group control propensity equals m0 i / nᵢ and its treatment propensity equals m1 i / nᵢ, every group's stage-1 selection propensity equals C/N, and every pair's joint selection propensity equals C(C−1)/(N(N−1)) — exactly the hypothesis lists of E_estDirect and Var_estDirect.

Definition (Lean source)
Finite population of groups.
ι :
Size of each group.
gsize :
ι → ℕ
Stage-1 strategy-assignment design (which groups receive ψ vs. φ).
Per-group treatment-allocation strategy ψ (the strategy of interest).
ψ :
∀ i, FiniteDesign (Fin (gsize i) → Bool)
Per-group treatment-allocation strategy φ (the comparison strategy).
φ :
∀ i, FiniteDesign (Fin (gsize i) → Bool)
Partial-interference potential outcomes: `Y i j w` is unit `(i,j)`'s outcome under the within-group assignment `w` of group `i`.
Y :
∀ i
if
Fin (gsize i)
and
(Fin (gsize i) → Bool)
then
Design-fixed number of control units per group.
m0 :
ι → ℝ
Design-fixed number of treated units per group.
m1 :
ι → ℝ
Number of groups selected for strategy ψ at stage 1.
C :
Carried regularity (exactly the `E_estDirect` / `Var_estDirect` hypotheses): The ψ-selection count is nonzero.
hC :
C ≠ 0
Each group has a nonzero control count.
hm0 :
∀ i, m0 i ≠ 0
Each group has a nonzero treated count.
hm1 :
∀ i, m1 i ≠ 0
Each group is nonempty.
hn :
∀ i, (gsize i : ℝ) ≠ 0
There is at least one group.
hN :
(Fintype.card ι : ℝ) ≠ 0
There are at least two groups (needed for the pair propensity).
hN1 :
(Fintype.card ι : ℝ) - 1 ≠ 0
Within-group control propensity of every unit is `m0 i / nᵢ`.
hprop0 :
∀ i, ∀ j : Fin (gsize i), (ψ i).Pr (fun w => w j = false) = m0 i / (gsize i)
Within-group treatment propensity of every unit is `m1 i / nᵢ`.
hprop1 :
∀ i, ∀ j : Fin (gsize i), (ψ i).Pr (fun w => w j = true) = m1 i / (gsize i)
Stage-1 first-order selection propensity of every group is `C/N`.
hstage1 :
∀ i, D₁.Pr (fun s => s i = true) = C / (Fintype.card ι : ℝ)
Stage-1 second-order (pair) selection propensity is `C(C−1)/(N(N−1))`.
hstage1pair :
∀ i j
if
i ≠ j
then
D₁.E (fun s => FiniteDesign.ind (fun s => s i = true) s * FiniteDesign.ind (fun s => s j = true) s)
= (C * (C - 1)) / ((Fintype.card ι : ℝ) * ((Fintype.card ι : ℝ) - 1))
Causalean.Experimentation.TwoStageInterference.LHExperiment · Causalean/Experimentation/TwoStageInterference/Asymptotic/Setup.lean:52
def jointD reviewed
Causalean.Experimentation.TwoStageInterference.LHExperiment

The joint two-stage design of the experiment.

Definition (Lean source)
noncomputable def jointD : FiniteDesign (StratAssign E.ι × ∀ i, Fin (E.gsize i) → Bool) := jointDesign E.D₁ E.ψ E.φ
Causalean.Experimentation.TwoStageInterference.LHExperiment.jointD · Causalean/Experimentation/TwoStageInterference/Asymptotic/Setup.lean:118 · uses FiniteDesign , LHExperiment , StratAssign
def estD reviewed
Causalean.Experimentation.TwoStageInterference.LHExperiment

The Horvitz-Thompson estimator of the experiment's treatment-minus-control direct-effect contrast.

Definition (Lean source)
noncomputable def estD : (StratAssign E.ι × ∀ i, Fin (E.gsize i) → Bool) → ℝ := estDirect E.Y E.m0 E.m1 E.C
Causalean.Experimentation.TwoStageInterference.LHExperiment.estD · Causalean/Experimentation/TwoStageInterference/Asymptotic/Setup.lean:122 · uses LHExperiment , StratAssign
def DEbar reviewed
Causalean.Experimentation.TwoStageInterference.LHExperiment

The population average treatment-minus-control direct-effect contrast: the treatment mean under ψ minus the control mean under ψ.

Definition (Lean source)
noncomputable def DEbar : ℝ := CE_direct E.ψ E.Y
Causalean.Experimentation.TwoStageInterference.LHExperiment.DEbar · Causalean/Experimentation/TwoStageInterference/Asymptotic/Setup.lean:127 · uses LHExperiment
def directVar reviewed
Causalean.Experimentation.TwoStageInterference.LHExperiment

The closed-form two-stage design variance of the treatment-minus-control direct-effect contrast estimator (Theorem 6): a between-group SRS term over the group-level contrasts plus a within-group term averaging the per-group contrast-estimator variances.

Definition (Lean source)
noncomputable def directVar : ℝ := (1 - E.C / (Fintype.card E.ι : ℝ)) / E.C * SmuVar (fun i => groupMean E.ψ E.Y i true - groupMean E.ψ E.Y i false) + (1 / (E.C * (Fintype.card E.ι : ℝ))) * ∑ i, (E.ψ i).Var (fun w => groupEst E.Y i true (E.m1 i) w - groupEst E.Y i false (E.m0 i) w)
Causalean.Experimentation.TwoStageInterference.LHExperiment.directVar · Causalean/Experimentation/TwoStageInterference/Asymptotic/Setup.lean:131 · uses LHExperiment
theorem E_estD reviewed
Causalean.Experimentation.TwoStageInterference.LHExperiment

Unbiasedness bridge. The Horvitz–Thompson estimator is unbiased for the population average treatment-minus-control direct-effect contrast.

Formal statement
E.jointD.E E.estD = E.DEbar
Proof (Lean source)
theorem E_estD : E.jointD.E E.estD = E.DEbar := E_estDirect E.D₁ E.ψ E.φ E.Y E.m0 E.m1 E.C E.hC E.hm0 E.hm1 E.hn E.hprop0 E.hprop1 E.hstage1
theorem var_estD reviewed
Causalean.Experimentation.TwoStageInterference.LHExperiment

Variance bridge. The design variance of the treatment-minus-control direct-effect contrast estimator equals the closed-form two-stage variance directVar.

Formal statement
E.jointD.Var E.estD = E.directVar
Proof (Lean source)
theorem var_estD : E.jointD.Var E.estD = E.directVar := Var_estDirect E.D₁ E.ψ E.φ E.Y E.m0 E.m1 E.C E.hC E.hN E.hN1 E.hm0 E.hm1 E.hn E.hprop0 E.hprop1 E.hstage1 E.hstage1pair
CLTDischarge 8 core · 8 supporting This file provides the primitive ingredients that remove the conditional-CLT premise from the Liu-Hudgens Proposition 5.1 argument under homogeneity. ★ DEbar_eq_of_homogeneous★ directVar_eq_of_homogeneous★ stud_eq_sum_of_homogeneous

Primitive ingredients for the Liu-Hudgens homogeneous CLT discharge

This file provides the primitive ingredients that remove the conditional-CLT premise from the Liu-Hudgens Proposition 5.1 argument under homogeneity.

It defines the per-group contrast estimator groupDiff, the conditional product design condDesign, and the homogeneity/regularity bundle Homogeneous. The main reductions show that homogeneity collapses the estimand to the common contrast (DEbar_eq_of_homogeneous), collapses the two-stage variance to v / C (directVar_eq_of_homogeneous), and rewrites the studentized statistic as a normalized sum of independent per-coordinate summands (stud_eq_sum_of_homogeneous).

The support-restricted averaging lemma FiniteDesign.tendsto_E_of_uniformBound_ae and the reference-selection lemmas refSel, refSel_mem, and nonempty_of_refSel are used by CLTDischargeMain.lean to prove directEffect_clt_homogeneous without taking a conditional CLT as a black box.

def groupDiff reviewed
Causalean.Experimentation.TwoStageInterference

This is the per-group estimator for the treatment-minus-control direct-effect contrast in one group of a Liu-Hudgens experiment.

Definition (Lean source)
noncomputable def groupDiff (E : LHExperiment) (i : E.ι) (w : Fin (E.gsize i) → Bool) : ℝ := groupEst E.Y i true (E.m1 i) w - groupEst E.Y i false (E.m0 i) w
Causalean.Experimentation.TwoStageInterference.groupDiff · Causalean/Experimentation/TwoStageInterference/Asymptotic/CLTDischarge.lean:117 · uses LHExperiment
def condDesign reviewed
Causalean.Experimentation.TwoStageInterference

This is the stage-two product design conditional on a stage-one strategy assignment.

Definition (Lean source)
noncomputable def condDesign (E : LHExperiment) (s : StratAssign E.ι) : FiniteDesign (∀ i, Fin (E.gsize i) → Bool) := prodDesign (fun i => if s i then E.ψ i else E.φ i)
structure Homogeneous reviewed
Causalean.Experimentation.TwoStageInterference

Homogeneity and regularity bundle for a sequence of Liu–Hudgens experiments. Faithfully encodes the hypotheses of Proposition 5.1 for the Hudgens-Halloran orientation: the studentized statistic is the standardized contrast estimator; every group-level direct-effect contrast equals a common value δ (homogeneity); every within-group contrast-estimator variance equals a common value v(n) that is positive; the centered per-group contrast estimator is uniformly bounded; every stage-1 selection supported by the design flags exactly C groups; the resulting rate sequence tends to zero together with its cubed Lyapunov rate (the many-groups asymptotic regime); and the conditional distribution of the studentized statistic does not depend on which stage-1 selection occurred, the analytic form of homogeneity that lifts the conditional CLT to the average.

Definition (Lean source)
Exp :
ℕ → LHExperiment
t :
stud :
∀ n
if
(StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool)
then
δ M :
v :
ℕ → ℝ
The studentized statistic is `(estD − DEbar)/√directVar`.
hstud :
∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / sqrt ((Exp n).directVar)
All group-level treatment-minus-control direct-effect contrasts equal the common value `δ` (homogeneity).
:
∀ n i, groupMean (Exp n).ψ (Exp n).Y i true - groupMean (Exp n).ψ (Exp n).Y i false = δ
All within-group contrast-estimator variances equal the common value `v n`.
hv :
∀ n i, ((Exp n).ψ i).Var (groupDiff (Exp n) i) = v n
The common within-group variance is positive.
hvpos :
∀ n, 0 < v n
The centered per-group contrast estimator is bounded by `M`.
hMbound :
∀ n i w, |groupDiff (Exp n) i w - δ| ≤ M
Every supported stage-1 selection flags exactly `C` groups.
hcount :
∀ n s
if
(Exp n).D₁.p s ≠ 0
then
(∑ i, if s i then (1 : ℝ) else 0) = (Exp n).C
The many-groups rate: `B n := M / √(C n · v n) → 0`.
hB0 :
Tendsto (fun n => M / sqrt ((Exp n).C * v n)) atTop (𝓝 0)
The Lyapunov rate: `card · B³ → 0`.
hNB3 :
Tendsto (fun n => (card (Exp n).ι : ℝ) * (M / sqrt ((Exp n).C * v n)) ^ 3) atTop (𝓝 0)
The conditional studentized CDF is selection-independent over the stage-1 support.
hhom :
∀ n s s'
if
(Exp n).D₁.p s ≠ 0
and
(Exp n).D₁.p s' ≠ 0
then
(condDesign (Exp n) s).Pr (fun w => stud n (s, w) ≤ t)
= (condDesign (Exp n) s').Pr (fun w => stud n (s', w) ≤ t)
lemma DEbar_eq_of_homogeneous reviewed
Causalean.Experimentation.TwoStageInterference

Estimand reduction. Under the homogeneity and regularity bundle, the population average treatment-minus-control direct-effect contrast collapses to the common group-level contrast δ.

Formal statement
h :
Homogeneous Exp t stud δ M v
n :
(Exp n).DEbar = δ
Proof (Lean source)
lemma DEbar_eq_of_homogeneous (h : Homogeneous Exp t stud δ M v) (n : ℕ) : (Exp n).DEbar = δ := by simp only [LHExperiment.DEbar, CE_direct, popMean, ← sub_div, ← Finset.sum_sub_distrib] rw [Finset.sum_congr rfl (fun i _ => h.hδ n i), Finset.sum_const, Finset.card_univ, nsmul_eq_mul] rw [mul_comm, mul_div_assoc, div_self (Exp n).hN, mul_one]
lemma directVar_eq_of_homogeneous reviewed
Causalean.Experimentation.TwoStageInterference

Variance reduction. Under the homogeneity and regularity bundle, the two-stage design variance of the direct-effect contrast collapses to v n / C: the between-group term vanishes since the population variance of a constant is zero, and the within-group term averages to v n / C.

Formal statement
h :
Homogeneous Exp t stud δ M v
n :
(Exp n).directVar = v n / (Exp n).C
Proof (Lean source)
lemma directVar_eq_of_homogeneous (h : Homogeneous Exp t stud δ M v) (n : ℕ) : (Exp n).directVar = v n / (Exp n).C := by have hSmu : SmuVar (fun i => groupMean (Exp n).ψ (Exp n).Y i true - groupMean (Exp n).ψ (Exp n).Y i false) = 0 := by simp only [SmuVar] have hmubar : (∑ i, (groupMean (Exp n).ψ (Exp n).Y i true - groupMean (Exp n).ψ (Exp n).Y i false)) / (card (Exp n).ι : ℝ) = δ := by rw [Finset.sum_congr rfl (fun i _ => h.hδ n i), Finset.sum_const, Finset.card_univ, nsmul_eq_mul, mul_comm, mul_div_assoc, div_self (Exp n).hN, mul_one] rw [hmubar] rw [Finset.sum_congr rfl (fun i _ => by rw [h.hδ n i, sub_self]; ring : ∀ i ∈ univ, (groupMean (Exp n).ψ (Exp n).Y i true - groupMean (Exp n).ψ (Exp n).Y i false - δ) ^ 2 = 0)] simp have hwithin : ∑ i, ((Exp n).ψ i).Var (fun w => groupEst (Exp n).Y i true ((Exp n).m1 i) w - groupEst (Exp n).Y i false ((Exp n).m0 i) w) = (card (Exp n).ι : ℝ) * v n := by rw [show (∑ i, ((Exp n).ψ i).Var (fun w => groupEst (Exp n).Y i true ((Exp n).m1 i) w - groupEst (Exp n).Y i false ((Exp n).m0 i) w)) = ∑ i, ((Exp n).ψ i).Var (groupDiff (Exp n) i) from rfl, Finset.sum_congr rfl (fun i _ => h.hv n i), Finset.sum_const, Finset.card_univ, nsmul_eq_mul] simp only [LHExperiment.directVar] rw [hSmu, hwithin] have hC := (Exp n).hC have hN := (Exp n).hN field_simp ring
Causalean.Experimentation.TwoStageInterference.directVar_eq_of_homogeneous · Causalean/Experimentation/TwoStageInterference/Asymptotic/CLTDischarge.lean:200 · uses Homogeneous , LHExperiment , directVar , StratAssign
def cltSummand reviewed
Causalean.Experimentation.TwoStageInterference

This is the mean-zero scaled per-coordinate summand of the conditional studentized statistic under homogeneity.

Definition (Lean source)
noncomputable def cltSummand (n : ℕ) (δ : ℝ) (v : ℕ → ℝ) (s : StratAssign (Exp n).ι) (i : (Exp n).ι) (a : Fin ((Exp n).gsize i) → Bool) : ℝ := (if s i then (1 : ℝ) else 0) * (groupDiff (Exp n) i a - δ) / sqrt ((Exp n).C * v n)
lemma stud_eq_sum_of_homogeneous reviewed
Causalean.Experimentation.TwoStageInterference

Studentized = independent sum. For a stage-1 stratified assignment s that the design supports with positive probability, then, under homogeneity, for every within-group assignment pattern w, the conditional studentized statistic decomposes as the normalized independent sum stud(s,w) = ∑ᵢ cltSummand n δ v s i (w i).

Formal statement
h :
Homogeneous Exp t stud δ M v
n :
s :
StratAssign (Exp n).ι
hs :
(Exp n).D₁.p s ≠ 0
w :
∀ i
if
Fin ((Exp n).gsize i)
then
stud n (s, w) = ∑ i, cltSummand n δ v s i (w i)
Proof (Lean source)
lemma stud_eq_sum_of_homogeneous (h : Homogeneous Exp t stud δ M v) (n : ℕ) (s : StratAssign (Exp n).ι) (hs : (Exp n).D₁.p s ≠ 0) (w : ∀ i, Fin ((Exp n).gsize i) → Bool) : stud n (s, w) = ∑ i, cltSummand n δ v s i (w i) := by have hCpos : 0 < (Exp n).C := by rcases lt_or_gt_of_ne (Exp n).hC with h0 | h0 · -- if C < 0, contradiction with hcount (sum of indicators ≥ 0) exfalso have hnn : (0 : ℝ) ≤ ∑ i, if s i then (1 : ℝ) else 0 := sum_nonneg (fun i _ => by positivity) rw [h.hcount n s hs] at hnn linarith · exact h0 have hvpos := h.hvpos n have hcount := h.hcount n s hs -- `√(C·v) > 0` and `C·√(v/C) = √(C·v)`. have hCv : (0 : ℝ) < (Exp n).C * v n := mul_pos hCpos hvpos have hsqrtCv : 0 < sqrt ((Exp n).C * v n) := Real.sqrt_pos.mpr hCv have hsqrtvC : 0 < sqrt (v n / (Exp n).C) := Real.sqrt_pos.mpr (div_pos hvpos hCpos) have hkey : (Exp n).C * sqrt (v n / (Exp n).C) = sqrt ((Exp n).C * v n) := by rw [show (Exp n).C * v n = (Exp n).C ^ 2 * (v n / (Exp n).C) by field_simp, Real.sqrt_mul (by positivity), Real.sqrt_sq hCpos.le] rw [h.hstud, estD_eq_agg, DEbar_eq_of_homogeneous h, directVar_eq_of_homogeneous h] -- Recenter: `(∑ 1(sᵢ)·dᵢ)/C − δ = (∑ 1(sᵢ)·(dᵢ−δ))/C` using `∑ 1(sᵢ) = C`. have hrecenter : (∑ i, (if s i then (1 : ℝ) else 0) * groupDiff (Exp n) i (w i)) / (Exp n).C - δ = (∑ i, (if s i then (1 : ℝ) else 0) * (groupDiff (Exp n) i (w i) - δ)) / (Exp n).C := by rw [Finset.sum_congr rfl (fun i _ => mul_sub _ _ _ : ∀ i ∈ univ, (if s i then (1:ℝ) else 0) * (groupDiff (Exp n) i (w i) - δ) = (if s i then (1:ℝ) else 0) * groupDiff (Exp n) i (w i) - (if s i then (1:ℝ) else 0) * δ), Finset.sum_sub_distrib, ← Finset.sum_mul, hcount, sub_div, mul_div_cancel_left₀ _ (ne_of_gt hCpos)] rw [hrecenter] -- Distribute the scalar `1/(C·√(v/C)) = 1/√(C·v)` into the sum. simp only [cltSummand] rw [div_div, hkey, Finset.sum_div]
def refSel reviewed
Causalean.Experimentation.TwoStageInterference

A fixed reference selection in the support of stage 1.

Definition (Lean source)
noncomputable def refSel (Exp : ℕ → LHExperiment) (n : ℕ) : StratAssign (Exp n).ι := (exists_support_selection (Exp n)).choose
8 supporting declarations (lemmas, instances)
CLT 1 core · 2 supporting The unconditional CLT for the treatment-minus-control direct-effect contrast is obtained by averaging uniformly convergent conditional laws across the first-stage strategy assignment. ★ directEffect_clt

Direct-contrast central limit theorem

The unconditional CLT for the treatment-minus-control direct-effect contrast is obtained by averaging uniformly convergent conditional laws across the first-stage strategy assignment.

The design-level lemmas are FiniteDesign.tendsto_E_of_uniformBound, which says expectations preserve a uniform limit over finite assignment spaces, and FiniteDesign.Pr_compound_eq_E_condPr, the tower bridge rewriting a compound-design probability as the stage-1 average of stage-2 conditional probabilities.

The headline theorem directEffect_clt proves Liu-Hudgens Proposition 5.1 conditional on the uniform conditional studentized CDF hypothesis hcond: the joint-design CDF of the studentized direct-effect contrast converges to stdNormalCdf t.

theorem directEffect_clt reviewed
Causalean.Experimentation.TwoStageInterference

Proposition 5.1 (Liu–Hudgens 2014), asymptotic normality of the treatment-minus-control direct-effect contrast — conditional on the uniform conditional CLT. Along a sequence of two-stage Hudgens–Halloran experiments Exp : ℕ → LHExperiment, let stud n be the studentized statistic (D̂E − DE̅)/√directVar for the treatment-minus-control direct-effect contrast and cond n s the within-selection (stage-2 product) design when stage 1 selects the strategy assignment s. Assume the conditional studentized CDFs at t converge to the standard normal CDF Φ(t) uniformly over selections s, with a vanishing uniform bound. Then the unconditional (joint-design) studentized CDF at t converges to Φ(t):

Formal statement
Exp :
ℕ → LHExperiment
t :
stud :
∀ n
if
(StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool)
then
_hstud :
∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / sqrt ((Exp n).directVar)
cond :
∀ n
if
StratAssign (Exp n).ι
then
FiniteDesign (∀ i, Fin ((Exp n).gsize i) → Bool)
hcondDef :
∀ n s, cond n s = prodDesign (fun i => if s i then (Exp n).ψ i else (Exp n).φ i)
hcond :
∃ B,
Tendsto B atTop (𝓝 0) ∧
∀ n s, |(cond n s).Pr (fun w => stud n (s, w) ≤ t) - stdNormalCdf t| ≤ B n
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ t)) atTop (𝓝 (stdNormalCdf t))
Proof (Lean source)
theorem directEffect_clt (Exp : ℕ → LHExperiment) (t : ℝ) (stud : ∀ n, (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → ℝ) (_hstud : ∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / sqrt ((Exp n).directVar)) (cond : ∀ n, StratAssign (Exp n).ι → FiniteDesign (∀ i, Fin ((Exp n).gsize i) → Bool)) (hcondDef : ∀ n s, cond n s = prodDesign (fun i => if s i then (Exp n).ψ i else (Exp n).φ i)) (hcond : ∃ B, Tendsto B atTop (𝓝 0) ∧ ∀ n s, |(cond n s).Pr (fun w => stud n (s, w) ≤ t) - stdNormalCdf t| ≤ B n) : Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ t)) atTop (𝓝 (stdNormalCdf t)) := by obtain ⟨B, hB, hbound⟩ := hcond -- Rewrite each unconditional CDF as the stage-1 average of conditional CDFs. have hrw : ∀ n, (Exp n).jointD.Pr (fun sw => stud n sw ≤ t) = (Exp n).D₁.E (fun s => (cond n s).Pr (fun w => stud n (s, w) ≤ t)) := by intro n rw [LHExperiment.jointD, jointDesign, FiniteDesign.Pr_compound_eq_E_condPr] apply (Exp n).D₁.E_congr intro s rw [hcondDef n s] simp_rw [hrw] -- Apply the mixture-lifting lemma with `F n s := (cond n s).Pr (…)`, `L := Φ(t)`, bound `B`. exact FiniteDesign.tendsto_E_of_uniformBound (fun n => (Exp n).D₁) (fun n s => (cond n s).Pr (fun w => stud n (s, w) ≤ t)) (stdNormalCdf t) B hbound hB
2 supporting declarations (lemmas, instances)
  • tendsto_E_of_uniformBound theorem — Mixture-lifting lemma. If a sequence of design random variables F n : Ω n → ℝ converges to a constant L *uniformly* over the assignment space — |F n s − L| ≤ B n for every s, with B n → 0 — then their expectations converge to L: (D n).E (F n) → L. Averaging a uniformly convergent family preserves the limit, since the expectation of a B n-bounded deviation is itself B n-bounded. This is the abstract content of the two-stage mixture-lifting argument: the joint law is the stage-1 average of conditional laws, and a uniform conditional limit lifts to the average.
    Ω :
    ℕ → Type*
    ∀ n, Fintype (Ω n)
    D :
    ∀ n, FiniteDesign (Ω n)
    F :
    ∀ n
    if
    Ω n
    then
    L :
    B :
    ℕ → ℝ
    hbound :
    ∀ n s, |F n s - L| ≤ B n
    hB :
    Tendsto B atTop (𝓝 0)
    Tendsto (fun n => (D n).E (F n)) atTop (𝓝 L)
    Proof (Lean source)
    theorem tendsto_E_of_uniformBound {Ω : ℕ → Type*} [∀ n, Fintype (Ω n)] (D : ∀ n, FiniteDesign (Ω n)) (F : ∀ n, Ω n → ℝ) (L : ℝ) (B : ℕ → ℝ) (hbound : ∀ n s, |F n s - L| ≤ B n) (hB : Tendsto B atTop (𝓝 0)) : Tendsto (fun n => (D n).E (F n)) atTop (𝓝 L) := by -- It suffices that `|(D n).E (F n) − L| → 0`. rw [tendsto_iff_norm_sub_tendsto_zero] -- Squeeze `‖(D n).E (F n) − L‖` between `0` and `B n → 0`. refine squeeze_zero (fun n => norm_nonneg _) (fun n => ?_) hB -- `(D n).E (F n) − L = (D n).E (fun s => F n s − L)` by linearity (`E_sub` + `E_const`). have hrecenter : (D n).E (F n) - L = (D n).E (fun s => F n s - L) := by rw [(D n).E_sub (F n) (fun _ => L), (D n).E_const] -- `|(D n).E (fun s => F n s − L)| ≤ B n` by the pointwise bound `hbound`. rw [Real.norm_eq_abs, hrecenter] exact (D n).abs_E_le (fun s => hbound n s)
    Causalean.Experimentation.DesignBased.FiniteDesign.tendsto_E_of_uniformBound · Causalean/Experimentation/TwoStageInterference/Asymptotic/CLT.lean:63
  • Pr_compound_eq_E_condPr lemma — Tower bridge for probabilities. Under the two-stage compound design, the unconditional probability of an event P equals the stage-1 expectation of its stage-2 conditional probability:
    Ω₁ ι :
    Type*
    Fintype Ω₁
    ι → Type*
    ∀ i, Fintype (α i)
    D₁ :
    D₂ :
    Ω₁ → ∀ i, FiniteDesign (α i)
    P :
    (Ω₁ × ∀ i, α i) → Prop
    (compound D₁ D₂).Pr P = D₁.E (fun s => (prodDesign (D₂ s)).Pr (fun w => P (s, w)))
    Proof (Lean source)
    lemma Pr_compound_eq_E_condPr {Ω₁ ι : Type*} [Fintype Ω₁] [Fintype ι] [DecidableEq ι] {α : ι → Type*} [∀ i, Fintype (α i)] (D₁ : FiniteDesign Ω₁) (D₂ : Ω₁ → ∀ i, FiniteDesign (α i)) (P : (Ω₁ × ∀ i, α i) → Prop) [DecidablePred P] : (compound D₁ D₂).Pr P = D₁.E (fun s => (prodDesign (D₂ s)).Pr (fun w => P (s, w))) := by -- `Pr P = E (ind P)`, then push `E` through the tower. rw [FiniteDesign.Pr, E_compound_tower] -- The inner stage-2 expectation of `ind P (s, ·)` is exactly the conditional probability. apply D₁.E_congr intro s rw [FiniteDesign.Pr] -- `ind P (s, w) = ind (fun w => P (s, w)) w` definitionally (both `if … then 1 else 0`). apply (prodDesign (D₂ s)).E_congr intro w rfl
    Causalean.Experimentation.DesignBased.FiniteDesign.Pr_compound_eq_E_condPr · Causalean/Experimentation/TwoStageInterference/Asymptotic/CLT.lean:85
CLTDischarge­Main 1 core · 1 supporting The primitive Liu-Hudgens treatment-minus-control direct-effect CLT follows from the independent-summands product-design CLT. ★ directEffect_clt_homogeneous

Primitive direct-contrast CLT

The primitive Liu-Hudgens treatment-minus-control direct-effect CLT follows from the independent-summands product-design CLT.

The lemma condCLT_ref applies prodDesign_clt to the homogeneity-reduced per-coordinate summands at the reference first-stage selection. The theorem directEffect_clt_homogeneous then uses selection homogeneity and the support-restricted mixture-lifting lemma to prove that the joint studentized direct-effect CDF converges to stdNormalCdf t.

theorem directEffect_clt_homogeneous reviewed
Causalean.Experimentation.TwoStageInterference

Proposition 5.1 (Liu–Hudgens 2014), fully primitive. Under the homogeneity and regularity bundle, the studentized treatment-minus-control direct-effect contrast is asymptotically standard normal: its joint-design CDF at t converges to Φ(t).

Formal statement
h :
Homogeneous Exp t stud δ M v
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ t)) atTop (𝓝 (stdNormalCdf t))
Proof (Lean source)
theorem directEffect_clt_homogeneous (h : Homogeneous Exp t stud δ M v) : Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ t)) atTop (𝓝 (stdNormalCdf t)) := by -- Reference-selection conditional CDF and its distance to `Φ(t)`. set F : ∀ n, StratAssign (Exp n).ι → ℝ := fun n s => (condDesign (Exp n) s).Pr (fun w => stud n (s, w) ≤ t) with hF set B : ℕ → ℝ := fun n => |F n (refSel Exp n) - stdNormalCdf t| with hBdef -- `B n → 0` since the reference conditional CDF converges to `Φ(t)`. have hB : Tendsto B atTop (𝓝 0) := by have hc := condCLT_ref h rw [tendsto_iff_norm_sub_tendsto_zero] at hc simpa only [hBdef, hF, Real.norm_eq_abs] using hc -- Rewrite each joint CDF as the stage-1 average of conditional CDFs. have hrw : ∀ n, (Exp n).jointD.Pr (fun sw => stud n sw ≤ t) = (Exp n).D₁.E (F n) := by intro n rw [LHExperiment.jointD, jointDesign, FiniteDesign.Pr_compound_eq_E_condPr] apply (Exp n).D₁.E_congr intro s rw [hF] rfl simp_rw [hrw] -- Average via the support-restricted mixture-lifting lemma. refine FiniteDesign.tendsto_E_of_uniformBound_ae (fun n => (Exp n).D₁) F (stdNormalCdf t) B (fun n s hs => ?_) hB -- On the support, `hhom` identifies `F n s` with `F n (refSel)`. simp only [hBdef, hF] rw [h.hhom n s (refSel Exp n) hs (refSel_mem Exp n)]
1 supporting declaration (lemmas, instances)
  • condCLT_ref lemma — Conditional CLT for the reference selection. Applying the independent-summands CLT prodDesign_clt to the per-coordinate summands gₛ₀,ᵢ over the conditional product design gives the conditional studentized CDF at the reference selection refSel Exp n converging to Φ(t).
    h :
    Homogeneous Exp t stud δ M v
    Tendsto (fun n => (condDesign (Exp n) (refSel Exp n)).Pr (fun w => stud n (refSel Exp n, w) ≤ t)) atTop (𝓝 (stdNormalCdf t))
    Proof (Lean source)
    lemma condCLT_ref (h : Homogeneous Exp t stud δ M v) : Tendsto (fun n => (condDesign (Exp n) (refSel Exp n)).Pr (fun w => stud n (refSel Exp n, w) ≤ t)) atTop (𝓝 (stdNormalCdf t)) := by classical set s₀ : ∀ n, StratAssign (Exp n).ι := fun n => refSel Exp n with hs₀ -- Coordinate designs and per-coordinate summands. set D : ∀ n, ∀ i : (Exp n).ι, FiniteDesign (Fin ((Exp n).gsize i) → Bool) := fun n i => if s₀ n i then (Exp n).ψ i else (Exp n).φ i with hD set g : ∀ n, ∀ i : (Exp n).ι, (Fin ((Exp n).gsize i) → Bool) → ℝ := fun n i => cltSummand n δ v (s₀ n) i with hg set B : ℕ → ℝ := fun n => M / sqrt ((Exp n).C * v n) with hBdef -- Positivity facts. have hCpos : ∀ n, 0 < (Exp n).C := by intro n have := nonempty_of_refSel h n rcases lt_or_gt_of_ne (Exp n).hC with h0 | h0 · exfalso have hnn : (0 : ℝ) ≤ ∑ i, if s₀ n i then (1 : ℝ) else 0 := sum_nonneg (fun i _ => by positivity) rw [h.hcount n (s₀ n) (refSel_mem Exp n)] at hnn; linarith · exact h0 have hsqrt : ∀ n, 0 < sqrt ((Exp n).C * v n) := fun n => Real.sqrt_pos.mpr (mul_pos (hCpos n) (h.hvpos n)) -- `0 ≤ B n`. have hB : ∀ n, 0 ≤ B n := by intro n have := nonempty_of_refSel h n exact div_nonneg (M_nonneg_of_homogeneous h n) (hsqrt n).le -- Uniform bound `|g n i a| ≤ B n`. have hbound : ∀ n i a, |g n i a| ≤ B n := by intro n i a rw [hg, hBdef] change |cltSummand n δ v (s₀ n) i a| ≤ M / sqrt ((Exp n).C * v n) unfold cltSummand rw [abs_div, abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)] rw [div_le_div_iff_of_pos_right (hsqrt n)] calc |if s₀ n i then (1:ℝ) else 0| * |groupDiff (Exp n) i a - δ| ≤ 1 * |groupDiff (Exp n) i a - δ| := by apply mul_le_mul_of_nonneg_right _ (abs_nonneg _) by_cases hh : s₀ n i = true <;> simp [hh] _ = |groupDiff (Exp n) i a - δ| := one_mul _ _ ≤ M := h.hMbound n i a -- Mean-zero summands. have hmean : ∀ n i, (D n i).E (g n i) = 0 := by intro n i change (if s₀ n i then (Exp n).ψ i else (Exp n).φ i).E (cltSummand n δ v (s₀ n) i) = 0 rw [show cltSummand n δ v (s₀ n) i = (fun a => ((if s₀ n i then (1:ℝ) else 0) / sqrt ((Exp n).C * v n)) * (groupDiff (Exp n) i a - δ)) from funext fun a => by unfold cltSummand; ring] rw [FiniteDesign.E_const_mul] by_cases hh : s₀ n i = true · rw [if_pos hh, if_pos hh] have : ((Exp n).ψ i).E (fun a => groupDiff (Exp n) i a - δ) = 0 := by rw [FiniteDesign.E_sub, FiniteDesign.E_const, E_groupDiff_eq_of_homogeneous h, sub_self] rw [this, mul_zero] · rw [if_neg hh]; ring -- Unit total variance. have hvar : ∀ n, (prodDesign (D n)).Var (fun w => ∑ i, g n i (w i)) = 1 := by intro n have := nonempty_of_refSel h n -- Write `g n i a = c i * gtil i a`. set c : (Exp n).ι → ℝ := fun i => (if s₀ n i then (1:ℝ) else 0) / sqrt ((Exp n).C * v n) with hc set gtil : ∀ i : (Exp n).ι, (Fin ((Exp n).gsize i) → Bool) → ℝ := fun i a => groupDiff (Exp n) i a - δ with hgtil rw [show (fun w : ∀ i, Fin ((Exp n).gsize i) → Bool => ∑ i, g n i (w i)) = (fun w => ∑ i, c i * gtil i (w i)) from funext fun w => by refine Finset.sum_congr rfl (fun i _ => ?_) rw [hg, hc, hgtil]; simp only [cltSummand]; ring] rw [FiniteDesign.Var_prod_linear_comb] -- Each term: `(c i)² · Var(gtil i) = if s₀ᵢ then v/(C·v) else 0`. have hterm : ∀ i, (c i) ^ 2 * (D n i).Var (gtil i) = (if s₀ n i then (1:ℝ) else 0) * (v n / ((Exp n).C * v n)) := by intro i change ((if s₀ n i then (1:ℝ) else 0) / sqrt ((Exp n).C * v n)) ^ 2 * (if s₀ n i then (Exp n).ψ i else (Exp n).φ i).Var (fun a => groupDiff (Exp n) i a - δ) = (if s₀ n i then (1:ℝ) else 0) * (v n / ((Exp n).C * v n)) by_cases hh : s₀ n i = true · rw [if_pos hh, if_pos hh, FiniteDesign.Var_sub_const, h.hv n i] rw [div_pow, one_pow, Real.sq_sqrt (mul_pos (hCpos n) (h.hvpos n)).le, one_mul, one_div, inv_mul_eq_div] · rw [if_neg hh, if_neg hh]; simp rw [Finset.sum_congr rfl (fun i _ => hterm i), ← Finset.sum_mul, h.hcount n (s₀ n) (refSel_mem Exp n)] rw [mul_div_assoc', div_eq_one_iff_eq (mul_ne_zero (ne_of_gt (hCpos n)) (ne_of_gt (h.hvpos n)))] -- Assemble `prodDesign_clt`. have hclt := DesignBased.prodDesign_clt D g B hB h.hB0 hbound h.hNB3 hmean hvar t -- Rewrite the prelimit to the conditional studentized CDF. refine hclt.congr (fun n => ?_) rw [condDesign] congr 1 funext w rw [stud_eq_sum_of_homogeneous h n (s₀ n) (refSel_mem Exp n) w]
    Causalean.Experimentation.TwoStageInterference.condCLT_ref · Causalean/Experimentation/TwoStageInterference/Asymptotic/CLTDischargeMain.lean:45
Consistency 1 core · 0 supporting The two-stage estimator of the treatment-minus-control direct-effect contrast is consistent when its design variance vanishes. ★ estDirect_consistent

Direct-contrast consistency

The two-stage estimator of the treatment-minus-control direct-effect contrast is consistent when its design variance vanishes.

This file proves Chebyshev consistency for the Liu-Hudgens direct-contrast estimator along a sequence of two-stage experiments.

theorem estDirect_consistent reviewed
Causalean.Experimentation.TwoStageInterference

Consistency of the direct-effect contrast estimator (Liu–Hudgens 2014). Along a sequence of two-stage experiments, if the closed-form design variance directVar tends to zero as the number of groups grows, then for every positive tolerance ε, the Horvitz-Thompson estimator is consistent for the population average treatment-minus-control direct-effect contrast: the probability that the deviation exceeds ε tends to zero.

Formal statement
Exp :
ℕ → LHExperiment
hVar0 :
Tendsto (fun n => (Exp n).directVar) atTop (𝓝 0)
ε :
:
0 < ε
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => ε ≤ |(Exp n).estD sw - (Exp n).DEbar|)) atTop (𝓝 0)
Proof (Lean source)
theorem estDirect_consistent (Exp : ℕ → LHExperiment) (hVar0 : Tendsto (fun n => (Exp n).directVar) atTop (𝓝 0)) {ε : ℝ} (hε : 0 < ε) : Tendsto (fun n => (Exp n).jointD.Pr (fun sw => ε ≤ |(Exp n).estD sw - (Exp n).DEbar|)) atTop (𝓝 0) := by refine squeeze_zero (g := fun n => (Exp n).directVar / ε ^ 2) (fun n => ?_) (fun n => ?_) ?_ · -- `0 ≤ Pr_n`: a probability is nonnegative. exact (Exp n).jointD.Pr_nonneg _ · -- `Pr_n ≤ directVar_n / ε²` by Chebyshev, recentering via unbiasedness. have hcenter : (Exp n).DEbar = (Exp n).jointD.E (Exp n).estD := ((Exp n).E_estD).symm change (Exp n).jointD.Pr (fun sw => ε ≤ |(Exp n).estD sw - (Exp n).DEbar|) ≤ (Exp n).directVar / ε ^ 2 rw [hcenter, ← (Exp n).var_estD] exact (Exp n).jointD.chebyshev (Exp n).estD hε · -- `directVar_n / ε² → 0 / ε² = 0`. simpa using hVar0.div_const (ε ^ 2)
Identical 9 core · 8 supporting This file turns literal group-level symmetry into the homogeneity hypothesis used by the Liu-Hudgens direct-effect CLT. ★ IdenticalRef★ directEffect_clt_identical

Identical-groups discharge for the direct-effect CLT

This file turns literal group-level symmetry into the homogeneity hypothesis used by the Liu-Hudgens direct-effect CLT.

The reference bundle IdenticalRef stores one identical-groups experiment: a common group size, common within-group strategies, common potential outcomes, common treated/control counts, the stage-1 design, and the propensities/nondegeneracy hypotheses needed to build `toExp : LHExperiment. It also defines the common per-group contrast groupDiff₀`, the concrete studentized statistic studId, the common group effect refDelta, and the common within-group variance refVar.

The theorem hhom_of_identical proves the selection-symmetry hypothesis by relabeling equal-size selected sets with exists_equiv_selection and prodDesign_Pr_reindex. The definition homogeneous_of_identical assembles the resulting Homogeneous bundle, and directEffect_clt_identical derives asymptotic normality without assuming analytic homogeneity as a separate premise.

structure IdenticalRef reviewed
Causalean.Experimentation.TwoStageInterference

Reference data for one identical-groups experiment. All groups in the population share a common size K, a common pair of within-group allocation strategies ψ₀ and φ₀, common potential outcomes Y₀, and common control and treatment unit counts, each assumed nonzero, as is the group size K. A stage-1 design D₁ assigns each group a strategy, selecting a nonzero number C of groups for ψ, out of a population of at least two groups; every unit's within-group control propensity equals m0₀/K and its treatment propensity equals m1₀/K, every group's stage-1 selection propensity equals C/N, and every pair's joint selection propensity equals C(C−1)/(N(N−1)). Together these assemble the constant LHExperiment toExp.

Definition (Lean source)
Finite population of groups.
ι :
The common group size.
K :
The common allocation strategy ψ.
ψ₀ :
The common comparison strategy φ.
φ₀ :
The common partial-interference potential outcomes.
Y₀ :
Fin K → (Fin K → Bool) → ℝ
The common control-unit count.
m0₀ :
The common treated-unit count.
m1₀ :
Stage-1 strategy-assignment design.
Number of groups selected for ψ at stage 1.
C :
The ψ-selection count is nonzero.
hC :
C ≠ 0
The common control count is nonzero.
hm0 :
m0₀ ≠ 0
The common treated count is nonzero.
hm1 :
m1₀ ≠ 0
The common group size is nonzero.
hn :
(K : ℝ) ≠ 0
There is at least one group.
hN :
(Fintype.card ι : ℝ) ≠ 0
There are at least two groups, needed for the pair propensity.
hN1 :
(Fintype.card ι : ℝ) - 1 ≠ 0
Within-group control propensity of every unit is `m0₀ / K`.
hprop0 :
∀ j : Fin K, ψ₀.Pr (fun w => w j = false) = m0₀ / (K : ℝ)
Within-group treatment propensity of every unit is `m1₀ / K`.
hprop1 :
∀ j : Fin K, ψ₀.Pr (fun w => w j = true) = m1₀ / (K : ℝ)
Stage-1 first-order selection propensity of every group is `C/N`.
hstage1 :
∀ i, D₁.Pr (fun s => s i = true) = C / (Fintype.card ι : ℝ)
Stage-1 second-order (pair) selection propensity is `C(C−1)/(N(N−1))`.
hstage1pair :
∀ i j
if
i ≠ j
then
D₁.E (fun s => FiniteDesign.ind (fun s => s i = true) s * FiniteDesign.ind (fun s => s j = true) s)
= (C * (C - 1)) / ((Fintype.card ι : ℝ) * ((Fintype.card ι : ℝ) - 1))
Causalean.Experimentation.TwoStageInterference.IdenticalRef · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:107
def toExp reviewed
Causalean.Experimentation.TwoStageInterference.IdenticalRef

The constant LHExperiment assembled from identical-groups reference data: every group has gsize := K, strategies ψ₀/φ₀, outcomes Y₀, and counts m0₀/m1₀. Because gsize is the literal constant fun _ => K, the within-group assignment space is the non-dependent space Fin K → Bool and the conditional design is a genuine product over ι → (Fin K → Bool).

Definition (Lean source)
noncomputable def toExp : LHExperiment where ι := R.ι gsize := fun _ => R.K D₁ := R.D₁ ψ := fun _ => R.ψ₀ φ := fun _ => R.φ₀ Y := fun _ => R.Y₀ m0 := fun _ => R.m0₀ m1 := fun _ => R.m1₀ C := R.C hC := R.hC hm0 := fun _ => R.hm0 hm1 := fun _ => R.hm1 hn := fun _ => R.hn hN := R.hN hN1 := R.hN1 hprop0 := fun _ => R.hprop0 hprop1 := fun _ => R.hprop1 hstage1 := R.hstage1 hstage1pair := R.hstage1pair
Causalean.Experimentation.TwoStageInterference.IdenticalRef.toExp · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:168 · uses IdenticalRef , LHExperiment
def groupDiff₀ reviewed
Causalean.Experimentation.TwoStageInterference.IdenticalRef

The common per-group treatment-minus-control contrast estimator of the identical groups; it does not depend on the group index.

Definition (Lean source)
noncomputable def groupDiff₀ (w : Fin R.K → Bool) : ℝ := (∑ j, if w j = true then R.Y₀ j w else 0) / R.m1₀ - (∑ j, if w j = false then R.Y₀ j w else 0) / R.m0₀
Causalean.Experimentation.TwoStageInterference.IdenticalRef.groupDiff₀ · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:193 · uses IdenticalRef
def studId reviewed
Causalean.Experimentation.TwoStageInterference.IdenticalRef

The concrete studentized treatment-minus-control contrast statistic of the constant experiment.

Definition (Lean source)
noncomputable def studId (sw : StratAssign R.ι × (R.ι → (Fin R.K → Bool))) : ℝ := (R.toExp.estD sw - R.toExp.DEbar) / sqrt (R.toExp.directVar)
Causalean.Experimentation.TwoStageInterference.IdenticalRef.studId · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:208 · uses IdenticalRef , StratAssign
def refGroupMean reviewed
Causalean.Experimentation.TwoStageInterference.IdenticalRef

The common group-average potential outcome ȳ(z) of the identical groups under treatment status z, computed from the reference allocation strategy and outcomes — index-free.

Definition (Lean source)
noncomputable def refGroupMean (z : Bool) : ℝ := (∑ j : Fin R.K, R.ψ₀.E (fun w => if w j = z then R.Y₀ j w else 0) / R.ψ₀.Pr (fun w => w j = z)) / (R.K : ℝ)
Causalean.Experimentation.TwoStageInterference.IdenticalRef.refGroupMean · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:281 · uses IdenticalRef
def refDelta reviewed
Causalean.Experimentation.TwoStageInterference.IdenticalRef

The common group-level treatment-minus-control direct-effect contrast δ of the identical groups; it does not depend on any group index.

Definition (Lean source)
noncomputable def refDelta : ℝ := R.refGroupMean true - R.refGroupMean false
Causalean.Experimentation.TwoStageInterference.IdenticalRef.refDelta · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:287 · uses IdenticalRef
def refVar reviewed
Causalean.Experimentation.TwoStageInterference.IdenticalRef

The common within-group contrast-estimator variance v of the identical groups.

Definition (Lean source)
noncomputable def refVar : ℝ := R.ψ₀.Var R.groupDiff₀
Causalean.Experimentation.TwoStageInterference.IdenticalRef.refVar · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:291 · uses IdenticalRef
def homogeneous_of_identical reviewed
Causalean.Experimentation.TwoStageInterference

Homogeneity bundle from identical groups. From a sequence of identical-groups experiments sharing one group-level treatment-minus-control direct-effect contrast δ, with a uniform bound M on the centered per-group estimator, the many-groups rate, and the exact-C selection support, the full Homogeneous bundle is assembled — with its hhom field discharged by hhom_of_identical. The within-group variances v n := refVar (R n) may vary across n.

Definition (Lean source)
noncomputable def homogeneous_of_identical (R : ℕ → IdenticalRef) (t δ M : ℝ) (hδ : ∀ n, (R n).refDelta = δ) (hvpos : ∀ n, 0 < (R n).refVar) (hMbound : ∀ n i w, |groupDiff (R n).toExp i w - δ| ≤ M) (hcount : ∀ n s, (R n).toExp.D₁.p s ≠ 0 → (∑ i, if s i then (1 : ℝ) else 0) = (R n).toExp.C) (hB0 : Tendsto (fun n => M / sqrt ((R n).toExp.C * (R n).refVar)) atTop (𝓝 0)) (hNB3 : Tendsto (fun n => (card (R n).toExp.ι : ℝ) * (M / sqrt ((R n).toExp.C * (R n).refVar)) ^ 3) atTop (𝓝 0)) : Homogeneous (fun n => (R n).toExp) t (fun n => (R n).studId) δ M (fun n => (R n).refVar) where hstud := fun n sw => rfl hδ := fun n i => by rw [(R n).hδ_toExp i, hδ n] hv := fun n i => (R n).hv_toExp i hvpos := hvpos hMbound := hMbound hcount := hcount hB0 := hB0 hNB3 := hNB3 hhom := fun n s s' hs hs' => (R n).hhom_of_identical t s s' (hcount n s hs) (hcount n s' hs')
theorem directEffect_clt_identical reviewed
Causalean.Experimentation.TwoStageInterference

Proposition 5.1 under literally identical groups. Along a sequence of identical-groups experiments R — common size, allocation strategies, potential outcomes, and unit counts — sharing one group-level treatment-minus-control direct-effect contrast δ with a positive common within-group variance, a uniform bound M on the centered per-group contrast estimator, every supported stage-1 selection flagging exactly C groups, and the many-groups rate M/√(C·v) → 0 together with its Lyapunov cube card·(M/√(C·v))³ → 0the studentized contrast statistic is asymptotically standard normal. No analytic homogeneity hypothesis is assumed: it is derived from the concrete identical-groups structure via hhom_of_identical.

Formal statement
R :
ℕ → IdenticalRef
t δ M :
:
∀ n, (R n).refDelta = δ
hvpos :
∀ n, 0 < (R n).refVar
hMbound :
∀ n i w, |groupDiff (R n).toExp i w - δ| ≤ M
hcount :
∀ n s
if
(R n).toExp.D₁.p s ≠ 0
then
(∑ i, if s i then (1 : ℝ) else 0) = (R n).toExp.C
hB0 :
Tendsto (fun n => M / sqrt ((R n).toExp.C * (R n).refVar)) atTop (𝓝 0)
hNB3 :
Tendsto (fun n => (card (R n).toExp.ι : ℝ) * (M / sqrt ((R n).toExp.C * (R n).refVar)) ^ 3) atTop (𝓝 0)
Tendsto (fun n => (R n).toExp.jointD.Pr (fun sw => (R n).studId sw ≤ t)) atTop (𝓝 (stdNormalCdf t))
Proof (Lean source)
theorem directEffect_clt_identical (R : ℕ → IdenticalRef) (t δ M : ℝ) (hδ : ∀ n, (R n).refDelta = δ) (hvpos : ∀ n, 0 < (R n).refVar) (hMbound : ∀ n i w, |groupDiff (R n).toExp i w - δ| ≤ M) (hcount : ∀ n s, (R n).toExp.D₁.p s ≠ 0 → (∑ i, if s i then (1 : ℝ) else 0) = (R n).toExp.C) (hB0 : Tendsto (fun n => M / sqrt ((R n).toExp.C * (R n).refVar)) atTop (𝓝 0)) (hNB3 : Tendsto (fun n => (card (R n).toExp.ι : ℝ) * (M / sqrt ((R n).toExp.C * (R n).refVar)) ^ 3) atTop (𝓝 0)) : Tendsto (fun n => (R n).toExp.jointD.Pr (fun sw => (R n).studId sw ≤ t)) atTop (𝓝 (stdNormalCdf t)) := directEffect_clt_homogeneous (homogeneous_of_identical R t δ M hδ hvpos hMbound hcount hB0 hNB3)
8 supporting declarations (lemmas, instances)
  • exists_equiv_selection lemma — Selection-symmetry permutation. Given two Boolean selections s, s' on a finite type ι that flag the same number of indices (card {i | s i} = card {i | s' i}), there is a permutation σ : ι ≃ ι aligning their patterns: s' i = s (σ i) for every i. Built by gluing a bijection of the selected sets (equal cardinality) with a bijection of their complements (equal cardinality, since the total is fixed) through Equiv.sumCompl.
    ι :
    Type*
    s s' :
    ι → Bool
    hcard :
    (Finset.univ.filter (fun i => s i = true)).card
    = (Finset.univ.filter (fun i => s' i = true)).card
    ∃ σ : ι ≃ ι, ∀ i, s' i = s (σ i)
    Proof (Lean source)
    lemma exists_equiv_selection {ι : Type*} [Fintype ι] (s s' : ι → Bool) (hcard : (Finset.univ.filter (fun i => s i = true)).card = (Finset.univ.filter (fun i => s' i = true)).card) : ∃ σ : ι ≃ ι, ∀ i, s' i = s (σ i) := by classical -- Predicates with the carried `Fintype`/`DecidablePred` instances. -- True-sets have equal cardinality (`hcard`); complements then also (total `card ι` fixed). have hcardT : card {i // s' i = true} = card {i // s i = true} := by simp only [Fintype.card_subtype] exact hcard.symm have hcardF : card {i // ¬ s' i = true} = card {i // ¬ s i = true} := by have h1 := Fintype.card_subtype_compl (fun i => s' i = true) have h2 := Fintype.card_subtype_compl (fun i => s i = true) rw [h1, h2, hcardT] -- Bijections of selected sets and of complements. let eT : {i // s' i = true} ≃ {i // s i = true} := Fintype.equivOfCardEq hcardT let eF : {i // ¬ s' i = true} ≃ {i // ¬ s i = true} := Fintype.equivOfCardEq hcardF -- Glue via `sumCompl` on both sides. let σ : ι ≃ ι := (Equiv.sumCompl (fun i => s' i = true)).symm.trans ((eT.sumCongr eF).trans (Equiv.sumCompl (fun i => s i = true))) refine ⟨σ, fun i => ?_⟩ -- Compute `σ i` explicitly: it is the underlying element of the image of `i` under the glued -- bijection, which by construction lies in the matching set of `s`. have hσ : ∀ i, σ i = (Equiv.sumCompl (fun i => s i = true)) ((eT.sumCongr eF) ((Equiv.sumCompl (fun i => s' i = true)).symm i)) := fun i => rfl rw [hσ] -- Case on `s' i`; in each branch `σ i` lands in the matching set of `s`. by_cases hi : s' i = true · rw [Equiv.sumCompl_symm_apply_of_pos (p := fun i => s' i = true) hi] rw [Equiv.sumCongr_apply, Sum.map_inl, Equiv.sumCompl_apply_inl] exact hi.trans ((eT ⟨i, hi⟩).2).symm · rw [Equiv.sumCompl_symm_apply_of_neg (p := fun i => s' i = true) hi] rw [Equiv.sumCongr_apply, Sum.map_inr, Equiv.sumCompl_apply_inr] have hF : s (↑(eF ⟨i, hi⟩)) = false := Bool.not_eq_true _ ▸ (eF ⟨i, hi⟩).2 rw [hF]; simpa using hi
    Causalean.Experimentation.TwoStageInterference.exists_equiv_selection · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:63
  • groupDiff_toExp lemma — In the constant experiment, every group's contrast estimator equals the common groupDiff₀.
    i :
    R.ι
    groupDiff R.toExp i = R.groupDiff₀
    Proof (Lean source)
    lemma groupDiff_toExp (i : R.ι) : groupDiff R.toExp i = R.groupDiff₀ := by rfl
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.groupDiff_toExp · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:199
  • condDesign_toExp lemma — The conditional design of the constant experiment is the genuine product, over the non-dependent space R.ι → (Fin K → Bool), of the per-group strategy designs.
    s :
    condDesign R.toExp s = prodDesign (fun i => if s i then R.ψ₀ else R.φ₀)
    Proof (Lean source)
    lemma condDesign_toExp (s : StratAssign R.ι) : condDesign R.toExp s = prodDesign (fun i => if s i then R.ψ₀ else R.φ₀) := rfl
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.condDesign_toExp · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:203
  • estD_equivariant lemma — Estimator equivariance. Because all groups are identical, the aggregate contrast estimator sees a selection only through its pattern: if σ aligns the patterns of s' and s (s' i = s (σ i)), then evaluating at s' and the relabeled assignment w ∘ σ equals the value at s and w.
    s s' :
    σ :
    R.ι ≃ R.ι
    :
    ∀ i, s' i = s (σ i)
    w :
    R.ι → (Fin R.K → Bool)
    R.toExp.estD (s', fun i => w (σ i)) = R.toExp.estD (s, w)
    Proof (Lean source)
    lemma estD_equivariant (s s' : StratAssign R.ι) (σ : R.ι ≃ R.ι) (hσ : ∀ i, s' i = s (σ i)) (w : R.ι → (Fin R.K → Bool)) : R.toExp.estD (s', fun i => w (σ i)) = R.toExp.estD (s, w) := by rw [estD_eq_agg R.toExp s' (fun i => w (σ i)), estD_eq_agg R.toExp s w] congr 1 refine Fintype.sum_equiv σ (fun i => (if s' i then (1 : ℝ) else 0) * groupDiff R.toExp i (w (σ i))) (fun i => (if s i then (1 : ℝ) else 0) * groupDiff R.toExp i (w i)) (fun i => ?_) simp only [groupDiff_toExp, hσ i]
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.estD_equivariant · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:213
  • studId_equivariant lemma — Studentized equivariance. The studentized statistic is likewise selection-pattern equivariant, since DEbar and directVar are scalars and the estimator is equivariant.
    s s' :
    σ :
    R.ι ≃ R.ι
    :
    ∀ i, s' i = s (σ i)
    w :
    R.ι → (Fin R.K → Bool)
    R.studId (s', fun i => w (σ i)) = R.studId (s, w)
    Proof (Lean source)
    lemma studId_equivariant (s s' : StratAssign R.ι) (σ : R.ι ≃ R.ι) (hσ : ∀ i, s' i = s (σ i)) (w : R.ι → (Fin R.K → Bool)) : R.studId (s', fun i => w (σ i)) = R.studId (s, w) := by unfold studId congr 2 exact estD_equivariant R s s' σ hσ w
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.studId_equivariant · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:227
  • hhom_of_identical lemma — Derived homogeneity hypothesis under identical groups. For two stage-1 selections each flagging exactly C groups, the conditional studentized CDF is the same. This is exactly the analytic homogeneity hypothesis hhom, now a theorem: the selection-symmetry permutation σ (exists_equiv_selection) relabels the conditional product design (prodDesign_Pr_reindex) while carrying the studentized statistic (studId_equivariant), so the two CDFs coincide.
    t :
    s s' :
    hs :
    (∑ i, if s i then (1 : ℝ) else 0) = R.C
    hs' :
    (∑ i, if s' i then (1 : ℝ) else 0) = R.C
    (condDesign R.toExp s).Pr (fun w => R.studId (s, w) ≤ t)
    = (condDesign R.toExp s').Pr (fun w => R.studId (s', w) ≤ t)
    Proof (Lean source)
    lemma hhom_of_identical (t : ℝ) (s s' : StratAssign R.ι) (hs : (∑ i, if s i then (1 : ℝ) else 0) = R.C) (hs' : (∑ i, if s' i then (1 : ℝ) else 0) = R.C) : (condDesign R.toExp s).Pr (fun w => R.studId (s, w) ≤ t) = (condDesign R.toExp s').Pr (fun w => R.studId (s', w) ≤ t) := by -- The two selections flag the same number of groups, so their selected sets have equal card. have hsum : (∑ i, if s i then (1 : ℝ) else 0) = (∑ i, if s' i then (1 : ℝ) else 0) := by rw [hs, hs'] have hcardℝ : ((Finset.univ.filter (fun i => s i = true)).card : ℝ) = ((Finset.univ.filter (fun i => s' i = true)).card : ℝ) := by have e : ∀ u : StratAssign R.ι, (∑ i, if u i then (1 : ℝ) else 0) = ((Finset.univ.filter (fun i => u i = true)).card : ℝ) := by intro u rw [Finset.sum_ite, Finset.sum_const, Finset.sum_const_zero, add_zero, nsmul_eq_mul, mul_one] rw [← e s, ← e s', hsum] have hcard : (Finset.univ.filter (fun i => s i = true)).card = (Finset.univ.filter (fun i => s' i = true)).card := by exact_mod_cast hcardℝ -- The selection-symmetry permutation aligning `s'` to `s`. obtain ⟨σ, hσ⟩ := exists_equiv_selection s s' hcard -- Relabel `condDesign s'` to `condDesign s` via `prodDesign_Pr_reindex`, carrying the statistic. rw [condDesign_toExp, condDesign_toExp] -- The permuted product `D ∘ σ` equals the conditional design at `s'` (since `s' i = s (σ i)`). have hdesign : (fun i => if s (σ i) then R.ψ₀ else R.φ₀) = (fun i => if s' i then R.ψ₀ else R.φ₀) := by funext i; rw [hσ i] calc (prodDesign (fun i => if s i then R.ψ₀ else R.φ₀)).Pr (fun w => R.studId (s, w) ≤ t) = (prodDesign (fun i => if s i then R.ψ₀ else R.φ₀)).Pr (fun w => R.studId (s', fun i => w (σ i)) ≤ t) := FiniteDesign.Pr_congr _ _ _ (fun w => by rw [studId_equivariant R s s' σ hσ w]) _ = (prodDesign (fun i => (fun i => if s i then R.ψ₀ else R.φ₀) (σ i))).Pr (fun w => R.studId (s', w) ≤ t) := FiniteDesign.prodDesign_Pr_reindex σ (fun i => if s i then R.ψ₀ else R.φ₀) (fun w => R.studId (s', w) ≤ t) _ = (prodDesign (fun i => if s' i then R.ψ₀ else R.φ₀)).Pr (fun w => R.studId (s', w) ≤ t) := by rw [hdesign]
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.hhom_of_identical · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:237
  • hδ_toExp lemma — In the constant experiment every group's level contrast equals the common refDelta.
    i :
    R.ι
    groupMean R.toExp.ψ R.toExp.Y i true - groupMean R.toExp.ψ R.toExp.Y i false = R.refDelta
    Proof (Lean source)
    lemma hδ_toExp (i : R.ι) : groupMean R.toExp.ψ R.toExp.Y i true - groupMean R.toExp.ψ R.toExp.Y i false = R.refDelta := by rfl
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.hδ_toExp · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:294
  • hv_toExp lemma — In the constant experiment every group's within-group variance equals the common refVar.
    i :
    R.ι
    (R.toExp.ψ i).Var (groupDiff R.toExp i) = R.refVar
    Proof (Lean source)
    lemma hv_toExp (i : R.ι) : (R.toExp.ψ i).Var (groupDiff R.toExp i) = R.refVar := by rfl
    Causalean.Experimentation.TwoStageInterference.IdenticalRef.hv_toExp · Causalean/Experimentation/TwoStageInterference/Asymptotic/Identical.lean:299
Wald 1 core · 0 supporting Oracle Wald intervals for Liu-Hudgens treatment-minus-control direct-effect contrasts have asymptotic coverage from the CLT. ★ wald_coverage_oracle

Oracle Wald coverage

Oracle Wald intervals for Liu-Hudgens treatment-minus-control direct-effect contrasts have asymptotic coverage from the CLT.

The public theorem wald_coverage_oracle proves the lower-coverage result for intervals using the true design variance. It takes the two one-sided studentized CLT limits at the normal quantile and its negative as inputs, then converts the event |stud| ≤ zq into coverage of DEbar by multiplying through the positive square-root design variance.

theorem wald_coverage_oracle reviewed
Causalean.Experimentation.TwoStageInterference

Asymptotic oracle Wald coverage (Liu–Hudgens 2014). Along a sequence of two-stage Hudgens–Halloran experiments Exp, let stud n be the studentized statistic (D̂E − DE̅)/√directVar for the treatment-minus-control direct-effect contrast, and assume the design variance is everywhere positive. Let zq ≥ 0 be the standard-normal upper quantile at level γ, i.e. Φ(zq) = 1 − γ/2, and assume the two studentized-CDF limits of stud at zq and −zq converge to Φ(zq) and Φ(−zq) — exactly the conclusion of the direct-contrast CLT. Then the oracle Wald interval D̂E ± zq·√directVar attains asymptotic coverage of DE̅ at least 1 − γ.

Formal statement
Exp :
ℕ → LHExperiment
stud :
∀ n
if
(StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool)
then
hstud :
∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / sqrt ((Exp n).directVar)
hVar :
∀ n, 0 < (Exp n).directVar
γ :
zq :
hzq0 :
0 ≤ zq
hzq :
stdNormalCdf zq = 1 - γ / 2
hcltPos :
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ zq)) atTop (𝓝 (stdNormalCdf zq))
hcltNeg :
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ -zq)) atTop (𝓝 (stdNormalCdf (-zq)))
1 - γ
liminf (fun n => (Exp n).jointD.Pr (fun sw => |(Exp n).estD sw - (Exp n).DEbar| ≤ zq * sqrt ((Exp n).directVar))) atTop
Proof (Lean source)
theorem wald_coverage_oracle (Exp : ℕ → LHExperiment) (stud : ∀ n, (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → ℝ) (hstud : ∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / sqrt ((Exp n).directVar)) (hVar : ∀ n, 0 < (Exp n).directVar) {γ : ℝ} (zq : ℝ) (hzq0 : 0 ≤ zq) (hzq : stdNormalCdf zq = 1 - γ / 2) (hcltPos : Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ zq)) atTop (𝓝 (stdNormalCdf zq))) (hcltNeg : Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ -zq)) atTop (𝓝 (stdNormalCdf (-zq)))) : 1 - γ ≤ liminf (fun n => (Exp n).jointD.Pr (fun sw => |(Exp n).estD sw - (Exp n).DEbar| ≤ zq * sqrt ((Exp n).directVar))) atTop := by -- The studentized lower-CDF probabilities at `zq` and `-zq`. set S : ℕ → ℝ := fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ zq) with hSdef set Lo : ℕ → ℝ := fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ -zq) with hLodef set I : ℕ → ℝ := fun n => (Exp n).jointD.Pr (fun sw => |(Exp n).estD sw - (Exp n).DEbar| ≤ zq * sqrt ((Exp n).directVar)) with hIdef -- (1) Limit of `S - Lo`. have hlim : Tendsto (fun n => S n - Lo n) atTop (𝓝 (1 - γ)) := by have h := hcltPos.sub hcltNeg rw [stdNormalCdf_neg zq, hzq] at h have he : (1 - γ / 2) - (1 - (1 - γ / 2)) = 1 - γ := by ring rwa [he] at h -- (2) Pointwise lower bound `S - Lo ≤ I`. have hbound : ∀ n, S n - Lo n ≤ I n := by intro n -- Abbreviate the studentized statistic and the square-root denominator. set W : (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → ℝ := fun sw => stud n sw with hWdef -- Split `S` by the event `W ≤ -zq`. have hsplit := (Exp n).jointD.Pr_split (fun sw => W sw ≤ zq) (fun sw => W sw ≤ -zq) -- The first piece equals `Lo`. have hfirst : (Exp n).jointD.Pr (fun sw => W sw ≤ zq ∧ W sw ≤ -zq) = Lo n := by apply (Exp n).jointD.Pr_congr intro sw constructor · exact fun h => h.2 · intro h2 exact ⟨le_trans h2 (by linarith [hzq0]), h2⟩ -- So `S - Lo` is the probability of the second piece. have hSLo : S n - Lo n = (Exp n).jointD.Pr (fun sw => W sw ≤ zq ∧ ¬ W sw ≤ -zq) := by have : S n = (Exp n).jointD.Pr (fun sw => W sw ≤ zq ∧ W sw ≤ -zq) + (Exp n).jointD.Pr (fun sw => W sw ≤ zq ∧ ¬ W sw ≤ -zq) := hsplit rw [this, hfirst]; ring rw [hSLo] -- That second piece is contained in `I`'s event. apply (Exp n).jointD.Pr_mono intro sw hz obtain ⟨hz1, hz2⟩ := hz rw [not_le] at hz2 -- `|W sw| ≤ zq`. have habs : |W sw| ≤ zq := abs_le.mpr ⟨le_of_lt hz2, hz1⟩ -- Unfold the studentized statistic. set s : ℝ := sqrt ((Exp n).directVar) with hsdef have hs : 0 < s := Real.sqrt_pos.mpr (hVar n) rw [hWdef] at habs simp only at habs rw [hstud n sw, ← hsdef] at habs rw [abs_div, abs_of_pos hs, div_le_iff₀ hs] at habs exact habs -- (3) Conclude with liminf. have hbdd : IsBoundedUnder (· ≥ ·) atTop (fun n => S n - Lo n) := hlim.isBoundedUnder_ge have hcobdd : IsCoboundedUnder (· ≥ ·) atTop I := isCoboundedUnder_ge_of_le atTop (x := (1 : ℝ)) (fun n => (Exp n).jointD.Pr_le_one _) calc 1 - γ = liminf (fun n => S n - Lo n) atTop := hlim.liminf_eq.symm _ ≤ liminf I atTop := Filter.liminf_le_liminf (Filter.Eventually.of_forall hbound) hbdd hcobdd
Wald­Feasible 1 core · 0 supporting Feasible Wald intervals retain asymptotic coverage when the estimated variance does not undershoot. ★ wald_coverage_feasible

Feasible Wald coverage

Feasible Wald intervals retain asymptotic coverage when the estimated variance does not undershoot.

The helper lemma clt_interval_liminf_lb turns per-threshold CLT limits into a lower bound for two-sided studentized bands. The public theorem wald_coverage_feasible then combines that band bound with a conservative-consistency hypothesis on the variance estimator Vh, proving asymptotic lower coverage for intervals of the form estD ± zq * sqrt (Vh).

theorem wald_coverage_feasible reviewed
Causalean.Experimentation.TwoStageInterference

Asymptotic feasible Wald coverage (Liu–Hudgens 2014). Along a sequence of two-stage Hudgens–Halloran experiments Exp, let stud n be the studentized statistic (D̂E − DE̅)/√directVar for the treatment-minus-control direct-effect contrast, and assume its per-threshold CDF converges to the standard normal CDF at every threshold and the design variance is everywhere positive. Let Vh n be an arbitrary variance estimator that is conservative-consistent — for every slack ε > 0 the probability it undershoots (1−ε) times the true variance tends to zero, and let zq ≥ 0 be the standard-normal upper quantile at level γ, Φ(zq) = 1 − γ/2. Then the feasible Wald interval D̂E ± zq·√(Vh) attains asymptotic coverage of DE̅ at least 1 − γ.

Formal statement
Exp :
ℕ → LHExperiment
stud :
∀ n
if
(StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool)
then
hstud :
∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / sqrt ((Exp n).directVar)
Vh :
∀ n
if
(StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool)
then
hclt :
∀ t,
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ t)) atTop (𝓝 (stdNormalCdf t))
hVar :
∀ n, 0 < (Exp n).directVar
hVhat :
∀ ε : ℝ
if
0 < ε
then
Tendsto (fun n => (Exp n).jointD.Pr (fun sw => Vh n sw < (1 - ε) * (Exp n).directVar)) atTop (𝓝 0)
γ :
zq :
hzq0 :
0 ≤ zq
hzq :
stdNormalCdf zq = 1 - γ / 2
1 - γ
liminf (fun n => (Exp n).jointD.Pr (fun sw => |(Exp n).estD sw - (Exp n).DEbar| ≤ zq * sqrt (Vh n sw))) atTop
Proof (Lean source)
theorem wald_coverage_feasible (Exp : ℕ → LHExperiment) (stud : ∀ n, (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → ℝ) (hstud : ∀ n sw, stud n sw = ((Exp n).estD sw - (Exp n).DEbar) / Real.sqrt ((Exp n).directVar)) (Vh : ∀ n, (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → ℝ) (hclt : ∀ t, Tendsto (fun n => (Exp n).jointD.Pr (fun sw => stud n sw ≤ t)) atTop (𝓝 (stdNormalCdf t))) (hVar : ∀ n, 0 < (Exp n).directVar) (hVhat : ∀ ε : ℝ, 0 < ε → Tendsto (fun n => (Exp n).jointD.Pr (fun sw => Vh n sw < (1 - ε) * (Exp n).directVar)) atTop (𝓝 0)) {γ : ℝ} (zq : ℝ) (hzq0 : 0 ≤ zq) (hzq : stdNormalCdf zq = 1 - γ / 2) : 1 - γ ≤ liminf (fun n => (Exp n).jointD.Pr (fun sw => |(Exp n).estD sw - (Exp n).DEbar| ≤ zq * Real.sqrt (Vh n sw))) atTop := by -- The coverage probability sequence. set I : ℕ → ℝ := fun n => (Exp n).jointD.Pr (fun sw => |(Exp n).estD sw - (Exp n).DEbar| ≤ zq * Real.sqrt (Vh n sw)) with hIdef -- `I` is coboundedly below (always ≤ 1). have hIcobdd : IsCoboundedUnder (· ≥ ·) atTop I := isCoboundedUnder_ge_of_le atTop (x := (1 : ℝ)) (fun n => (Exp n).jointD.Pr_le_one _) -- For each `ε ∈ (0,1)`, `liminf I ≥ 2·Φ(zq·√(1-ε)) - 1`. have key : ∀ ε : ℝ, 0 < ε → ε < 1 → 2 * stdNormalCdf (zq * Real.sqrt (1 - ε)) - 1 ≤ liminf I atTop := by intro ε hε0 hε1 set c : ℝ := zq * Real.sqrt (1 - ε) with hcdef have h1mε : (0 : ℝ) < 1 - ε := by linarith have hc0 : 0 ≤ c := mul_nonneg hzq0 (Real.sqrt_nonneg _) -- The CLT band probability and the "bad variance" probability. set B : ℕ → ℝ := fun n => (Exp n).jointD.Pr (fun sw => -c ≤ stud n sw ∧ stud n sw ≤ c) with hBdef set A : ℕ → ℝ := fun n => (Exp n).jointD.Pr (fun sw => Vh n sw < (1 - ε) * (Exp n).directVar) with hAdef have hA0 : Tendsto A atTop (𝓝 0) := hVhat ε hε0 -- STEP 2: pointwise `B n - A n ≤ I n`. have hstep2 : ∀ n, B n - A n ≤ I n := by intro n set Vr : ℝ := (Exp n).directVar with hVrdef set σ : ℝ := Real.sqrt Vr with hσdef have hσpos : 0 < σ := Real.sqrt_pos.mpr (hVar n) set W : (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → ℝ := fun sw => stud n sw with hWdef -- Split `B` by the bad-variance event. set Abad : (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → Prop := fun sw => Vh n sw < (1 - ε) * Vr with hAbaddef set Bev : (StratAssign (Exp n).ι × ∀ i, Fin ((Exp n).gsize i) → Bool) → Prop := fun sw => -c ≤ W sw ∧ W sw ≤ c with hBevdef have hsplit := (Exp n).jointD.Pr_split Bev Abad -- `Pr(Bev ∧ Abad) ≤ A n`. have hBA : (Exp n).jointD.Pr (fun sw => Bev sw ∧ Abad sw) ≤ A n := by apply (Exp n).jointD.Pr_mono; intro sw hz; exact hz.2 -- So `B n - A n ≤ Pr(Bev ∧ ¬Abad)`. have hBmA : B n - A n ≤ (Exp n).jointD.Pr (fun sw => Bev sw ∧ ¬ Abad sw) := by have hBeq : B n = (Exp n).jointD.Pr (fun sw => Bev sw ∧ Abad sw) + (Exp n).jointD.Pr (fun sw => Bev sw ∧ ¬ Abad sw) := hsplit linarith [hBeq, hBA] refine le_trans hBmA ?_ -- `Pr(Bev ∧ ¬Abad) ≤ I n` by event inclusion. apply (Exp n).jointD.Pr_mono intro sw hz obtain ⟨⟨hzlo, hzhi⟩, hznotbad⟩ := hz rw [hAbaddef, not_lt] at hznotbad -- `|W sw| ≤ c`. have habsW : |W sw| ≤ c := abs_le.mpr ⟨hzlo, hzhi⟩ -- `estD - DEbar = W sw * σ`. have hWσ : (Exp n).estD sw - (Exp n).DEbar = W sw * σ := by change (Exp n).estD sw - (Exp n).DEbar = stud n sw * σ rw [hstud n sw, ← hVrdef, ← hσdef] field_simp rw [hWσ, abs_mul, abs_of_pos hσpos] -- `|W sw| * σ ≤ c * σ = zq * √((1-ε)*Vr) ≤ zq * √(V̂)`. calc |W sw| * σ ≤ c * σ := by apply mul_le_mul_of_nonneg_right habsW hσpos.le _ = zq * Real.sqrt ((1 - ε) * Vr) := by rw [hcdef, hσdef, mul_assoc, ← Real.sqrt_mul h1mε.le] _ ≤ zq * Real.sqrt (Vh n sw) := by apply mul_le_mul_of_nonneg_left _ hzq0 exact Real.sqrt_le_sqrt hznotbad -- STEP 3: liminf chain. -- `liminf B ≤ liminf (B - A)` since `A → 0`. have hBAliminf : liminf B atTopliminf (fun n => B n - A n) atTop := by have hnegA : Tendsto (fun n => -A n) atTop (𝓝 0) := by simpa using hA0.neg have hBbdd_ge : IsBoundedUnder (· ≥ ·) atTop B := isBoundedUnder_of ⟨0, fun n => (Exp n).jointD.Pr_nonneg _⟩ have hBbdd_le : IsBoundedUnder (· ≤ ·) atTop B := isBoundedUnder_of ⟨1, fun n => (Exp n).jointD.Pr_le_one _⟩ have hnegAbdd_ge : IsBoundedUnder (· ≥ ·) atTop (fun n => -A n) := hnegA.isBoundedUnder_ge have hnegAcobdd : IsCoboundedUnder (· ≥ ·) atTop (fun n => -A n) := hnegA.isBoundedUnder_le.isCoboundedUnder_ge have h := le_liminf_add (u := B) (v := fun n => -A n) hBbdd_ge hBbdd_le hnegAbdd_ge hnegAcobdd rw [hnegA.liminf_eq] at h simp only [add_zero] at h have hsub : (B + fun n => -A n) = fun n => B n - A n := by funext n; simp [sub_eq_add_neg] rwa [hsub] at h -- `liminf (B - A) ≤ liminf I` by pointwise bound. have hABI : liminf (fun n => B n - A n) atTopliminf I atTop := by have hBAbelow : IsBoundedUnder (· ≥ ·) atTop (fun n => B n - A n) := by refine isBoundedUnder_of ⟨-1, fun n => ?_⟩ have hBn : 0 ≤ B n := by rw [hBdef]; exact (Exp n).jointD.Pr_nonneg _ have hAn : A n ≤ 1 := by rw [hAdef]; exact (Exp n).jointD.Pr_le_one _ change (-1 : ℝ) ≤ B n - A n linarith exact Filter.liminf_le_liminf (Filter.Eventually.of_forall hstep2) hBAbelow hIcobdd -- STEP 1 gives `Φ(c) - Φ(-c) ≤ liminf B`. have hstep1 := clt_interval_liminf_lb Exp stud hclt c hc0 -- Chain and rewrite `Φ(c) - Φ(-c) = 2·Φ(c) - 1`. have hΦ : stdNormalCdf c - stdNormalCdf (-c) = 2 * stdNormalCdf c - 1 := by rw [stdNormalCdf_neg c]; ring calc 2 * stdNormalCdf (zq * Real.sqrt (1 - ε)) - 1 = stdNormalCdf c - stdNormalCdf (-c) := by rw [hcdef, hΦ] _ ≤ liminf B atTop := hstep1 _ ≤ liminf (fun n => B n - A n) atTop := hBAliminf _ ≤ liminf I atTop := hABI -- STEP 4: let `ε → 0⁺` along `ε = 1/(k+1)`. The RHS bound tends to `1 - γ`. set g : ℝ → ℝ := fun ε => 2 * stdNormalCdf (zq * Real.sqrt (1 - ε)) - 1 with hgdef have hgcont : Tendsto g (𝓝 0) (𝓝 (1 - γ)) := by have hsqrt : Tendsto (fun ε : ℝ => Real.sqrt (1 - ε)) (𝓝 0) (𝓝 1) := by have : Tendsto (fun ε : ℝ => (1 - ε)) (𝓝 0) (𝓝 (1 - 0)) := (tendsto_const_nhds.sub tendsto_id) rw [sub_zero] at this have hc := (Real.continuous_sqrt.tendsto (1 : ℝ)).comp this rw [Real.sqrt_one] at hc exact hc have hzqsqrt : Tendsto (fun ε : ℝ => zq * Real.sqrt (1 - ε)) (𝓝 0) (𝓝 zq) := by have := tendsto_const_nhds (x := zq) |>.mul hsqrt simpa using this have hΦc : Tendsto (fun ε : ℝ => stdNormalCdf (zq * Real.sqrt (1 - ε))) (𝓝 0) (𝓝 (stdNormalCdf zq)) := (continuous_stdNormalCdf.tendsto zq).comp hzqsqrt have : Tendsto g (𝓝 0) (𝓝 (2 * stdNormalCdf zq - 1)) := by rw [hgdef] exact (tendsto_const_nhds.mul hΦc).sub tendsto_const_nhds have heq : 2 * stdNormalCdf zq - 1 = 1 - γ := by rw [hzq]; ring rwa [heq] at this -- Evaluate along `ε_k = 1/(k+1) → 0`, eventually in `(0,1)`. have hseq : Tendsto (fun k : ℕ => (1 : ℝ) / (k + 1)) atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat have hgseq : Tendsto (fun k : ℕ => g (1 / (k + 1))) atTop (𝓝 (1 - γ)) := hgcont.comp hseq -- `g (1/(k+1)) ≤ liminf I` eventually (for `k ≥ 1`, so `1/(k+1) ≤ 1/2 < 1`). have hev : ∀ᶠ k : ℕ in atTop, g (1 / (k + 1)) ≤ liminf I atTop := by rw [Filter.eventually_atTop] refine ⟨1, fun k hk => ?_⟩ have hk1 : (1 : ℝ) ≤ (k : ℝ) := by exact_mod_cast hk have hden : (0 : ℝ) < (k : ℝ) + 1 := by linarith have hpos : (0 : ℝ) < 1 / (k + 1) := by positivity have hlt1 : (1 : ℝ) / (k + 1) < 1 := by rw [div_lt_one hden]; linarith exact key _ hpos hlt1 exact le_of_tendsto hgseq hev