Experimentation.Unknown­Interference

Formalization of the Bernoulli-design core of Sävje, Aronow & Hudgens (2021), "Average treatment effects in the presence of unknown interference," *Annals of Statistics* 49(2):673–701 (arXiv:1711.06399).

Basic 10 core · 2 supporting The setup for "Average treatment effects in the presence of unknown interference" (Sävje, Aronow & Hudgens, *Annals of Statistics* 49(2), 2021). ★ Interferes★ EATE★ y_eq_of_agree_on_interferers

Sävje–Aronow–Hudgens (2021): EATE estimand and the Horvitz–Thompson estimator

The setup for "Average treatment effects in the presence of unknown interference" (Sävje, Aronow & Hudgens, Annals of Statistics 49(2), 2021). A finite sample of units U is assigned a binary treatment vector z : U → Bool by a randomization design. Each unit's outcome y i z may depend on the entire assignment z — units interfere — but the form of the interference is unknown.

This file fixes the primitives:

* the interference indicator Interferes y ℓ i (changing ℓ's treatment changes i's outcome under some assignment, plus the reflexive case ℓ = i), its symmetric closure InterfDep y i j (some ℓ interferes with both i and j), and the average interference dependence dbar (the paper's d̄, the basis for the "restricted interference" assumption); * the assignment-conditional unit-level effect `tau y i z = y i (z with iᵗʰ coord 1) − y i (z with iᵗʰ coord 0), its average ACATE` (assignment-conditional ATE), and the expected average treatment effect EATE = E[ACATE(Z)] (Definition: the design average of the assignment-conditional ATE); * the Horvitz–Thompson estimator htEst.

The key structural fact proven here is y_eq_of_agree_on_interferers: a unit's outcome depends only on the treatments of the units that interfere with it — the bridge that turns "InterfDep fails" into "the two HT summands depend on disjoint coordinate blocks", which the disjoint-block independence lemma then turns into a vanishing covariance.

def Interferes reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, a potential-outcome schedule, and two units, the potential source unit and the affected unit, the interference indicator holds exactly when the units are identical or there is an assignment under which reversing the source unit's treatment changes the affected unit's outcome.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
ℓ i :
U
Interferes y ℓ i :
Prop
ℓ = i ∨ ∃ z : U → Bool, y i z ≠ y i (update z ℓ (! z ℓ))
Causalean.Experimentation.UnknownInterference.Interferes · Causalean/Experimentation/UnknownInterference/Basic.lean:53
def InterfDep reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, a potential-outcome schedule, and two units, the interference-dependence relation holds exactly when some unit's treatment interferes with both units' outcomes; equivalently, the two outcomes may be affected by a common treatment.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
i j :
U
InterfDep y i j :
Prop
∃ ℓ : U,
clause 1
Interferes y ℓ i
clause 2
Interferes y ℓ j
Causalean.Experimentation.UnknownInterference.InterfDep · Causalean/Experimentation/UnknownInterference/Basic.lean:60
def dbarCount reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units and a potential-outcome schedule, the unnormalized interference-dependence count is the number of ordered pairs of units that are interference dependent.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
dbarCount y :
ℝ
∑ i : U, ∑ j : U, if InterfDep y i j then (1 : ℝ) else 0
Causalean.Experimentation.UnknownInterference.dbarCount · Causalean/Experimentation/UnknownInterference/Basic.lean:68
def dbar reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units and a potential-outcome schedule, the average interference dependence is the unnormalized count of interference-dependent ordered pairs divided by the population size. For a nonempty population it equals one under no interference and the population size when every ordered pair is interference dependent; restricted interference is the condition that it is of smaller order than the population size.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
dbar y :
ℝ
dbarCount y / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.dbar · Causalean/Experimentation/UnknownInterference/Basic.lean:74
def tau reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, a potential-outcome schedule, a unit, and an assignment of treatments to all units, the assignment-conditional unit-level treatment effect is that unit's outcome when its own treatment is set to treated minus its outcome when its own treatment is set to control, with every other unit's assignment held fixed.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
i :
U
z :
U → Bool
tau y i z :
ℝ
y i (update z i true) - y i (update z i false)
Causalean.Experimentation.UnknownInterference.tau · Causalean/Experimentation/UnknownInterference/Basic.lean:108
def ACATE reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, a potential-outcome schedule, and an assignment of treatments to all units, the assignment-conditional average treatment effect is the average, over all units, of their own-treatment effects with the remaining assignments held fixed.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
z :
U → Bool
ACATE y z :
ℝ
(∑ i : U, tau y i z) / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.ACATE · Causalean/Experimentation/UnknownInterference/Basic.lean:115
def EATE reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, a randomization design over treatment assignments, and a potential-outcome schedule, the expected average treatment effect is the design expectation of the assignment-conditional average treatment effect. Under no interference this quantity equals the conventional average treatment effect because the assignment-conditional effect is then constant across assignments.

Definition (Lean source)
U :
Type u_1
shared
D :
y :
U → (U → Bool) → ℝ
EATE D y :
ℝ
D.E (ACATE y)
Causalean.Experimentation.UnknownInterference.EATE · Causalean/Experimentation/UnknownInterference/Basic.lean:122 · uses FiniteDesign
def htSummand reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, marginal treatment probabilities, a potential-outcome schedule, a unit, and a realized treatment assignment, the unit-level Horvitz--Thompson summand is its observed outcome weighted by the reciprocal of its treatment probability if treated, minus the same outcome weighted by the reciprocal of its control probability if untreated.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
i :
U
z :
U → Bool
htSummand p y i z :
ℝ
(if z i then (1 : ℝ) else 0) * y i z / p i
- (if z i then (0 : ℝ) else 1) * y i z / (1 - p i)
Causalean.Experimentation.UnknownInterference.htSummand · Causalean/Experimentation/UnknownInterference/Basic.lean:132
def htEst reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, a potential-outcome schedule, and a realized treatment assignment, the Horvitz--Thompson estimator is the average of the units' treated-minus-control inverse-probability-weighted outcome summands.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
z :
U → Bool
htEst p y z :
ℝ
(∑ i : U, htSummand p y i z) / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.htEst · Causalean/Experimentation/UnknownInterference/Basic.lean:141
theorem y_eq_of_agree_on_interferers reviewed
Causalean.Experimentation.UnknownInterference

A unit's outcome depends only on the units that interfere with it. If two treatment assignments z and z' agree on every unit that interferes with unit i, then unit i's outcome is the same under both assignments: y i z = y i z'.

Formal statement
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
i :
U
z z' :
U → Bool
h :
∀ ℓ : U
if
Interferes y ℓ i
then
z ℓ = z' ℓ
y i z = y i z'
Proof (Lean source)
theorem y_eq_of_agree_on_interferers (y : U → (U → Bool) → ℝ) (i : U) (z z' : U → Bool) (h : ∀ ℓ : U, Interferes y ℓ i → z ℓ = z' ℓ) : y i z = y i z' := by classical letI := ofFinite U -- Auxiliary: changing `z` to `z'` over a finset `S` of differing, non-interfering coordinates. -- We induct on the finset of coordinates where `z` and `z'` differ; `z` is generalized so the -- induction hypothesis applies to the updated assignment `w`. suffices H : ∀ S : Finset U, ∀ z : U → Bool, (∀ ℓ : U, z ℓ ≠ z' ℓ → ℓ ∈ S) → (∀ ℓ ∈ S, z ℓ ≠ z' ℓ → ¬ Interferes y ℓ i) → y i z = y i z' by refine H univ z (fun ℓ _ => Finset.mem_univ ℓ) (fun ℓ _ hne => ?_) intro hint exact hne (h ℓ hint) intro S induction S using Finset.induction with | empty => intro z hsub _ have hzz' : z = z' := by funext ℓ by_contra hne exact (notMem_empty ℓ) (hsub ℓ hne) rw [hzz'] | @insert a S ha ih => intro z hsub hnint -- Define `w`: equal to `z'` at `a`, equal to `z` elsewhere. set w : U → Bool := update z a (z' a) with hw -- Step 1: `y i z = y i w` (flipping the non-interferer coordinate `a`, if `z a ≠ z' a`). have step1 : y i z = y i w := by by_cases hza : z a = z' a · -- `a` not a differing coordinate; `w = z`. have : w = z := by rw [hw]; funext x by_cases hx : x = a · subst hx; rw [Function.update_self, hza] · rw [Function.update_of_ne hx] rw [this] · -- `a` differs, hence `¬ Interferes y a i`; `w = update z a (! z a)`. have haint : ¬ Interferes y a i := hnint a (Finset.mem_insert_self a S) hza have hflip : w = update z a (! z a) := by rw [hw]; congr 1 -- `z' a = ! z a` since they are distinct Bools. cases hzv : z a <;> cases hz'v : z' a <;> simp_all rw [hflip] exact y_update_eq_of_not_interferes haint z -- Step 2: `y i w = y i z'` by induction; `w` and `z'` differ only on `S`. have hsub' : ∀ ℓ : U, w ℓ ≠ z' ℓ → ℓ ∈ S := by intro ℓ hℓ have hℓa : ℓ ≠ a := by rintro rfl; rw [hw, Function.update_self] at hℓ; exact hℓ rfl have : w ℓ = z ℓ := by rw [hw, Function.update_of_ne hℓa] rw [this] at hℓ rcases Finset.mem_insert.mp (hsub ℓ hℓ) with h' | h' · exact absurd h' hℓa · exact h' have hnint' : ∀ ℓ ∈ S, w ℓ ≠ z' ℓ → ¬ Interferes y ℓ i := by intro ℓ hℓS hℓ have hℓa : ℓ ≠ a := fun hh => ha (hh ▸ hℓS) have hwz : w ℓ = z ℓ := by rw [hw, Function.update_of_ne hℓa] rw [hwz] at hℓ exact hnint ℓ (Finset.mem_insert_of_mem hℓS) hℓ rw [step1] exact ih w hsub' hnint'
Causalean.Experimentation.UnknownInterference.y_eq_of_agree_on_interferers · Causalean/Experimentation/UnknownInterference/Basic.lean:172 · uses Interferes
2 supporting declarations (lemmas, instances)
  • one_le_dbar theorem — For a nonempty finite population, average interference dependence is at least one, because every unit is interference-dependent with itself.
    U :
    Type u_1
    shared
    y :
    U → (U → Bool) → ℝ
    hcard :
    1 ≤ card U
    (1 : ℝ) ≤ dbar y
    Proof (Lean source)
    theorem one_le_dbar (y : U → (U → Bool) → ℝ) (hcard : 1 ≤ Fintype.card U) : (1 : ℝ) ≤ dbar y := by classical have hn0 : (0 : ℝ) < (Fintype.card U : ℝ) := by exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hdiag : ∀ i : U, InterfDep y i i := fun i => ⟨i, Or.inl rfl, Or.inl rfl⟩ have hcount : (Fintype.card U : ℝ) ≤ dbarCount y := by rw [dbarCount] calc (Fintype.card U : ℝ) = ∑ _i : U, (1 : ℝ) := by rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, mul_one] _ = ∑ i : U, (if InterfDep y i i then (1 : ℝ) else 0) := by refine Finset.sum_congr rfl (fun i _ => ?_) rw [if_pos (hdiag i)] _ ≤ ∑ i : U, ∑ j : U, (if InterfDep y i j then (1 : ℝ) else 0) := by refine Finset.sum_le_sum (fun i _ => ?_) refine Finset.single_le_sum (f := fun j => if InterfDep y i j then (1 : ℝ) else 0) (fun j _ => ?_) (Finset.mem_univ i) by_cases h : InterfDep y i j <;> simp [h] rw [dbar, le_div_iff₀ hn0, one_mul] exact hcount
    Causalean.Experimentation.UnknownInterference.one_le_dbar · Causalean/Experimentation/UnknownInterference/Basic.lean:82
  • y_update_eq_of_not_interferes lemma — When unit ℓ does not interfere with unit i, flipping ℓ's treatment while holding every other unit's assignment fixed never changes i's realized outcome.
    U :
    Type u_1
    U → (U → Bool) → ℝ
    U
    shared
    h :
    ¬ Interferes y ℓ i
    z :
    U → Bool
    y i z = y i (update z ℓ (! z ℓ))
    Proof (Lean source)
    lemma y_update_eq_of_not_interferes {y : U → (U → Bool) → ℝ} {ℓ i : U} (h : ¬ Interferes y ℓ i) (z : U → Bool) : y i z = y i (update z ℓ (! z ℓ)) := by by_contra hne exact h (inr ⟨z, hne⟩)
    Causalean.Experimentation.UnknownInterference.y_update_eq_of_not_interferes · Causalean/Experimentation/UnknownInterference/Basic.lean:154
Consistency 6 core · 4 supporting Horvitz-Thompson estimates the expected average treatment effect consistently when average interference is sparse. ★ D_E_htEst★ htEst_consistent_eate★ root_n_var

Consistency under unknown interference

Horvitz-Thompson estimates the expected average treatment effect consistently when average interference is sparse.

The SAHExperiment structure packages one Sävje-Aronow-Hudgens Bernoulli experiment, including overlap, moment, and regularity bounds. Exact unbiasedness and the variance bound Var(ĤT) ≤ k^4 * dbar / n give a Chebyshev tail bound. Along a sequence of experiments, this proves convergence in probability whenever that upper bound tends to zero, without requiring the interference graph itself to be known.

The file also records root-n variance control when average interference and the regularity constant are uniformly bounded.

structure SAHExperiment reviewed
Causalean.Experimentation.UnknownInterference

A single Sävje–Aronow–Hudgens Bernoulli experiment, packaged so that a sequence of them models the growing-sample regime. Carries a finite population of units, marginal treatment probabilities, and potential outcomes indexed by the full assignment vector, together with an overlap regularity constant k at least one; the conditions that there is at least one unit, every treatment probability lies between 0 and 1, is bounded below by 1/k and above by 1 − 1/k (overlap); and every unit's potential outcome has second moment at most k² under the resulting Bernoulli design.

Definition (Lean source)
Finite population of units.
U :
Marginal treatment probabilities.
p :
U → ℝ
Potential outcomes `y i z` (unit `i`'s outcome under the full assignment `z`).
y :
U → (U → Bool) → ℝ
Regularity constant.
k :
ℝ
`1 ≤ k`.
hk :
1 ≤ k
At least one unit.
hcard :
1 ≤ card U
Probabilities are in `[0,1]`.
hp0 :
∀ i, 0 ≤ p i
Probabilities are in `[0,1]`.
hp1 :
∀ i, p i ≤ 1
Lower overlap: `k⁻¹ ≤ p i`.
hplo :
∀ i, k⁻¹ ≤ p i
Upper overlap: `p i ≤ 1 − k⁻¹`.
hphi :
∀ i, p i ≤ 1 - k⁻¹
Second-moment bound: `E[Y_i²] ≤ k²`.
hmom :
∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2
Causalean.Experimentation.UnknownInterference.SAHExperiment · Causalean/Experimentation/UnknownInterference/Consistency.lean:41
def D reviewed
Causalean.Experimentation.UnknownInterference.SAHExperiment

For a packaged Sävje--Aronow--Hudgens experiment, the experiment's Bernoulli randomization design independently assigns each unit treatment according to that experiment's stated marginal treatment probabilities.

Definition (Lean source)
E :
shared
D E :
FiniteDesign (E.U → Bool)
DesignBased.bernoulliDesign E.p E.hp0 E.hp1
Causalean.Experimentation.UnknownInterference.SAHExperiment.D · Causalean/Experimentation/UnknownInterference/Consistency.lean:81 · uses FiniteDesign , SAHExperiment
def eate reviewed
Causalean.Experimentation.UnknownInterference.SAHExperiment

For a packaged Sävje--Aronow--Hudgens experiment, the experiment's expected average treatment-effect estimand is the expectation, under its Bernoulli randomization design, of the assignment-conditional average treatment effect determined by its potential outcomes.

Definition (Lean source)
E :
shared
eate E :
ℝ
EATE E.D E.y
Causalean.Experimentation.UnknownInterference.SAHExperiment.eate · Causalean/Experimentation/UnknownInterference/Consistency.lean:86 · uses SAHExperiment
theorem D_E_htEst reviewed
Causalean.Experimentation.UnknownInterference.SAHExperiment

Unbiasedness (bundle form). The Horvitz–Thompson estimator's expectation under the experiment's Bernoulli design equals the experiment's EATE estimand.

Formal statement
E :
shared
E.D.E (htEst E.p E.y) = E.eate
Proof (Lean source)
theorem D_E_htEst : E.D.E (htEst E.p E.y) = E.eate := by change E.D.E (htEst E.p E.y) = EATE E.D E.y unfold SAHExperiment.D rw [htEst_unbiased E.p E.hp0 E.hp1 E.p_ne_zero E.one_sub_p_ne_zero E.y]
Causalean.Experimentation.UnknownInterference.SAHExperiment.D_E_htEst · Causalean/Experimentation/UnknownInterference/Consistency.lean:106 · uses E , SAHExperiment , D , eate , htEst
theorem htEst_consistent_eate reviewed
Causalean.Experimentation.UnknownInterference

Consistency of Horvitz–Thompson for EATE under unknown interference (Sävje–Aronow–Hudgens 2021). Along a sequence of Bernoulli experiments along which k⁴·d̄/n → 0 — restricted interference with a controlled regularity constant, for every fixed deviation threshold ε > 0, the probability that the Horvitz–Thompson estimator deviates from the EATE by at least ε tends to zero along the sequence, i.e. the HT estimator converges in probability to the EATE.

Formal statement
Exp :
hrate :
Tendsto (fun m => (Exp m).k ^ 4 * dbar (Exp m).y / (card (Exp m).U : ℝ)) atTop (𝓝 0)
ε :
ℝ
hε :
0 < ε
Tendsto (fun m => (Exp m).D.Pr (fun z => ε ≤ |htEst (Exp m).p (Exp m).y z - (Exp m).eate|)) atTop (𝓝 0)
Proof (Lean source)
theorem htEst_consistent_eate (Exp : ℕ → SAHExperiment) (hrate : Tendsto (fun m => (Exp m).k ^ 4 * dbar (Exp m).y / (card (Exp m).U : ℝ)) atTop (𝓝 0)) {ε : ℝ} (hε : 0 < ε) : Tendsto (fun m => (Exp m).D.Pr (fun z => ε ≤ |htEst (Exp m).p (Exp m).y z - (Exp m).eate|)) atTop (𝓝 0) := by have hupper : Tendsto (fun m => (Exp m).k ^ 4 * dbar (Exp m).y / (card (Exp m).U : ℝ) / ε ^ 2) atTop (𝓝 0) := by have := hrate.div_const (ε ^ 2) simpa using this refine squeeze_zero (fun m => ?_) (fun m => ?_) hupper · exact (Exp m).D.Pr_nonneg _ · exact (Exp m).chebyshev_eate hε
Causalean.Experimentation.UnknownInterference.htEst_consistent_eate · Causalean/Experimentation/UnknownInterference/Consistency.lean:136 · uses Pr , SAHExperiment , D , eate , dbar , htEst
theorem root_n_var reviewed
Causalean.Experimentation.UnknownInterference

Root-n variance scaling under bounded interference (Sävje–Aronow–Hudgens 2021). In one bundled experiment, if the average interference degree d̄ is bounded above by a constant C, then the sample size n times the variance of the Horvitz–Thompson estimator is at most k⁴·C, where k is the experiment's regularity constant — the finite-sample variance inequality that supports a root-n rate in bounded-interference sequences.

Formal statement
C :
ℝ
hC :
dbar E.y ≤ C
(Fintype.card E.U : ℝ) * E.D.Var (htEst E.p E.y) ≤ E.k ^ 4 * C
Proof (Lean source)
theorem root_n_var (E : SAHExperiment) (C : ℝ) (hC : dbar E.y ≤ C) : (Fintype.card E.U : ℝ) * E.D.Var (htEst E.p E.y) ≤ E.k ^ 4 * C := by have hn : (0 : ℝ) < (Fintype.card E.U : ℝ) := by have : (1 : ℝ) ≤ (Fintype.card E.U : ℝ) := by exact_mod_cast E.hcard linarith have hk4 : (0 : ℝ) ≤ E.k ^ 4 := by positivity have hvar := E.D_Var_htEst_le have hstep : (Fintype.card E.U : ℝ) * E.D.Var (htEst E.p E.y) ≤ (Fintype.card E.U : ℝ) * (E.k ^ 4 * dbar E.y / (Fintype.card E.U : ℝ)) := mul_le_mul_of_nonneg_left hvar (le_of_lt hn) refine le_trans hstep ?_ rw [mul_div_assoc'] rw [mul_comm (Fintype.card E.U : ℝ) (E.k ^ 4 * dbar E.y), mul_div_assoc, div_self (ne_of_gt hn), mul_one] exact mul_le_mul_of_nonneg_left hC hk4
Causalean.Experimentation.UnknownInterference.root_n_var · Causalean/Experimentation/UnknownInterference/Consistency.lean:156 · uses Var , SAHExperiment , D , dbar , htEst
4 supporting declarations (lemmas, instances)
  • p_ne_zero lemma — The treatment probabilities are nonzero (from lower overlap).
    E :
    shared
    i :
    E.U
    E.p i ≠ 0
    Proof (Lean source)
    lemma p_ne_zero (i : E.U) : E.p i ≠ 0 := by have hkpos : (0 : ℝ) < E.k := lt_of_lt_of_le zero_lt_one E.hk have : (0 : ℝ) < E.p i := lt_of_lt_of_le (by positivity) (E.hplo i) exact ne_of_gt this
    Causalean.Experimentation.UnknownInterference.SAHExperiment.p_ne_zero · Causalean/Experimentation/UnknownInterference/Consistency.lean:91
  • one_sub_p_ne_zero lemma — One minus the treatment probability is nonzero (from upper overlap).
    E :
    shared
    i :
    E.U
    (1 : ℝ) - E.p i ≠ 0
    Proof (Lean source)
    lemma one_sub_p_ne_zero (i : E.U) : (1 : ℝ) - E.p i ≠ 0 := by have hkpos : (0 : ℝ) < E.k := lt_of_lt_of_le zero_lt_one E.hk have hkinv : (0 : ℝ) < E.k⁻¹ := by positivity have : (0 : ℝ) < 1 - E.p i := by have := E.hphi i linarith exact ne_of_gt this
    Causalean.Experimentation.UnknownInterference.SAHExperiment.one_sub_p_ne_zero · Causalean/Experimentation/UnknownInterference/Consistency.lean:97
  • D_Var_htEst_le theorem — Variance bound (bundle form). The Horvitz–Thompson estimator's variance is at most the fourth power of the regularity constant times the average interference degree, divided by the population size.
    E :
    shared
    E.D.Var (htEst E.p E.y) ≤ E.k ^ 4 * dbar E.y / (Fintype.card E.U : ℝ)
    Proof (Lean source)
    theorem D_Var_htEst_le : E.D.Var (htEst E.p E.y) ≤ E.k ^ 4 * dbar E.y / (Fintype.card E.U : ℝ) := by unfold SAHExperiment.D exact var_htEst_le E.p E.hp0 E.hp1 E.y E.k E.hk E.hcard E.hplo E.hphi E.hmom
    Causalean.Experimentation.UnknownInterference.SAHExperiment.D_Var_htEst_le · Causalean/Experimentation/UnknownInterference/Consistency.lean:113
  • chebyshev_eate theorem — Chebyshev tail bound. For any deviation threshold ε > 0, the probability that the Horvitz–Thompson estimator deviates from the EATE by at least ε is at most (k⁴·d̄/n)/ε², where k is the experiment's regularity constant, d̄ is the average interference degree, and n is the population size.
    E :
    shared
    ε :
    ℝ
    hε :
    0 < ε
    E.D.Pr (fun z => ε ≤ |htEst E.p E.y z - E.eate|)
    ≤ (E.k ^ 4 * dbar E.y / (Fintype.card E.U : ℝ)) / ε ^ 2
    Proof (Lean source)
    theorem chebyshev_eate {ε : ℝ} (hε : 0 < ε) : E.D.Pr (fun z => ε ≤ |htEst E.p E.y z - E.eate|) ≤ (E.k ^ 4 * dbar E.y / (Fintype.card E.U : ℝ)) / ε ^ 2 := by have hcheb := FiniteDesign.chebyshev E.D (htEst E.p E.y) hε rw [E.D_E_htEst] at hcheb have hε2 : (0 : ℝ) < ε ^ 2 := pow_pos hε 2 refine le_trans hcheb ?_ exact div_le_div_of_nonneg_right E.D_Var_htEst_le hε2.le
    Causalean.Experimentation.UnknownInterference.SAHExperiment.chebyshev_eate · Causalean/Experimentation/UnknownInterference/Consistency.lean:121
Confidence 5 core · 1 supporting Under unknown interference, off-diagonal covariance can make the conventional Horvitz–Thompson variance estimator anti-conservative. ★ E_VhatBer_bias★ var_htEst_le_inflated★ eate_ci_kbound

Confidence under unknown interference

Under unknown interference, off-diagonal covariance can make the conventional Horvitz–Thompson variance estimator anti-conservative. This file gives its exact finite-sample expectation-bias identity and proves that degree-based inflation is conservative in expectation when every unit has bounded interference degree.

The confidence results use Chebyshev's inequality rather than a normal approximation. Any positive deterministic upper bound on the estimator variance yields a finite-sample interval with coverage at least 1 − α; the final theorem uses the bound k^4 * dbar / n. These results do not claim that a data-dependent variance estimator is asymptotically conservative in probability, which would additionally require concentration of that estimator.

def VhatBer reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, a potential-outcome schedule, and a realized treatment assignment, the conventional Horvitz--Thompson variance estimator is the population-size-squared-normalized sum of squared unit-level Horvitz--Thompson summands. Pointwise it equals the sum of the treated and control squared inverse-probability-weighted outcome terms because their cross product is zero.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
z :
U → Bool
VhatBer p y z :
ℝ
(∑ i, (htSummand p y i z) ^ 2) / (Fintype.card U : ℝ) ^ 2
Causalean.Experimentation.UnknownInterference.VhatBer · Causalean/Experimentation/UnknownInterference/Confidence.lean:39
def degDep reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, a potential-outcome schedule, and a unit, the interference degree is the number of units that are interference dependent with that unit.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
i :
U
degDep y i :
ℝ
∑ j, if InterfDep y i j then (1 : ℝ) else 0
Causalean.Experimentation.UnknownInterference.degDep · Causalean/Experimentation/UnknownInterference/Confidence.lean:49
theorem E_VhatBer_bias reviewed
Causalean.Experimentation.UnknownInterference

The anti-conservativeness mechanism (Sävje–Aronow–Hudgens 2021). Under the Bernoulli design with per-unit treatment probabilities p taking values in [0, 1], the conventional variance estimator's expected value equals Var(ĤT) + n⁻²·(∑ᵢ(E ĤTᵢ)² − ∑ᵢ∑_{j≠i} Cov(ĤTᵢ,ĤTⱼ)): the true sampling variance of the Horvitz–Thompson estimator, plus the average squared per-unit mean, minus the off-diagonal covariances between units' Horvitz–Thompson summands.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
y :
U → (U → Bool) → ℝ
(DesignBased.bernoulliDesign p hp0 hp1).E (VhatBer p y)
= (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y)
+ (∑ i, ((DesignBased.bernoulliDesign p hp0 hp1).E (htSummand p y i)) ^ 2 - ∑ i, ∑ j ∈ Finset.univ.erase i, (DesignBased.bernoulliDesign p hp0 hp1).Cov (htSummand p y i) (htSummand p y j)) / (Fintype.card U : ℝ) ^ 2
Proof (Lean source)
theorem E_VhatBer_bias (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) : (DesignBased.bernoulliDesign p hp0 hp1).E (VhatBer p y) = (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y) + (∑ i, ((DesignBased.bernoulliDesign p hp0 hp1).E (htSummand p y i)) ^ 2 - ∑ i, ∑ j ∈ Finset.univ.erase i, (DesignBased.bernoulliDesign p hp0 hp1).Cov (htSummand p y i) (htSummand p y j)) / (Fintype.card U : ℝ) ^ 2 := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn rw [E_VhatBer_eq p hp0 hp1 y, Var_htEst_eq p hp0 hp1 y] -- `E[ĤTᵢ²] = Var(ĤTᵢ) + (E ĤTᵢ)²`. have hsq : ∀ i, D.E (fun z => (htSummand p y i z) ^ 2) = D.Var (htSummand p y i) + (D.E (htSummand p y i)) ^ 2 := by intro i; rw [D.Var_eq]; ring -- Split the inner full sum into the diagonal `Var` + the off-diagonal covariances. have hsplit : ∀ i, ∑ j, D.Cov (htSummand p y i) (htSummand p y j) = D.Var (htSummand p y i) + ∑ j ∈ Finset.univ.erase i, D.Cov (htSummand p y i) (htSummand p y j) := by intro i rw [← Finset.add_sum_erase univ (fun j => D.Cov (htSummand p y i) (htSummand p y j)) (Finset.mem_univ i)] rw [D.Cov_self] -- Rewrite both numerators. rw [Finset.sum_congr rfl (fun i _ => hsq i)] rw [Finset.sum_congr rfl (fun i _ => hsplit i)] -- Now both sides are sums divided by `n²`; collect over `n²`. rw [Finset.sum_add_distrib, Finset.sum_add_distrib] rcases eq_or_ne (n ^ 2) 0 with h0 | h0 · have : (Fintype.card U : ℝ) ^ 2 = 0 := by rw [← hn]; exact h0 rw [this]; simp · field_simp ring
theorem var_htEst_le_inflated reviewed
Causalean.Experimentation.UnknownInterference

Conservative inflation (Sävje–Aronow–Hudgens 2021). Under the Bernoulli design with per-unit treatment probabilities p taking values in [0, 1], if every unit's interference degree — the number of units it is interference-dependent with — is at most a bound D, then inflating the conventional variance estimator's expectation by a factor 1 + D gives a conservative bound on the Horvitz–Thompson estimator's true variance: Var(ĤT) ≤ (1 + D)·E[V̂_Ber].

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
y :
U → (U → Bool) → ℝ
D :
ℝ
hD :
∀ i, degDep y i ≤ D
(DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y)
≤ (1 + D) * (DesignBased.bernoulliDesign p hp0 hp1).E (VhatBer p y)
Proof (Lean source)
theorem var_htEst_le_inflated (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) (D : ℝ) (hD : ∀ i, degDep y i ≤ D) : (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y) ≤ (1 + D) * (DesignBased.bernoulliDesign p hp0 hp1).E (VhatBer p y) := by classical set Des := DesignBased.bernoulliDesign p hp0 hp1 with hDes set n : ℝ := (Fintype.card U : ℝ) with hn -- Abbreviation for `E[ĤTᵢ²]`, and its key facts. set Ec : U → ℝ := fun i => Des.E (fun z => (htSummand p y i z) ^ 2) with hEc have hEc_nonneg : ∀ i, 0 ≤ Ec i := fun i => Des.E_nonneg (fun _ => sq_nonneg _) have hVar_le : ∀ i, Des.Var (htSummand p y i) ≤ Ec i := by intro i; rw [Des.Var_eq]; have := sq_nonneg (Des.E (htSummand p y i)); linarith -- Symmetry of interference dependence. have hsymm : ∀ i j, InterfDep y i j → InterfDep y j i := by rintro i j ⟨ℓ, h1, h2⟩; exact ⟨ℓ, h2, h1⟩ -- Diagonal extraction: `∑ⱼ Cov(i,j) = Var(i) + ∑_{j≠i} Cov(i,j)`. have hsplit : ∀ i, ∑ j, Des.Cov (htSummand p y i) (htSummand p y j) = Des.Var (htSummand p y i) + ∑ j ∈ Finset.univ.erase i, Des.Cov (htSummand p y i) (htSummand p y j) := by intro i rw [← Finset.add_sum_erase univ (fun j => Des.Cov (htSummand p y i) (htSummand p y j)) (Finset.mem_univ i), Des.Cov_self] -- Off-diagonal covariance bound: `Cov(i,j) ≤ (Eᵢ+Eⱼ)/2` when dependent, `= 0` otherwise. have hcov_le : ∀ i j, Des.Cov (htSummand p y i) (htSummand p y j) ≤ (if InterfDep y i j then (Ec i + Ec j) / 2 else 0) := by intro i j by_cases hdep : InterfDep y i j · rw [if_pos hdep] have hVsub : 0 ≤ Des.Var (fun z => htSummand p y i z - htSummand p y j z) := Des.E_nonneg (fun _ => sq_nonneg _) rw [Des.Var_sub] at hVsub have hi := hVar_le i; have hj := hVar_le j; linarith · rw [if_neg hdep] exact le_of_eq (cov_htSummand_zero p hp0 hp1 y hdep) -- Off-diagonal double sum ≤ the `(Eᵢ+Eⱼ)/2` bound. have hoff_le : (∑ i, ∑ j ∈ Finset.univ.erase i, Des.Cov (htSummand p y i) (htSummand p y j)) ≤ ∑ i, ∑ j ∈ Finset.univ.erase i, (if InterfDep y i j then (Ec i + Ec j) / 2 else 0) := Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hcov_le i j)) -- Extend `erase i` to `univ` (nonneg terms). have hext : (∑ i, ∑ j ∈ Finset.univ.erase i, (if InterfDep y i j then (Ec i + Ec j) / 2 else 0)) ≤ ∑ i, ∑ j, (if InterfDep y i j then (Ec i + Ec j) / 2 else 0) := by refine Finset.sum_le_sum (fun i _ => ?_) refine Finset.sum_le_sum_of_subset_of_nonneg (Finset.erase_subset i univ) ?_ intro j _ _; by_cases hdep : InterfDep y i j · rw [if_pos hdep]; have := hEc_nonneg i; have := hEc_nonneg j; linarith · rw [if_neg hdep] -- Split the full double sum into `(S1 + S2)/2`. have hsplit2 : (∑ i, ∑ j, (if InterfDep y i j then (Ec i + Ec j) / 2 else 0)) = ((∑ i, ∑ j, (if InterfDep y i j then Ec i else 0)) + ∑ i, ∑ j, (if InterfDep y i j then Ec j else 0)) / 2 := by rw [← Finset.sum_add_distrib, Finset.sum_div] refine Finset.sum_congr rfl (fun i _ => ?_) rw [← Finset.sum_add_distrib, Finset.sum_div] refine Finset.sum_congr rfl (fun j _ => ?_) by_cases hdep : InterfDep y i j <;> simp [hdep] -- `S1 = ∑ᵢ Eᵢ·degDep i ≤ D·∑ᵢ Eᵢ`. have hS1 : (∑ i, ∑ j, (if InterfDep y i j then Ec i else 0)) ≤ D * ∑ i, Ec i := by have hrw : (∑ i, ∑ j, (if InterfDep y i j then Ec i else 0)) = ∑ i, Ec i * degDep y i := by refine Finset.sum_congr rfl (fun i _ => ?_) rw [degDep, Finset.mul_sum] refine Finset.sum_congr rfl (fun j _ => ?_) by_cases hdep : InterfDep y i j <;> simp [hdep] rw [hrw, Finset.mul_sum] refine Finset.sum_le_sum (fun i _ => ?_) rw [mul_comm (Ec i)] exact mul_le_mul_of_nonneg_right (hD i) (hEc_nonneg i) -- `S2`: swap order, use symmetry, same bound. have hS2 : (∑ i, ∑ j, (if InterfDep y i j then Ec j else 0)) ≤ D * ∑ i, Ec i := by rw [Finset.sum_comm] have hrw : (∑ j, ∑ i, (if InterfDep y i j then Ec j else 0)) = ∑ j, Ec j * degDep y j := by refine Finset.sum_congr rfl (fun j _ => ?_) rw [degDep, Finset.mul_sum] refine Finset.sum_congr rfl (fun i _ => ?_) by_cases hdep : InterfDep y j i · rw [if_pos (hsymm j i hdep), if_pos hdep, mul_one] · rw [if_neg (fun hc => hdep (hsymm i j hc)), if_neg hdep, mul_zero] rw [hrw, Finset.mul_sum] refine Finset.sum_le_sum (fun j _ => ?_) rw [mul_comm (Ec j)] exact mul_le_mul_of_nonneg_right (hD j) (hEc_nonneg j) -- Off-diagonal ≤ D·∑ᵢ Eᵢ. have hoff_D : (∑ i, ∑ j ∈ Finset.univ.erase i, Des.Cov (htSummand p y i) (htSummand p y j)) ≤ D * ∑ i, Ec i := by calc (∑ i, ∑ j ∈ Finset.univ.erase i, Des.Cov (htSummand p y i) (htSummand p y j)) ≤ ∑ i, ∑ j, (if InterfDep y i j then (Ec i + Ec j) / 2 else 0) := le_trans hoff_le hext _ = ((∑ i, ∑ j, (if InterfDep y i j then Ec i else 0)) + ∑ i, ∑ j, (if InterfDep y i j then Ec j else 0)) / 2 := hsplit2 _ ≤ D * ∑ i, Ec i := by linarith [hS1, hS2] -- Whole double sum ≤ (1+D)·∑ᵢ Eᵢ. have hdouble : (∑ i, ∑ j, Des.Cov (htSummand p y i) (htSummand p y j)) ≤ (1 + D) * ∑ i, Ec i := by rw [Finset.sum_congr rfl (fun i _ => hsplit i), Finset.sum_add_distrib] have hdiag : (∑ i, Des.Var (htSummand p y i)) ≤ ∑ i, Ec i := Finset.sum_le_sum (fun i _ => hVar_le i) have hexp : (1 + D) * ∑ i, Ec i = (∑ i, Ec i) + D * ∑ i, Ec i := by ring rw [hexp]; linarith [hdiag, hoff_D] -- Divide by `n²`. rw [Var_htEst_eq p hp0 hp1 y, E_VhatBer_eq p hp0 hp1 y, ← hEc, ← hn, ← mul_div_assoc] gcongr
Causalean.Experimentation.UnknownInterference.var_htEst_le_inflated · Causalean/Experimentation/UnknownInterference/Confidence.lean:128 · uses E , Var , bernoulliDesign , VhatBer , degDep , htEst
theorem eate_ci_kbound reviewed
Causalean.Experimentation.UnknownInterference

A concrete finite-sample confidence interval for EATE (Sävje–Aronow–Hudgens 2021). Suppose the Bernoulli design has treatment probabilities p that lie in [0, 1], are never exactly zero or one, and in fact stay within [1/k, 1 - 1/k] for some regularity constant k ≥ 1; suppose also that the population is nonempty, every unit's outcome has second moment at most k², and the analyst supplies an upper bound D₀ on the average interference degree, while the significance level α is positive. Then the Chebyshev interval ĤT ± √(k⁴·D₀/(n·α)), where n is the population size, covers the EATE estimand with probability at least 1 − α — a valid (conservative) interval that needs only the regularity constant k and the supplied interference bound D₀.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
hp0' :
∀ i, p i ≠ 0
hp1' :
∀ i, (1 : ℝ) - p i ≠ 0
y :
U → (U → Bool) → ℝ
k :
ℝ
hk :
1 ≤ k
hcard :
1 ≤ Fintype.card U
hplo :
∀ i, k⁻¹ ≤ p i
hphi :
∀ i, p i ≤ 1 - k⁻¹
hmom :
∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2
D₀ :
ℝ
hD₀ :
dbar y ≤ D₀
α :
ℝ
hα :
0 < α
1 - α
≤ (DesignBased.bernoulliDesign p hp0 hp1).Pr (fun z => |htEst p y z - EATE (DesignBased.bernoulliDesign p hp0 hp1) y| ≤ sqrt (k ^ 4 * D₀ / ((Fintype.card U : ℝ) * α)))
Proof (Lean source)
theorem eate_ci_kbound (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hplo : ∀ i, k⁻¹ ≤ p i) (hphi : ∀ i, p i ≤ 1 - k⁻¹) (hmom : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2) (D₀ : ℝ) (hD₀ : dbar y ≤ D₀) {α : ℝ} (hα : 0 < α) : 1 - α ≤ (DesignBased.bernoulliDesign p hp0 hp1).Pr (fun z => |htEst p y z - EATE (DesignBased.bernoulliDesign p hp0 hp1) y| ≤ sqrt (k ^ 4 * D₀ / ((Fintype.card U : ℝ) * α))) := by classical set V : ℝ := k ^ 4 * D₀ / (Fintype.card U : ℝ) with hVdef have hn0 : (0 : ℝ) < (Fintype.card U : ℝ) := by exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hk0 : (0 : ℝ) < k := lt_of_lt_of_le zero_lt_one hk have hdbar1 : 1 ≤ dbar y := one_le_dbar y hcard have hdbar0 : 0 < dbar y := lt_of_lt_of_le zero_lt_one hdbar1 have hD₀0 : 0 < D₀ := lt_of_lt_of_le hdbar0 hD₀ have hV0 : 0 < V := by rw [hVdef]; positivity have hVraw := var_htEst_le p hp0 hp1 y k hk hcard hplo hphi hmom have hV : (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y) ≤ V := by refine hVraw.trans ?_ rw [hVdef] exact div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left hD₀ (by positivity)) hn0.le have hci := chebyshev_ci_eate p hp0 hp1 hp0' hp1' y hV0 hV hα -- The interval radius matches: √(V/α) = √(k⁴·D₀/(n·α)). have harg : V / α = k ^ 4 * D₀ / ((Fintype.card U : ℝ) * α) := by rw [hVdef, div_div] rw [harg] at hci exact hci
Causalean.Experimentation.UnknownInterference.eate_ci_kbound · Causalean/Experimentation/UnknownInterference/Confidence.lean:295 · uses E , Pr , bernoulliDesign , EATE , dbar , htEst
1 supporting declaration (lemmas, instances)
  • chebyshev_ci_eate theorem — Chebyshev confidence interval for EATE. For the Bernoulli design with per-unit treatment probabilities p that take values in [0, 1] and are never exactly zero or one, for any value V that is positive and bounds the Horvitz–Thompson estimator's true sampling variance from above, and for any positive significance level α, the interval ĤT ± √(V/α) covers the EATE estimand with probability at least 1 − α.
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    hp0' :
    ∀ i, p i ≠ 0
    hp1' :
    ∀ i, (1 : ℝ) - p i ≠ 0
    y :
    U → (U → Bool) → ℝ
    V α :
    ℝ
    hV0 :
    0 < V
    hV :
    (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y) ≤ V
    hα :
    0 < α
    1 - α
    ≤ (DesignBased.bernoulliDesign p hp0 hp1).Pr (fun z => |htEst p y z - EATE (DesignBased.bernoulliDesign p hp0 hp1) y| ≤ sqrt (V / α))
    Proof (Lean source)
    theorem chebyshev_ci_eate (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (y : U → (U → Bool) → ℝ) {V α : ℝ} (hV0 : 0 < V) (hV : (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y) ≤ V) (hα : 0 < α) : 1 - α ≤ (DesignBased.bernoulliDesign p hp0 hp1).Pr (fun z => |htEst p y z - EATE (DesignBased.bernoulliDesign p hp0 hp1) y| ≤ sqrt (V / α)) := by classical set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set t : ℝ := sqrt (V / α) with ht have hVα : 0 < V / α := div_pos hV0 hα have ht0 : 0 < t := Real.sqrt_pos.mpr hVα have ht2 : t ^ 2 = V / α := by rw [ht, Real.sq_sqrt (le_of_lt hVα)] have hμ : D.E (htEst p y) = EATE D y := htEst_unbiased p hp0 hp1 hp0' hp1' y -- Chebyshev: Pr(t ≤ |htEst - EATE|) ≤ Var / t² have hcheb := D.chebyshev (htEst p y) ht0 rw [hμ] at hcheb set A : (U → Bool) → Prop := fun z => |htEst p y z - EATE D y| ≤ t with hA set B : (U → Bool) → Prop := fun z => t ≤ |htEst p y z - EATE D y| with hB -- Pr B ≤ α. have hVt : D.Var (htEst p y) / t ^ 2 ≤ α := by rw [ht2] have hstep : D.Var (htEst p y) / (V / α) ≤ V / (V / α) := div_le_div_of_nonneg_right hV (by positivity) have hVdiv : V / (V / α) = α := by field_simp rw [hVdiv] at hstep; exact hstep have hPrB : D.Pr B ≤ α := le_trans hcheb hVt -- A and B cover everything: ind A + ind B ≥ 1 pointwise. have hcover : ∀ z, (1 : ℝ) ≤ FiniteDesign.ind A z + FiniteDesign.ind B z := by intro z rcases le_total (|htEst p y z - EATE D y|) t with h | h · have hi : FiniteDesign.ind A z = 1 := by unfold FiniteDesign.ind A; simp [h] have hBn : 0 ≤ FiniteDesign.ind B z := FiniteDesign.ind_nonneg B z rw [hi]; linarith · have hi : FiniteDesign.ind B z = 1 := by unfold FiniteDesign.ind B; simp [h] have hAn : 0 ≤ FiniteDesign.ind A z := FiniteDesign.ind_nonneg A z rw [hi]; linarith -- 1 = E[1] ≤ E[ind A + ind B] = Pr A + Pr B. have h1le : (1 : ℝ) ≤ D.Pr A + D.Pr B := by have hEmono : D.E (fun _ => (1 : ℝ)) ≤ D.E (fun z => FiniteDesign.ind A z + FiniteDesign.ind B z) := by unfold FiniteDesign.E exact Finset.sum_le_sum (fun z _ => mul_le_mul_of_nonneg_left (hcover z) (D.p_nonneg z)) rw [D.E_const, D.E_add] at hEmono change (1 : ℝ) ≤ D.E (FiniteDesign.ind A) + D.E (FiniteDesign.ind B) exact hEmono linarith [hPrB, h1le]
    Causalean.Experimentation.UnknownInterference.chebyshev_ci_eate · Causalean/Experimentation/UnknownInterference/Confidence.lean:242
Hajek 10 core · 9 supporting The Hájek estimator normalizes treated and control inverse-probability-weighted outcome sums by their realized weight sums rather than by population size. ★ hajekEst★ hajek_consistent_eate

Hájek estimation under unknown interference

The Hájek estimator normalizes treated and control inverse-probability-weighted outcome sums by their realized weight sums rather than by population size. This file defines the treated and control numerators and denominators and proves their mean and variance controls under Bernoulli assignment.

Under vanishing interference variance, the two numerators converge to their population targets and the two weight denominators converge to one. A finite-design Slutsky argument then gives consistency for the Sävje-Aronow-Hudgens expected average treatment effect. The result also assumes uniform regularity and absolute potential-outcome moment bounds needed to control the ratio limits.

def htTreatSummand reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, marginal treatment probabilities, a potential-outcome schedule, a unit, and a realized treatment assignment, the treated Horvitz--Thompson summand is that unit's observed outcome multiplied by its treatment indicator and divided by its treatment probability.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
i :
U
z :
U → Bool
htTreatSummand p y i z :
ℝ
(if z i then (1 : ℝ) else 0) * y i z / p i
Causalean.Experimentation.UnknownInterference.htTreatSummand · Causalean/Experimentation/UnknownInterference/Hajek.lean:42
def htCtrlSummand reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, marginal treatment probabilities, a potential-outcome schedule, a unit, and a realized treatment assignment, the control Horvitz--Thompson summand is that unit's observed outcome multiplied by its control indicator and divided by its control probability.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
i :
U
z :
U → Bool
htCtrlSummand p y i z :
ℝ
(if z i then (0 : ℝ) else 1) * y i z / (1 - p i)
Causalean.Experimentation.UnknownInterference.htCtrlSummand · Causalean/Experimentation/UnknownInterference/Hajek.lean:49
def weightTreatSummand reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, marginal treatment probabilities, a unit, and a realized treatment assignment, the treated inverse-probability weight summand is the unit's treatment indicator divided by its treatment probability.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
i :
U
z :
U → Bool
weightTreatSummand p i z :
ℝ
(if z i then (1 : ℝ) else 0) / p i
Causalean.Experimentation.UnknownInterference.weightTreatSummand · Causalean/Experimentation/UnknownInterference/Hajek.lean:56
def weightCtrlSummand reviewed
Causalean.Experimentation.UnknownInterference

For a population of units, marginal treatment probabilities, a unit, and a realized treatment assignment, the control inverse-probability weight summand is the unit's control indicator divided by its control probability.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
i :
U
z :
U → Bool
weightCtrlSummand p i z :
ℝ
(if z i then (0 : ℝ) else 1) / (1 - p i)
Causalean.Experimentation.UnknownInterference.weightCtrlSummand · Causalean/Experimentation/UnknownInterference/Hajek.lean:62
def AhatTreat reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, a potential-outcome schedule, and a realized treatment assignment, the treated numerator average is the population average of the treated Horvitz--Thompson summands.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
z :
U → Bool
AhatTreat p y z :
ℝ
(∑ i, htTreatSummand p y i z) / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.AhatTreat · Causalean/Experimentation/UnknownInterference/Hajek.lean:68
def AhatCtrl reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, a potential-outcome schedule, and a realized treatment assignment, the control numerator average is the population average of the control Horvitz--Thompson summands.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
z :
U → Bool
AhatCtrl p y z :
ℝ
(∑ i, htCtrlSummand p y i z) / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.AhatCtrl · Causalean/Experimentation/UnknownInterference/Hajek.lean:74
def BhatTreat reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, and a realized treatment assignment, the treated weight average is the population average of the treated inverse-probability weight summands.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
z :
U → Bool
BhatTreat p z :
ℝ
(∑ i, weightTreatSummand p i z) / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.BhatTreat · Causalean/Experimentation/UnknownInterference/Hajek.lean:80
def BhatCtrl reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, and a realized treatment assignment, the control weight average is the population average of the control inverse-probability weight summands.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
z :
U → Bool
BhatCtrl p z :
ℝ
(∑ i, weightCtrlSummand p i z) / (Fintype.card U : ℝ)
Causalean.Experimentation.UnknownInterference.BhatCtrl · Causalean/Experimentation/UnknownInterference/Hajek.lean:86
def hajekEst reviewed
Causalean.Experimentation.UnknownInterference

For a finite population of units, marginal treatment probabilities, a potential-outcome schedule, and a realized treatment assignment, the Hájek estimator is the treated numerator average divided by the treated weight average, minus the control numerator average divided by the control weight average.

Definition (Lean source)
U :
Type u_1
shared
p :
U → ℝ
y :
U → (U → Bool) → ℝ
z :
U → Bool
hajekEst p y z :
ℝ
AhatTreat p y z / BhatTreat p z - AhatCtrl p y z / BhatCtrl p z
Causalean.Experimentation.UnknownInterference.hajekEst · Causalean/Experimentation/UnknownInterference/Hajek.lean:92
theorem hajek_consistent_eate reviewed
Causalean.Experimentation.UnknownInterference

Consistency of the Hájek estimator for EATE (Sävje–Aronow–Hudgens 2021). Along a sequence of Bernoulli experiments for which the regularity constants are uniformly bounded above by a constant M, k⁴·d̄/n → 0 along the sequence — restricted interference, and the mean absolute treated and control potential outcomes are each bounded by that experiment's own regularity constant k (the paper's Assumption C), the Hájek estimator converges in probability to the EATE.

Formal statement
Exp :
M :
ℝ
hM :
∀ m, (Exp m).k ≤ M
hrate :
Tendsto (fun m => (Exp m).k ^ 4 * dbar (Exp m).y / (card (Exp m).U : ℝ)) atTop (𝓝 0)
hpo1 :
∀ m i, (Exp m).D.E (fun z => |(Exp m).y i (update z i true)|) ≤ (Exp m).k
hpo0 :
∀ m i, (Exp m).D.E (fun z => |(Exp m).y i (update z i false)|) ≤ (Exp m).k
FiniteDesign.TendstoInProb (fun m => (Exp m).D) (fun m => hajekEst (Exp m).p (Exp m).y) (fun m => (Exp m).eate)
Proof (Lean source)
theorem hajek_consistent_eate (Exp : ℕ → SAHExperiment) (M : ℝ) (hM : ∀ m, (Exp m).k ≤ M) (hrate : Tendsto (fun m => (Exp m).k ^ 4 * dbar (Exp m).y / (card (Exp m).U : ℝ)) atTop (𝓝 0)) (hpo1 : ∀ m i, (Exp m).D.E (fun z => |(Exp m).y i (update z i true)|) ≤ (Exp m).k) (hpo0 : ∀ m i, (Exp m).D.E (fun z => |(Exp m).y i (update z i false)|) ≤ (Exp m).k) : FiniteDesign.TendstoInProb (fun m => (Exp m).D) (fun m => hajekEst (Exp m).p (Exp m).y) (fun m => (Exp m).eate) := by set D : ∀ m, FiniteDesign ((Exp m).U → Bool) := fun m => (Exp m).D with hDdef -- The numerator means (limit sequences for `Â₁`, `Â₀`). set ybar1 : ℕ → ℝ := fun m => (D m).E (AhatTreat (Exp m).p (Exp m).y) with hybar1 set ybar0 : ℕ → ℝ := fun m => (D m).E (AhatCtrl (Exp m).p (Exp m).y) with hybar0 -- Unfold `D m` to the underlying Bernoulli design. have hDm : ∀ m, D m = DesignBased.bernoulliDesign (Exp m).p (Exp m).hp0 (Exp m).hp1 := by intro m; simp only [hDdef, SAHExperiment.D] -- (A) Variance → 0 facts. have hvarA1 : Tendsto (fun m => (D m).Var (AhatTreat (Exp m).p (Exp m).y)) atTop (𝓝 0) := by refine squeeze_zero (fun m => (D m).Var_nonneg _) (fun m => ?_) hrate rw [hDm m] exact var_AhatTreat_le (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).y (Exp m).k (Exp m).hk (Exp m).hcard (Exp m).hplo (Exp m).hmom have hvarA0 : Tendsto (fun m => (D m).Var (AhatCtrl (Exp m).p (Exp m).y)) atTop (𝓝 0) := by refine squeeze_zero (fun m => (D m).Var_nonneg _) (fun m => ?_) hrate rw [hDm m] exact var_AhatCtrl_le (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).y (Exp m).k (Exp m).hk (Exp m).hcard (Exp m).hphi (Exp m).hmom -- The `k²/n ≤ k⁴·d̄/n` squeeze for the weight variances. have hweightle : ∀ m, (Exp m).k ^ 2 / (card (Exp m).U : ℝ) ≤ (Exp m).k ^ 4 * dbar (Exp m).y / (card (Exp m).U : ℝ) := by intro m have hn0 : (0 : ℝ) < (card (Exp m).U : ℝ) := by exact_mod_cast lt_of_lt_of_le zero_lt_one (Exp m).hcard apply div_le_div_of_nonneg_right _ hn0.le have hk1 : (1 : ℝ) ≤ (Exp m).k := (Exp m).hk have hd1 : (1 : ℝ) ≤ dbar (Exp m).y := one_le_dbar (Exp m).y (Exp m).hcard have hk2 : (1 : ℝ) ≤ (Exp m).k ^ 2 := by nlinarith [hk1] have hk4 : (Exp m).k ^ 2 ≤ (Exp m).k ^ 4 := by nlinarith [hk1, hk2] have hstep : (Exp m).k ^ 4 ≤ (Exp m).k ^ 4 * dbar (Exp m).y := by nlinarith [hd1, pow_nonneg (le_trans zero_le_one hk1) 4] linarith have hvarB1 : Tendsto (fun m => (D m).Var (BhatTreat (Exp m).p)) atTop (𝓝 0) := by refine squeeze_zero (fun m => (D m).Var_nonneg _) (fun m => ?_) hrate refine le_trans ?_ (hweightle m) rw [hDm m] exact var_BhatTreat_le (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).k (Exp m).hk (Exp m).hcard (Exp m).hplo have hvarB0 : Tendsto (fun m => (D m).Var (BhatCtrl (Exp m).p)) atTop (𝓝 0) := by refine squeeze_zero (fun m => (D m).Var_nonneg _) (fun m => ?_) hrate refine le_trans ?_ (hweightle m) rw [hDm m] exact var_BhatCtrl_le (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).k (Exp m).hk (Exp m).hcard (Exp m).hphi -- (B) Component convergences. have hA1 : FiniteDesign.TendstoInProb D (fun m => AhatTreat (Exp m).p (Exp m).y) ybar1 := FiniteDesign.tendstoInProb_of_var D _ hvarA1 have hA0 : FiniteDesign.TendstoInProb D (fun m => AhatCtrl (Exp m).p (Exp m).y) ybar0 := FiniteDesign.tendstoInProb_of_var D _ hvarA0 have hB1 : FiniteDesign.TendstoInProb D (fun m => BhatTreat (Exp m).p) (fun _ => 1) := by have hraw := FiniteDesign.tendstoInProb_of_var D (fun m => BhatTreat (Exp m).p) hvarB1 have heq : (fun m => (D m).E (BhatTreat (Exp m).p)) = (fun _ => (1 : ℝ)) := by funext m; rw [hDm m] exact E_BhatTreat (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).p_ne_zero (Exp m).hcard rw [heq] at hraw; exact hraw have hB0 : FiniteDesign.TendstoInProb D (fun m => BhatCtrl (Exp m).p) (fun _ => 1) := by have hraw := FiniteDesign.tendstoInProb_of_var D (fun m => BhatCtrl (Exp m).p) hvarB0 have heq : (fun m => (D m).E (BhatCtrl (Exp m).p)) = (fun _ => (1 : ℝ)) := by funext m; rw [hDm m] exact E_BhatCtrl (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).one_sub_p_ne_zero (Exp m).hcard rw [heq] at hraw; exact hraw -- (C) Ratios via Slutsky. have hbound1 : ∀ m, |ybar1 m| ≤ M := by intro m refine le_trans ?_ (hM m) change |(D m).E (AhatTreat (Exp m).p (Exp m).y)| ≤ (Exp m).k rw [hDm m] exact abs_E_AhatTreat_le (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).p_ne_zero (Exp m).y (Exp m).k (Exp m).hk (Exp m).hcard (by intro i; have := hpo1 m i; unfold SAHExperiment.D at this; exact this) have hbound0 : ∀ m, |ybar0 m| ≤ M := by intro m refine le_trans ?_ (hM m) change |(D m).E (AhatCtrl (Exp m).p (Exp m).y)| ≤ (Exp m).k rw [hDm m] exact abs_E_AhatCtrl_le (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).one_sub_p_ne_zero (Exp m).y (Exp m).k (Exp m).hk (Exp m).hcard (by intro i; have := hpo0 m i; unfold SAHExperiment.D at this; exact this) have hR1 : FiniteDesign.TendstoInProb D (fun m z => AhatTreat (Exp m).p (Exp m).y z / BhatTreat (Exp m).p z) ybar1 := FiniteDesign.tendstoInProb_div_one D _ _ ybar1 M hbound1 hA1 hB1 have hR0 : FiniteDesign.TendstoInProb D (fun m z => AhatCtrl (Exp m).p (Exp m).y z / BhatCtrl (Exp m).p z) ybar0 := FiniteDesign.tendstoInProb_div_one D _ _ ybar0 M hbound0 hA0 hB0 -- (D) Difference. have hdiff := hR1.sub hR0 -- The statistic is exactly `hajekEst`. have hstat : (fun m z => AhatTreat (Exp m).p (Exp m).y z / BhatTreat (Exp m).p z - AhatCtrl (Exp m).p (Exp m).y z / BhatCtrl (Exp m).p z) = (fun m => hajekEst (Exp m).p (Exp m).y) := by funext m z; rw [hajekEst] -- The limit sequence is `eate`. have hlim : (fun m => ybar1 m - ybar0 m) = (fun m => (Exp m).eate) := by funext m change (D m).E (AhatTreat (Exp m).p (Exp m).y) - (D m).E (AhatCtrl (Exp m).p (Exp m).y) = (Exp m).eate rw [SAHExperiment.eate, EATE, hDm m] have hsub := E_AhatTreat_sub_E_AhatCtrl (Exp m).p (Exp m).hp0 (Exp m).hp1 (Exp m).p_ne_zero (Exp m).one_sub_p_ne_zero (Exp m).y rw [EATE] at hsub rw [show SAHExperiment.D (Exp m) = DesignBased.bernoulliDesign (Exp m).p (Exp m).hp0 (Exp m).hp1 from hDm m] exact hsub rw [hstat, hlim] at hdiff exact hdiff
Causalean.Experimentation.UnknownInterference.hajek_consistent_eate · Causalean/Experimentation/UnknownInterference/Hajek.lean:667 · uses E , TendstoInProb , SAHExperiment , D , eate , dbar , hajekEst
9 supporting declarations (lemmas, instances)
  • E_BhatTreat theorem — With nonzero treatment propensities and a nonempty population, the treated weight average has mean exactly one: E[B̂₁] = 1.
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    hp0' :
    ∀ i, p i ≠ 0
    hcard :
    1 ≤ card U
    (DesignBased.bernoulliDesign p hp0 hp1).E (BhatTreat p) = 1
    Proof (Lean source)
    theorem E_BhatTreat (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (hcard : 1 ≤ Fintype.card U) : (DesignBased.bernoulliDesign p hp0 hp1).E (BhatTreat p) = 1 := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : n ≠ 0 := by rw [hn]; exact_mod_cast Nat.one_le_iff_ne_zero.mp hcard have h1 : D.E (BhatTreat p) = (1 / n) * ∑ i : U, D.E (weightTreatSummand p i) := by have hcongr : ∀ z, BhatTreat p z = (1 / n) * ∑ i : U, weightTreatSummand p i z := by intro z; rw [BhatTreat, hn]; ring rw [D.E_congr hcongr, D.E_const_mul, D.E_sum] have h2 : ∀ i : U, D.E (weightTreatSummand p i) = 1 := by intro i have hc : ∀ z, weightTreatSummand p i z = (1 / p i) * (if z i then (1 : ℝ) else 0) := by intro z; rw [weightTreatSummand]; ring rw [D.E_congr hc, D.E_const_mul] have : D.E (fun z => if z i then (1 : ℝ) else 0) = p i := by rw [hD]; exact DesignBased.bernoulliDesign_E_treat p hp0 hp1 i rw [this]; field_simp [hp0' i] rw [h1] simp only [h2, Finset.sum_const, Finset.card_univ, nsmul_eq_mul, mul_one] rw [← hn]; field_simp
    Causalean.Experimentation.UnknownInterference.E_BhatTreat · Causalean/Experimentation/UnknownInterference/Hajek.lean:101
  • E_BhatCtrl theorem — With nonzero control propensities and a nonempty population, the control weight average has mean exactly one: E[B̂₀] = 1.
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    hp1' :
    ∀ i, (1 : ℝ) - p i ≠ 0
    hcard :
    1 ≤ card U
    (DesignBased.bernoulliDesign p hp0 hp1).E (BhatCtrl p) = 1
    Proof (Lean source)
    theorem E_BhatCtrl (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (hcard : 1 ≤ Fintype.card U) : (DesignBased.bernoulliDesign p hp0 hp1).E (BhatCtrl p) = 1 := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : n ≠ 0 := by rw [hn]; exact_mod_cast Nat.one_le_iff_ne_zero.mp hcard have h1 : D.E (BhatCtrl p) = (1 / n) * ∑ i : U, D.E (weightCtrlSummand p i) := by have hcongr : ∀ z, BhatCtrl p z = (1 / n) * ∑ i : U, weightCtrlSummand p i z := by intro z; rw [BhatCtrl, hn]; ring rw [D.E_congr hcongr, D.E_const_mul, D.E_sum] have h2 : ∀ i : U, D.E (weightCtrlSummand p i) = 1 := by intro i have hc : ∀ z, weightCtrlSummand p i z = (1 / (1 - p i)) * (if z i then (0 : ℝ) else 1) := by intro z; rw [weightCtrlSummand]; ring rw [D.E_congr hc, D.E_const_mul] have : D.E (fun z => if z i then (0 : ℝ) else 1) = 1 - p i := by rw [hD]; exact DesignBased.bernoulliDesign_E_ctrl p hp0 hp1 i rw [this]; field_simp [hp1' i] rw [h1] simp only [h2, Finset.sum_const, Finset.card_univ, nsmul_eq_mul, mul_one] rw [← hn]; field_simp
    Causalean.Experimentation.UnknownInterference.E_BhatCtrl · Causalean/Experimentation/UnknownInterference/Hajek.lean:126
  • var_AhatTreat_le theorem — Variance bound for the treated numerator average: Var(Â₁) ≤ k⁴·d̄/n (same disjoint-block argument as the HT estimator).
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    y :
    U → (U → Bool) → ℝ
    k :
    ℝ
    hk :
    1 ≤ k
    hcard :
    1 ≤ Fintype.card U
    hplo :
    ∀ i, k⁻¹ ≤ p i
    hmom :
    ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2
    (DesignBased.bernoulliDesign p hp0 hp1).Var (AhatTreat p y)
    ≤ k ^ 4 * dbar y / (Fintype.card U : ℝ)
    Proof (Lean source)
    theorem var_AhatTreat_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hplo : ∀ i, k⁻¹ ≤ p i) (hmom : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2) : (DesignBased.bernoulliDesign p hp0 hp1).Var (AhatTreat p y) ≤ k ^ 4 * dbar y / (Fintype.card U : ℝ) := by classical set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hcov : ∀ i j, D.Cov (htTreatSummand p y i) (htTreatSummand p y j) ≤ (if InterfDep y i j then (k ^ 4 : ℝ) else 0) := by intro i j by_cases hdep : InterfDep y i j · rw [if_pos hdep] have hVsub : 0 ≤ D.Var (fun z => htTreatSummand p y i z - htTreatSummand p y j z) := D.Var_nonneg _ rw [D.Var_sub] at hVsub have hVi : D.Var (htTreatSummand p y i) ≤ k ^ 4 := var_htTreatSummand_le p hp0 hp1 y k hk hplo hmom i have hVj : D.Var (htTreatSummand p y j) ≤ k ^ 4 := var_htTreatSummand_le p hp0 hp1 y k hk hplo hmom j linarith · rw [if_neg hdep] exact le_of_eq (cov_htTreatSummand_zero p hp0 hp1 y hdep) have hEstEq : AhatTreat p y = fun z => n⁻¹ * ∑ i : U, (1 : ℝ) * htTreatSummand p y i z := by funext z; unfold AhatTreat; rw [hn, div_eq_inv_mul]; congr 1 exact Finset.sum_congr rfl (fun i _ => (one_mul _).symm) have hVarEst : D.Var (AhatTreat p y) = (n⁻¹) ^ 2 * ∑ i : U, ∑ j : U, D.Cov (htTreatSummand p y i) (htTreatSummand p y j) := by rw [hEstEq, D.Var_const_mul, D.Var_linear_comb univ (fun _ => (1 : ℝ)) (htTreatSummand p y)] congr 1 refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_)) rw [one_mul, one_mul] have hsumle : (∑ i : U, ∑ j : U, D.Cov (htTreatSummand p y i) (htTreatSummand p y j)) ≤ k ^ 4 * dbarCount y := by have hstep : (∑ i : U, ∑ j : U, D.Cov (htTreatSummand p y i) (htTreatSummand p y j)) ≤ ∑ i : U, ∑ j : U, (if InterfDep y i j then (k ^ 4 : ℝ) else 0) := Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hcov i j)) refine le_trans hstep ?_ rw [dbarCount, Finset.mul_sum] refine Finset.sum_le_sum (fun i _ => ?_) rw [Finset.mul_sum] refine Finset.sum_le_sum (fun j _ => ?_) by_cases hdep : InterfDep y i j <;> simp [hdep] rw [hVarEst] have hninv2 : (0 : ℝ) ≤ (n⁻¹) ^ 2 := sq_nonneg _ calc (n⁻¹) ^ 2 * ∑ i : U, ∑ j : U, D.Cov (htTreatSummand p y i) (htTreatSummand p y j) ≤ (n⁻¹) ^ 2 * (k ^ 4 * dbarCount y) := mul_le_mul_of_nonneg_left hsumle hninv2 _ = k ^ 4 * dbar y / n := by rw [dbar, hn]; ring
    Causalean.Experimentation.UnknownInterference.var_AhatTreat_le · Causalean/Experimentation/UnknownInterference/Hajek.lean:381
  • var_AhatCtrl_le theorem — Variance bound for the control numerator average: Var(Â₀) ≤ k⁴·d̄/n.
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    y :
    U → (U → Bool) → ℝ
    k :
    ℝ
    hk :
    1 ≤ k
    hcard :
    1 ≤ Fintype.card U
    hphi :
    ∀ i, p i ≤ 1 - k⁻¹
    hmom :
    ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2
    (DesignBased.bernoulliDesign p hp0 hp1).Var (AhatCtrl p y)
    ≤ k ^ 4 * dbar y / (Fintype.card U : ℝ)
    Proof (Lean source)
    theorem var_AhatCtrl_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hphi : ∀ i, p i ≤ 1 - k⁻¹) (hmom : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2) : (DesignBased.bernoulliDesign p hp0 hp1).Var (AhatCtrl p y) ≤ k ^ 4 * dbar y / (Fintype.card U : ℝ) := by classical set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hcov : ∀ i j, D.Cov (htCtrlSummand p y i) (htCtrlSummand p y j) ≤ (if InterfDep y i j then (k ^ 4 : ℝ) else 0) := by intro i j by_cases hdep : InterfDep y i j · rw [if_pos hdep] have hVsub : 0 ≤ D.Var (fun z => htCtrlSummand p y i z - htCtrlSummand p y j z) := D.Var_nonneg _ rw [D.Var_sub] at hVsub have hVi : D.Var (htCtrlSummand p y i) ≤ k ^ 4 := var_htCtrlSummand_le p hp0 hp1 y k hk hphi hmom i have hVj : D.Var (htCtrlSummand p y j) ≤ k ^ 4 := var_htCtrlSummand_le p hp0 hp1 y k hk hphi hmom j linarith · rw [if_neg hdep] exact le_of_eq (cov_htCtrlSummand_zero p hp0 hp1 y hdep) have hEstEq : AhatCtrl p y = fun z => n⁻¹ * ∑ i : U, (1 : ℝ) * htCtrlSummand p y i z := by funext z; unfold AhatCtrl; rw [hn, div_eq_inv_mul]; congr 1 exact Finset.sum_congr rfl (fun i _ => (one_mul _).symm) have hVarEst : D.Var (AhatCtrl p y) = (n⁻¹) ^ 2 * ∑ i : U, ∑ j : U, D.Cov (htCtrlSummand p y i) (htCtrlSummand p y j) := by rw [hEstEq, D.Var_const_mul, D.Var_linear_comb univ (fun _ => (1:ℝ)) (htCtrlSummand p y)] congr 1 refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_)) rw [one_mul, one_mul] have hsumle : (∑ i : U, ∑ j : U, D.Cov (htCtrlSummand p y i) (htCtrlSummand p y j)) ≤ k ^ 4 * dbarCount y := by have hstep : (∑ i : U, ∑ j : U, D.Cov (htCtrlSummand p y i) (htCtrlSummand p y j)) ≤ ∑ i : U, ∑ j : U, (if InterfDep y i j then (k ^ 4 : ℝ) else 0) := Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hcov i j)) refine le_trans hstep ?_ rw [dbarCount, Finset.mul_sum] refine Finset.sum_le_sum (fun i _ => ?_) rw [Finset.mul_sum] refine Finset.sum_le_sum (fun j _ => ?_) by_cases hdep : InterfDep y i j <;> simp [hdep] rw [hVarEst] have hninv2 : (0 : ℝ) ≤ (n⁻¹) ^ 2 := sq_nonneg _ calc (n⁻¹) ^ 2 * ∑ i : U, ∑ j : U, D.Cov (htCtrlSummand p y i) (htCtrlSummand p y j) ≤ (n⁻¹) ^ 2 * (k ^ 4 * dbarCount y) := mul_le_mul_of_nonneg_left hsumle hninv2 _ = k ^ 4 * dbar y / n := by rw [dbar, hn]; ring
    Causalean.Experimentation.UnknownInterference.var_AhatCtrl_le · Causalean/Experimentation/UnknownInterference/Hajek.lean:435
  • var_BhatTreat_le theorem — Variance bound for the treated weight average: Var(B̂₁) ≤ k²/n (single-coordinate independence — the weight summands Zᵢ/pᵢ depend on disjoint singletons).
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    k :
    ℝ
    hk :
    1 ≤ k
    hcard :
    1 ≤ Fintype.card U
    hplo :
    ∀ i, k⁻¹ ≤ p i
    (DesignBased.bernoulliDesign p hp0 hp1).Var (BhatTreat p) ≤ k ^ 2 / (Fintype.card U : ℝ)
    Proof (Lean source)
    theorem var_BhatTreat_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hplo : ∀ i, k⁻¹ ≤ p i) : (DesignBased.bernoulliDesign p hp0 hp1).Var (BhatTreat p) ≤ k ^ 2 / (Fintype.card U : ℝ) := by set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hk0 : (0 : ℝ) < k := lt_of_lt_of_le zero_lt_one hk have hkinv0 : (0 : ℝ) < k⁻¹ := inv_pos.mpr hk0 -- single-coordinate function `g_i b = (if b then 1 else 0)/p i` set g : U → Bool → ℝ := fun i b => (if b then (1 : ℝ) else 0) / p i with hg -- `BhatTreat = fun z => ∑ i, (n⁻¹) * g i (z i)` have hBeq : BhatTreat p = fun z => ∑ i : U, n⁻¹ * g i (z i) := by funext z; unfold BhatTreat weightTreatSummand rw [hn, Finset.sum_div] refine Finset.sum_congr rfl (fun i _ => ?_) rw [hg]; ring -- per-coordinate variance bound `Var(g i) ≤ k²` have hVcoord : ∀ i, (coinDesign (p i) (hp0 i) (hp1 i)).Var (g i) ≤ k ^ 2 := by intro i have hpi0 : (0 : ℝ) < p i := lt_of_lt_of_le hkinv0 (hplo i) have hrecp : 1 / p i ≤ k := by rw [div_le_iff₀ hpi0] nlinarith [mul_le_mul_of_nonneg_right (hplo i) (le_of_lt hk0), inv_mul_cancel₀ (ne_of_gt hk0)] have hEsq : (coinDesign (p i) (hp0 i) (hp1 i)).E (fun b => (g i b) ^ 2) = 1 / p i := by have h0 : p i ≠ 0 := ne_of_gt hpi0 rw [coinDesign_E]; simp only [hg]; norm_num; field_simp have hVle : (coinDesign (p i) (hp0 i) (hp1 i)).Var (g i) ≤ (coinDesign (p i) (hp0 i) (hp1 i)).E (fun b => (g i b) ^ 2) := by rw [(coinDesign (p i) (hp0 i) (hp1 i)).Var_eq] linarith [sq_nonneg ((coinDesign (p i) (hp0 i) (hp1 i)).E (g i))] have hk2 : (1 : ℝ) / p i ≤ k ^ 2 := by nlinarith [hrecp, hk] linarith [le_trans hVle (le_of_eq hEsq)] -- apply the product-design linear-combination variance identity rw [hBeq] unfold DesignBased.bernoulliDesign rw [FiniteDesign.Var_prod_linear_comb (fun i => coinDesign (p i) (hp0 i) (hp1 i)) (fun _ => n⁻¹) g] -- `∑ i, (n⁻¹)² · Var(g i) ≤ ∑ i, (n⁻¹)² · k² = n · (n⁻¹)² · k² = k²/n` have hninv2 : (0 : ℝ) ≤ (n⁻¹) ^ 2 := sq_nonneg _ have hstep : (∑ i : U, (n⁻¹) ^ 2 * (coinDesign (p i) (hp0 i) (hp1 i)).Var (g i)) ≤ ∑ _i : U, (n⁻¹) ^ 2 * k ^ 2 := Finset.sum_le_sum (fun i _ => mul_le_mul_of_nonneg_left (hVcoord i) hninv2) refine le_trans hstep ?_ rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, ← hn] rw [show (n : ℝ) * ((n⁻¹) ^ 2 * k ^ 2) = (n * n⁻¹) * (n⁻¹ * k ^ 2) by ring] rw [mul_inv_cancel₀ (ne_of_gt hn0), one_mul, inv_mul_eq_div]
    Causalean.Experimentation.UnknownInterference.var_BhatTreat_le · Causalean/Experimentation/UnknownInterference/Hajek.lean:487
  • var_BhatCtrl_le theorem — Variance bound for the control weight average: Var(B̂₀) ≤ k²/n.
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    k :
    ℝ
    hk :
    1 ≤ k
    hcard :
    1 ≤ Fintype.card U
    hphi :
    ∀ i, p i ≤ 1 - k⁻¹
    (DesignBased.bernoulliDesign p hp0 hp1).Var (BhatCtrl p) ≤ k ^ 2 / (Fintype.card U : ℝ)
    Proof (Lean source)
    theorem var_BhatCtrl_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hphi : ∀ i, p i ≤ 1 - k⁻¹) : (DesignBased.bernoulliDesign p hp0 hp1).Var (BhatCtrl p) ≤ k ^ 2 / (Fintype.card U : ℝ) := by set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hk0 : (0 : ℝ) < k := lt_of_lt_of_le zero_lt_one hk have hkinv0 : (0 : ℝ) < k⁻¹ := inv_pos.mpr hk0 -- single-coordinate function `g_i b = (if b then 0 else 1)/(1 - p i)` set g : U → Bool → ℝ := fun i b => (if b then (0 : ℝ) else 1) / (1 - p i) with hg have hBeq : BhatCtrl p = fun z => ∑ i : U, n⁻¹ * g i (z i) := by funext z; unfold BhatCtrl weightCtrlSummand rw [hn, Finset.sum_div] refine Finset.sum_congr rfl (fun i _ => ?_) rw [hg]; ring have hVcoord : ∀ i, (coinDesign (p i) (hp0 i) (hp1 i)).Var (g i) ≤ k ^ 2 := by intro i have hpi1 : (0 : ℝ) < 1 - p i := lt_of_lt_of_le hkinv0 (by linarith [hphi i]) have hrecq : 1 / (1 - p i) ≤ k := by rw [div_le_iff₀ hpi1] nlinarith [mul_le_mul_of_nonneg_right (by linarith [hphi i] : k⁻¹ ≤ 1 - p i) (le_of_lt hk0), inv_mul_cancel₀ (ne_of_gt hk0)] have hEsq : (coinDesign (p i) (hp0 i) (hp1 i)).E (fun b => (g i b) ^ 2) = 1 / (1 - p i) := by have h1 : (1 : ℝ) - p i ≠ 0 := ne_of_gt hpi1 rw [coinDesign_E]; simp only [hg]; norm_num; field_simp have hVle : (coinDesign (p i) (hp0 i) (hp1 i)).Var (g i) ≤ (coinDesign (p i) (hp0 i) (hp1 i)).E (fun b => (g i b) ^ 2) := by rw [(coinDesign (p i) (hp0 i) (hp1 i)).Var_eq] linarith [sq_nonneg ((coinDesign (p i) (hp0 i) (hp1 i)).E (g i))] have hk2 : (1 : ℝ) / (1 - p i) ≤ k ^ 2 := by nlinarith [hrecq, hk] linarith [le_trans hVle (le_of_eq hEsq)] rw [hBeq] unfold DesignBased.bernoulliDesign rw [FiniteDesign.Var_prod_linear_comb (fun i => coinDesign (p i) (hp0 i) (hp1 i)) (fun _ => n⁻¹) g] have hninv2 : (0 : ℝ) ≤ (n⁻¹) ^ 2 := sq_nonneg _ have hstep : (∑ i : U, (n⁻¹) ^ 2 * (coinDesign (p i) (hp0 i) (hp1 i)).Var (g i)) ≤ ∑ _i : U, (n⁻¹) ^ 2 * k ^ 2 := Finset.sum_le_sum (fun i _ => mul_le_mul_of_nonneg_left (hVcoord i) hninv2) refine le_trans hstep ?_ rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, ← hn] rw [show (n : ℝ) * ((n⁻¹) ^ 2 * k ^ 2) = (n * n⁻¹) * (n⁻¹ * k ^ 2) by ring] rw [mul_inv_cancel₀ (ne_of_gt hn0), one_mul, inv_mul_eq_div]
    Causalean.Experimentation.UnknownInterference.var_BhatCtrl_le · Causalean/Experimentation/UnknownInterference/Hajek.lean:536
  • abs_E_AhatTreat_le theorem — The treated numerator mean is the average treated potential outcome, uniformly bounded by k via the potential-outcome moment bound (Assumption C).
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    hp0' :
    ∀ i, p i ≠ 0
    y :
    U → (U → Bool) → ℝ
    k :
    ℝ
    hk :
    1 ≤ k
    hcard :
    1 ≤ card U
    hpo :
    ∀ i,
    (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => |y i (update z i true)|) ≤ k
    |(DesignBased.bernoulliDesign p hp0 hp1).E (AhatTreat p y)| ≤ k
    Proof (Lean source)
    theorem abs_E_AhatTreat_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hpo : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => |y i (update z i true)|) ≤ k) : |(DesignBased.bernoulliDesign p hp0 hp1).E (AhatTreat p y)| ≤ k := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hcard -- `E[Â₁] = (1/n) * ∑ i E[htTreatSummand i]`. have h1 : D.E (AhatTreat p y) = (1 / n) * ∑ i : U, D.E (htTreatSummand p y i) := by have hcongr : ∀ z, AhatTreat p y z = (1 / n) * ∑ i : U, htTreatSummand p y i z := by intro z; rw [AhatTreat, hn]; ring rw [D.E_congr hcongr, D.E_const_mul, D.E_sum] -- Each summand's expectation is bounded by `k`. have hbound : ∀ i : U, |D.E (htTreatSummand p y i)| ≤ k := by intro i rw [E_htTreatSummand p hp0 hp1 hp0' y i] exact le_trans (D.abs_E_le_E_abs _) (hpo i) rw [h1, abs_mul] have hpos : |1 / n| = 1 / n := abs_of_pos (by positivity) rw [hpos] calc (1 / n) * |∑ i : U, D.E (htTreatSummand p y i)| ≤ (1 / n) * ∑ i : U, |D.E (htTreatSummand p y i)| := mul_le_mul_of_nonneg_left (Finset.abs_sum_le_sum_abs _ _) (by positivity) _ ≤ (1 / n) * ∑ i : U, k := mul_le_mul_of_nonneg_left (Finset.sum_le_sum (fun i _ => hbound i)) (by positivity) _ = k := by rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, ← hn] field_simp
    Causalean.Experimentation.UnknownInterference.abs_E_AhatTreat_le · Causalean/Experimentation/UnknownInterference/Hajek.lean:581
  • abs_E_AhatCtrl_le theorem — The control numerator mean is the average control potential outcome, uniformly bounded by k.
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    hp1' :
    ∀ i, (1 : ℝ) - p i ≠ 0
    y :
    U → (U → Bool) → ℝ
    k :
    ℝ
    hk :
    1 ≤ k
    hcard :
    1 ≤ card U
    hpo :
    ∀ i,
    (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => |y i (update z i false)|) ≤ k
    |(DesignBased.bernoulliDesign p hp0 hp1).E (AhatCtrl p y)| ≤ k
    Proof (Lean source)
    theorem abs_E_AhatCtrl_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hpo : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => |y i (update z i false)|) ≤ k) : |(DesignBased.bernoulliDesign p hp0 hp1).E (AhatCtrl p y)| ≤ k := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast Nat.lt_of_lt_of_le Nat.zero_lt_one hcard have h1 : D.E (AhatCtrl p y) = (1 / n) * ∑ i : U, D.E (htCtrlSummand p y i) := by have hcongr : ∀ z, AhatCtrl p y z = (1 / n) * ∑ i : U, htCtrlSummand p y i z := by intro z; rw [AhatCtrl, hn]; ring rw [D.E_congr hcongr, D.E_const_mul, D.E_sum] have hbound : ∀ i : U, |D.E (htCtrlSummand p y i)| ≤ k := by intro i rw [E_htCtrlSummand p hp0 hp1 hp1' y i] exact le_trans (D.abs_E_le_E_abs _) (hpo i) rw [h1, abs_mul] have hpos : |1 / n| = 1 / n := abs_of_pos (by positivity) rw [hpos] calc (1 / n) * |∑ i : U, D.E (htCtrlSummand p y i)| ≤ (1 / n) * ∑ i : U, |D.E (htCtrlSummand p y i)| := mul_le_mul_of_nonneg_left (Finset.abs_sum_le_sum_abs _ _) (by positivity) _ ≤ (1 / n) * ∑ i : U, k := mul_le_mul_of_nonneg_left (Finset.sum_le_sum (fun i _ => hbound i)) (by positivity) _ = k := by rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, ← hn] field_simp
    Causalean.Experimentation.UnknownInterference.abs_E_AhatCtrl_le · Causalean/Experimentation/UnknownInterference/Hajek.lean:614
  • E_AhatTreat_sub_E_AhatCtrl theorem — The difference of the numerator means is EATE: E[Â₁] − E[Â₀] = EATE (the HT estimator is Â₁ − Â₀, and it is unbiased).
    U :
    Type u_1
    shared
    p :
    U → ℝ
    hp0 :
    ∀ i, 0 ≤ p i
    hp1 :
    ∀ i, p i ≤ 1
    hp0' :
    ∀ i, p i ≠ 0
    hp1' :
    ∀ i, (1 : ℝ) - p i ≠ 0
    y :
    U → (U → Bool) → ℝ
    (DesignBased.bernoulliDesign p hp0 hp1).E (AhatTreat p y)
    - (DesignBased.bernoulliDesign p hp0 hp1).E (AhatCtrl p y)
    = EATE (DesignBased.bernoulliDesign p hp0 hp1) y
    Proof (Lean source)
    theorem E_AhatTreat_sub_E_AhatCtrl (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (y : U → (U → Bool) → ℝ) : (DesignBased.bernoulliDesign p hp0 hp1).E (AhatTreat p y) - (DesignBased.bernoulliDesign p hp0 hp1).E (AhatCtrl p y) = EATE (DesignBased.bernoulliDesign p hp0 hp1) y := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD rw [← D.E_sub] -- Pointwise `AhatTreat - AhatCtrl = htEst`. have hpt : ∀ z, AhatTreat p y z - AhatCtrl p y z = htEst p y z := by intro z rw [AhatTreat, AhatCtrl, htEst, ← sub_div] congr 1 rw [← Finset.sum_sub_distrib] refine Finset.sum_congr rfl (fun i _ => ?_) rw [htSummand, htTreatSummand, htCtrlSummand] rw [D.E_congr hpt] rw [hD] exact htEst_unbiased p hp0 hp1 hp0' hp1' y
    Causalean.Experimentation.UnknownInterference.E_AhatTreat_sub_E_AhatCtrl · Causalean/Experimentation/UnknownInterference/Hajek.lean:645
Unbiased 2 core · 0 supporting Bernoulli Horvitz-Thompson estimators are exactly unbiased for the expected average treatment effect even when outcomes may depend on other units' assignments. ★ E_htSummand★ htEst_unbiased

Unbiasedness under unknown interference

Bernoulli Horvitz-Thompson estimators are exactly unbiased for the expected average treatment effect even when outcomes may depend on other units' assignments.

For each unit, its own Bernoulli treatment is independent of the remaining assignment coordinates that determine its treated and control potential outcomes. Product-design block factorization and the Bernoulli marginal identities therefore show that the unit's Horvitz-Thompson summand has expectation equal to its assignment-conditional treatment effect. Summing these identities proves the exact equality E[htEst] = EATE.

theorem E_htSummand reviewed
Causalean.Experimentation.UnknownInterference

Per-unit unbiasedness. Under a Bernoulli design in which every unit's treatment probability lies in [0,1] and is neither exactly zero nor exactly one, so both the treatment and control propensities are nonzero, the i-th Horvitz–Thompson summand has the same expectation as unit i's assignment-conditional treatment effect τ_i.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
hp0' :
∀ i, p i ≠ 0
hp1' :
∀ i, (1 : ℝ) - p i ≠ 0
y :
U → (U → Bool) → ℝ
i :
U
(DesignBased.bernoulliDesign p hp0 hp1).E (htSummand p y i)
= (DesignBased.bernoulliDesign p hp0 hp1).E (tau y i)
Proof (Lean source)
theorem E_htSummand (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (y : U → (U → Bool) → ℝ) (i : U) : (DesignBased.bernoulliDesign p hp0 hp1).E (htSummand p y i) = (DesignBased.bernoulliDesign p hp0 hp1).E (tau y i) := by classical letI : MeasurableSpace Bool := ⊤ letI : MeasurableSingletonClass Bool := ⟨fun _ => trivial⟩ set D := DesignBased.bernoulliDesign p hp0 hp1 with hD -- The treated potential outcome as a function of the full assignment. set hT : (U → Bool) → ℝ := fun z => y i (update z i true) with hhT set hC : (U → Bool) → ℝ := fun z => y i (update z i false) with hhC -- Treatment-term expectation equals `E[hT]`. have htreat : D.E (fun z => (if z i then (1 : ℝ) else 0) * y i z / p i) = D.E hT := by -- Pointwise rewrite `y i z` to `hT z` against the indicator. have hpt : ∀ z, (if z i then (1 : ℝ) else 0) * y i z / p i = (1 / p i) * ((if z i then (1 : ℝ) else 0) * hT z) := by intro z by_cases hz : z i · have : update z i true = z := by funext x; by_cases hx : x = i · subst hx; rw [Function.update_self]; exact hz.symm · rw [Function.update_of_ne hx] simp only [hz, if_pos, hhT, this] field_simp · simp only [hz, hhT] simp rw [D.E_congr hpt, D.E_const_mul] -- Factor `E[(if z i then 1 else 0) * hT z]` via block independence. have hblock : D.E (fun z => (if z i then (1 : ℝ) else 0) * hT z) = D.E (fun z => if z i then (1 : ℝ) else 0) * D.E hT := by rw [hD] unfold DesignBased.bernoulliDesign refine FiniteDesign.E_prod_block_mul _ {i} (fun z => if z i then (1 : ℝ) else 0) hT ?_ ?_ · intro w w' hww have hwi : w i = w' i := hww i (mem_singleton_self i) change (if w i then (1 : ℝ) else 0) = (if w' i then (1 : ℝ) else 0) rw [hwi] · intro w w' hww change y i (update w i true) = y i (update w' i true) congr 1 funext x by_cases hx : x = i · subst hx; rw [Function.update_self, Function.update_self] · rw [Function.update_of_ne hx, Function.update_of_ne hx] exact hww x (by simp [Finset.mem_singleton, hx]) rw [hblock] have hEtreat : D.E (fun z => if z i then (1 : ℝ) else 0) = p i := by rw [hD]; exact DesignBased.bernoulliDesign_E_treat p hp0 hp1 i rw [hEtreat] field_simp [hp0' i] -- Control-term expectation equals `E[hC]`. have hctrl : D.E (fun z => (if z i then (0 : ℝ) else 1) * y i z / (1 - p i)) = D.E hC := by have hpt : ∀ z, (if z i then (0 : ℝ) else 1) * y i z / (1 - p i) = (1 / (1 - p i)) * ((if z i then (0 : ℝ) else 1) * hC z) := by intro z by_cases hz : z i · simp only [hz, if_pos, hhC] simp · have : update z i false = z := by funext x; by_cases hx : x = i · subst hx; rw [Function.update_self]; simpa using hz · rw [Function.update_of_ne hx] simp only [hz, hhC, this] field_simp rw [D.E_congr hpt, D.E_const_mul] have hblock : D.E (fun z => (if z i then (0 : ℝ) else 1) * hC z) = D.E (fun z => if z i then (0 : ℝ) else 1) * D.E hC := by rw [hD] unfold DesignBased.bernoulliDesign refine FiniteDesign.E_prod_block_mul _ {i} (fun z => if z i then (0 : ℝ) else 1) hC ?_ ?_ · intro w w' hww have hwi : w i = w' i := hww i (mem_singleton_self i) change (if w i then (0 : ℝ) else 1) = (if w' i then (0 : ℝ) else 1) rw [hwi] · intro w w' hww change y i (update w i false) = y i (update w' i false) congr 1 funext x by_cases hx : x = i · subst hx; rw [Function.update_self, Function.update_self] · rw [Function.update_of_ne hx, Function.update_of_ne hx] exact hww x (by simp [Finset.mem_singleton, hx]) rw [hblock] have hEctrl : D.E (fun z => if z i then (0 : ℝ) else 1) = 1 - p i := by rw [hD]; exact DesignBased.bernoulliDesign_E_ctrl p hp0 hp1 i rw [hEctrl] field_simp [hp1' i] -- Assemble: `E[htSummand] = E[hT] - E[hC] = E[tau]`. have hsplit : D.E (htSummand p y i) = D.E (fun z => (if z i then (1 : ℝ) else 0) * y i z / p i) - D.E (fun z => (if z i then (0 : ℝ) else 1) * y i z / (1 - p i)) := by rw [← D.E_sub]; rfl rw [hsplit, htreat, hctrl, ← D.E_sub] rfl
Causalean.Experimentation.UnknownInterference.E_htSummand · Causalean/Experimentation/UnknownInterference/Unbiased.lean:37 · uses E , bernoulliDesign , htSummand , tau
theorem htEst_unbiased reviewed
Causalean.Experimentation.UnknownInterference

Horvitz–Thompson unbiasedness for EATE (Sävje–Aronow–Hudgens 2021). Under a Bernoulli design in which every unit's treatment probability lies in [0,1] and is neither exactly zero nor exactly one, so both the treatment and control propensities are nonzero, the Horvitz–Thompson estimator is exactly unbiased for the expected average treatment effect.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
hp0' :
∀ i, p i ≠ 0
hp1' :
∀ i, (1 : ℝ) - p i ≠ 0
y :
U → (U → Bool) → ℝ
(DesignBased.bernoulliDesign p hp0 hp1).E (htEst p y)
= EATE (DesignBased.bernoulliDesign p hp0 hp1) y
Proof (Lean source)
theorem htEst_unbiased (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (hp0' : ∀ i, p i ≠ 0) (hp1' : ∀ i, (1 : ℝ) - p i ≠ 0) (y : U → (U → Bool) → ℝ) : (DesignBased.bernoulliDesign p hp0 hp1).E (htEst p y) = EATE (DesignBased.bernoulliDesign p hp0 hp1) y := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn -- `E[htEst] = (1/n) * ∑ i E[htSummand i]`. have h1 : D.E (htEst p y) = (1 / n) * ∑ i : U, D.E (htSummand p y i) := by have hcongr : ∀ z, htEst p y z = (1 / n) * ∑ i : U, htSummand p y i z := by intro z rw [htEst] rw [hn] ring rw [D.E_congr hcongr, D.E_const_mul, D.E_sum] -- `EATE = (1/n) * ∑ i E[tau i]`. have h2 : EATE D y = (1 / n) * ∑ i : U, D.E (tau y i) := by rw [EATE] have hcongr : ∀ z, ACATE y z = (1 / n) * ∑ i : U, tau y i z := by intro z rw [ACATE, hn] ring rw [D.E_congr hcongr, D.E_const_mul, D.E_sum] rw [h1, h2] congr 1 refine Finset.sum_congr rfl (fun i _ => ?_) rw [hD] exact E_htSummand p hp0 hp1 hp0' hp1' y i
Causalean.Experimentation.UnknownInterference.htEst_unbiased · Causalean/Experimentation/UnknownInterference/Unbiased.lean:138 · uses E , bernoulliDesign , EATE , htEst
Variance­Bound 4 core · 2 supporting Under Bernoulli assignment, overlap and second-moment control bound the Horvitz-Thompson variance by the average amount of interference dependence: Var(ĤT) ≤ k⁴ · d̄ / n. ★ cov_htSummand_zero★ var_htSummand_le★ var_htEst_le

Variance bounds under unknown interference

Under Bernoulli assignment, overlap and second-moment control bound the Horvitz-Thompson variance by the average amount of interference dependence:

Var(ĤT) ≤ k⁴ · d̄ / n.

This file identifies the assignment-coordinate support of each unit's summand. Summands with disjoint supports have zero covariance by product-design independence; every remaining covariance is bounded by k⁴. Summing over the n * dbar interference-dependent ordered pairs gives the finite-sample bound used by the consistency development.

def interferers reviewed
Causalean.Experimentation.UnknownInterference

For every finite population of units whose members can be compared for equality, every schedule of potential outcomes indexed by a unit and a complete binary treatment assignment, and every unit in that population, the interferer set is the finite set consisting of that unit and every other unit whose treatment can affect that unit's potential outcome.

Definition (Lean source)
U :
Type u_1
shared
y :
U → (U → Bool) → ℝ
i :
U
interferers y i :
Finset.univ.filter (fun ℓ => Interferes y ℓ i)
Causalean.Experimentation.UnknownInterference.interferers · Causalean/Experimentation/UnknownInterference/VarianceBound.lean:42
theorem cov_htSummand_zero reviewed
Causalean.Experimentation.UnknownInterference

No covariance off the interference-dependence graph. Under a Bernoulli design in which each unit i is treated independently with probability p i, where every p i lies in the unit interval, if units i and j are not interference dependent — no unit's treatment affects both units' outcomes — then their Horvitz–Thompson summands have zero covariance under this design.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
y :
U → (U → Bool) → ℝ
i j :
U
h :
¬ InterfDep y i j
(DesignBased.bernoulliDesign p hp0 hp1).Cov (htSummand p y i) (htSummand p y j) = 0
Proof (Lean source)
theorem cov_htSummand_zero (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) {i j : U} (h : ¬ InterfDep y i j) : (DesignBased.bernoulliDesign p hp0 hp1).Cov (htSummand p y i) (htSummand p y j) = 0 := by letI : MeasurableSpace Bool := ⊤ letI : MeasurableSingletonClass Bool := ⟨fun _ => trivial⟩ unfold DesignBased.bernoulliDesign exact FiniteDesign.Cov_prod_disjoint_zero (fun i => coinDesign (p i) (hp0 i) (hp1 i)) (interferers y i) (interferers y j) (disjoint_interferers_of_not_interfDep y h) (htSummand p y i) (htSummand p y j) (fun z z' hzz => htSummand_depends_on_interferers p y i z z' hzz) (fun z z' hzz => htSummand_depends_on_interferers p y j z z' hzz)
Causalean.Experimentation.UnknownInterference.cov_htSummand_zero · Causalean/Experimentation/UnknownInterference/VarianceBound.lean:79 · uses Cov , bernoulliDesign , InterfDep , htSummand
theorem var_htSummand_le reviewed
Causalean.Experimentation.UnknownInterference

Per-summand variance bound. Fix a regularity constant k at least 1 and a Bernoulli design with per-unit treatment probabilities lying in the unit interval and further satisfying the overlap bounds k⁻¹ ≤ p i ≤ 1 − k⁻¹ for every unit. If the outcome function's second moment E[(y i)²] is at most k² for every unit under this design, then the variance of the iᵗʰ Horvitz–Thompson summand is at most k⁴.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
y :
U → (U → Bool) → ℝ
k :
ℝ
hk :
1 ≤ k
hplo :
∀ i, k⁻¹ ≤ p i
hphi :
∀ i, p i ≤ 1 - k⁻¹
hmom :
∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2
i :
U
(DesignBased.bernoulliDesign p hp0 hp1).Var (htSummand p y i) ≤ k ^ 4
Proof (Lean source)
theorem var_htSummand_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hplo : ∀ i, k⁻¹ ≤ p i) (hphi : ∀ i, p i ≤ 1 - k⁻¹) (hmom : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2) (i : U) : (DesignBased.bernoulliDesign p hp0 hp1).Var (htSummand p y i) ≤ k ^ 4 := by set D := DesignBased.bernoulliDesign p hp0 hp1 with hD have hk0 : (0 : ℝ) < k := lt_of_lt_of_le zero_lt_one hk have hkinv0 : (0 : ℝ) < k⁻¹ := inv_pos.mpr hk0 have hpi0 : (0 : ℝ) < p i := lt_of_lt_of_le hkinv0 (hplo i) have hpi1 : (0 : ℝ) < 1 - p i := lt_of_lt_of_le hkinv0 (by linarith [hphi i]) -- `1/p i ≤ k` and `1/(1 - p i) ≤ k`. have hrecp : 1 / p i ≤ k := by rw [div_le_iff₀ hpi0] have := (hplo i) have hk' : k⁻¹ * k = 1 := inv_mul_cancel₀ (ne_of_gt hk0) nlinarith [mul_le_mul_of_nonneg_right (hplo i) (le_of_lt hk0)] have hrecq : 1 / (1 - p i) ≤ k := by rw [div_le_iff₀ hpi1] nlinarith [mul_le_mul_of_nonneg_right (by linarith [hphi i] : k⁻¹ ≤ 1 - p i) (le_of_lt hk0), inv_mul_cancel₀ (ne_of_gt hk0)] -- Pointwise: `(htSummand)² ≤ k² (y i)²`. have hpt : ∀ z, (htSummand p y i z) ^ 2 ≤ k ^ 2 * (y i z) ^ 2 := by intro z have habs : |htSummand p y i z| ≤ k * |y i z| := by unfold htSummand by_cases hz : z i = true · rw [if_pos hz, if_pos hz] rw [show (1 : ℝ) * y i z / p i - (0 : ℝ) * y i z / (1 - p i) = y i z / p i by ring] rw [abs_div, abs_of_pos hpi0] calc |y i z| / p i = |y i z| * (1 / p i) := by ring _ ≤ |y i z| * k := by apply mul_le_mul_of_nonneg_left hrecp (abs_nonneg _) _ = k * |y i z| := by ring · rw [if_neg hz, if_neg hz] rw [show (0 : ℝ) * y i z / p i - (1 : ℝ) * y i z / (1 - p i) = - (y i z / (1 - p i)) by ring] rw [abs_neg, abs_div, abs_of_pos hpi1] calc |y i z| / (1 - p i) = |y i z| * (1 / (1 - p i)) := by ring _ ≤ |y i z| * k := by apply mul_le_mul_of_nonneg_left hrecq (abs_nonneg _) _ = k * |y i z| := by ring have h1 : (htSummand p y i z) ^ 2 = |htSummand p y i z| ^ 2 := (sq_abs _).symm have h2 : (k * |y i z|) ^ 2 = k ^ 2 * (y i z) ^ 2 := by rw [mul_pow, sq_abs] rw [h1, ← h2] exact pow_le_pow_left₀ (abs_nonneg _) habs 2 -- `Var ≤ E[(htSummand)²] ≤ E[k² (y i)²] = k² E[(y i)²] ≤ k² · k² = k⁴`. calc D.Var (htSummand p y i) ≤ D.E (fun z => (htSummand p y i z) ^ 2) := by rw [D.Var_eq]; linarith [sq_nonneg (D.E (htSummand p y i))] _ ≤ D.E (fun z => k ^ 2 * (y i z) ^ 2) := D.E_mono hpt _ = k ^ 2 * D.E (fun z => (y i z) ^ 2) := D.E_const_mul _ _ _ ≤ k ^ 2 * k ^ 2 := by apply mul_le_mul_of_nonneg_left (hmom i) (sq_nonneg k) _ = k ^ 4 := by ring
Causalean.Experimentation.UnknownInterference.var_htSummand_le · Causalean/Experimentation/UnknownInterference/VarianceBound.lean:96 · uses E , Var , bernoulliDesign , htSummand
theorem var_htEst_le reviewed
Causalean.Experimentation.UnknownInterference

The Horvitz–Thompson variance bound (Sävje–Aronow–Hudgens 2021). Fix a regularity constant k at least 1 over a nonempty finite unit population, with a Bernoulli design whose per-unit treatment probabilities lie in the unit interval and further satisfy the overlap bounds k⁻¹ ≤ p i ≤ 1 − k⁻¹ for every unit. If the outcome function's second moment E[(y i)²] is at most k² for every unit under this design, then the Horvitz–Thompson estimator's variance is at most k⁴ · d̄ / n, where d̄ is the average interference-dependence degree and n the number of units.

Formal statement
U :
Type u_1
shared
p :
U → ℝ
hp0 :
∀ i, 0 ≤ p i
hp1 :
∀ i, p i ≤ 1
y :
U → (U → Bool) → ℝ
k :
ℝ
hk :
1 ≤ k
hcard :
1 ≤ Fintype.card U
hplo :
∀ i, k⁻¹ ≤ p i
hphi :
∀ i, p i ≤ 1 - k⁻¹
hmom :
∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2
(DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y)
≤ k ^ 4 * dbar y / (Fintype.card U : ℝ)
Proof (Lean source)
theorem var_htEst_le (p : U → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hp1 : ∀ i, p i ≤ 1) (y : U → (U → Bool) → ℝ) (k : ℝ) (hk : 1 ≤ k) (hcard : 1 ≤ Fintype.card U) (hplo : ∀ i, k⁻¹ ≤ p i) (hphi : ∀ i, p i ≤ 1 - k⁻¹) (hmom : ∀ i, (DesignBased.bernoulliDesign p hp0 hp1).E (fun z => (y i z) ^ 2) ≤ k ^ 2) : (DesignBased.bernoulliDesign p hp0 hp1).Var (htEst p y) ≤ k ^ 4 * dbar y / (Fintype.card U : ℝ) := by classical set D := DesignBased.bernoulliDesign p hp0 hp1 with hD set n : ℝ := (Fintype.card U : ℝ) with hn have hn0 : (0 : ℝ) < n := by rw [hn]; exact_mod_cast lt_of_lt_of_le zero_lt_one hcard have hk0 : (0 : ℝ) < k := lt_of_lt_of_le zero_lt_one hk -- Termwise covariance bound: `Cov(HTᵢ, HTⱼ) ≤ (if InterfDep then k⁴ else 0)`. have hcov : ∀ i j, D.Cov (htSummand p y i) (htSummand p y j) ≤ (if InterfDep y i j then (k ^ 4 : ℝ) else 0) := by intro i j by_cases hdep : InterfDep y i j · rw [if_pos hdep] -- `Var(X−Y) ≥ 0` gives `Cov ≤ (Var X + Var Y)/2 ≤ k⁴`. have hVsub : 0 ≤ D.Var (fun z => htSummand p y i z - htSummand p y j z) := D.Var_nonneg _ rw [D.Var_sub] at hVsub have hVi : D.Var (htSummand p y i) ≤ k ^ 4 := var_htSummand_le p hp0 hp1 y k hk hplo hphi hmom i have hVj : D.Var (htSummand p y j) ≤ k ^ 4 := var_htSummand_le p hp0 hp1 y k hk hplo hphi hmom j linarith · rw [if_neg hdep] exact le_of_eq (cov_htSummand_zero p hp0 hp1 y hdep) -- `htEst = n⁻¹ * ∑ᵢ HTᵢ`, so `Var(htEst) = (n⁻¹)² Var(∑ᵢ HTᵢ)`. have hEstEq : htEst p y = fun z => n⁻¹ * ∑ i : U, (1 : ℝ) * htSummand p y i z := by funext z; unfold htEst; rw [hn, div_eq_inv_mul]; congr 1 exact Finset.sum_congr rfl (fun i _ => (one_mul _).symm) have hVarEst : D.Var (htEst p y) = (n⁻¹) ^ 2 * ∑ i : U, ∑ j : U, D.Cov (htSummand p y i) (htSummand p y j) := by rw [hEstEq, D.Var_const_mul, D.Var_linear_comb univ (fun _ => (1:ℝ)) (htSummand p y)] congr 1 refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_)) rw [one_mul, one_mul] -- Bound the double sum by `k⁴ · dbarCount`. have hsumle : (∑ i : U, ∑ j : U, D.Cov (htSummand p y i) (htSummand p y j)) ≤ k ^ 4 * dbarCount y := by have hstep : (∑ i : U, ∑ j : U, D.Cov (htSummand p y i) (htSummand p y j)) ≤ ∑ i : U, ∑ j : U, (if InterfDep y i j then (k ^ 4 : ℝ) else 0) := Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hcov i j)) refine le_trans hstep ?_ rw [dbarCount] rw [Finset.mul_sum] refine Finset.sum_le_sum (fun i _ => ?_) rw [Finset.mul_sum] refine Finset.sum_le_sum (fun j _ => ?_) by_cases hdep : InterfDep y i j <;> simp [hdep] -- Assemble the final bound. rw [hVarEst] have hk4 : (0 : ℝ) ≤ k ^ 4 := by positivity have hninv2 : (0 : ℝ) ≤ (n⁻¹) ^ 2 := sq_nonneg _ calc (n⁻¹) ^ 2 * ∑ i : U, ∑ j : U, D.Cov (htSummand p y i) (htSummand p y j) ≤ (n⁻¹) ^ 2 * (k ^ 4 * dbarCount y) := mul_le_mul_of_nonneg_left hsumle hninv2 _ = k ^ 4 * dbar y / n := by rw [dbar, hn] ring
Causalean.Experimentation.UnknownInterference.var_htEst_le · Causalean/Experimentation/UnknownInterference/VarianceBound.lean:158 · uses E , Var , bernoulliDesign , dbar , htEst
2 supporting declarations (lemmas, instances)