Day 36. Neyman's Repeated-Sampling Variance
The exact variance of the difference in means over all possible randomisations, why it cannot be estimated without bias, and why the standard estimator is conservative.
- ●State Neyman's finite-population variance formula and compute it from a science table.
- ●Derive the variance of a treated-group mean under complete randomisation.
- ●Prove that the Neyman variance estimator is conservative, and when it is unbiased.
- ●Compute Neyman standard errors and confidence intervals for RCTs with continuous and binary outcomes.
Theory
The finite-population variance
Neyman (1923) treated potential outcomes as fixed and asked how the difference in means varies across all possible completely randomised assignments. With finite-population variances (divisor )
the exact variance is
Estimating it
and are estimated without bias by the sample variances (treated) and (control). But involves both potential outcomes of each unit and cannot be estimated. Neyman's estimator drops it:
So is conservative: unbiased when effects are constant (), too large otherwise. Confidence intervals therefore cover at least 95% in large samples.
A sharper (still valid) bound uses .
Finite versus super population
If units are a random sample from a large population, the variance of around the super-population ATE is , with no negative term, and is unbiased for it (Imbens & Rubin 2015). The same formula therefore serves both views: exact for one, conservative for the other.
Part 1 · Warm-up
Exercise 1 · Neyman's estimator
A cash-transfer RCT has 100 treated and 100 control households, with sample sds of monthly consumption $40 and $30. Compute and the SE.
Show solution
Step 1. .
Step 2. SE .
Answer: $5.
Exercise 2 · Constant effects
, , and the effect is the same for everyone. Compute .
Show solution
Step 1. Constant effects mean .
Step 2. .
Answer: 4 (SE 2).
Exercise 3 · Heterogeneous effects
Same as Exercise 2 but (). Compute the true variance and the bias of .
Show solution
Step 1. .
Step 2. , so the bias is (about 10% of the variance; 5% of the SE).
Answer: 3.64; Neyman's estimator overstates it by 0.36.
Exercise 4 · A confidence interval
The estimated effect in Exercise 1 is $12. Build a 95% CI.
Show solution
Step 1. .
Answer: dollars per month: positive, but imprecise.
Exercise 5 · Allocating a fixed sample
With 200 households in total and outcome sds 40 (treated) and 30 (control), how should they be split to minimise ?
Show solution
Step 1. Minimise with : the Lagrange solution (Day 26) is .
Step 2. , .
Answer: about 114 treated and 86 control.
Part 2 · Proofs
Exercise 6 · Unbiased group means
Under complete randomisation, prove .
Show solution
Step 1. .
Step 2. (Day 35, Exercise 7).
Step 3. .
Exercise 7 · Variance of the treated mean
Prove .
Show solution
Write and use Day 35's moments: , .
Step 1. .
Step 2. Use . The bracket becomes
Step 3. So .
Step 4. Divide by : .
The is a finite-population correction: treating everyone () gives zero variance.
Exercise 8 · The full Neyman formula (sketch)
Using Exercise 7 and , where is the finite-population covariance of and , derive .
Show solution
Step 1. .
Step 2. Substitute: .
Step 3. Since , .
Step 4. So , giving .
Exercise 9 · Neyman's estimator is conservative
Given and under complete randomisation, prove , with equality iff effects are constant.
Show solution
Step 1. .
Step 2. Subtract the true variance: .
Step 3. iff all equal , i.e. constant effects.
Exercise 10 · A sharper bound
Prove and deduce a smaller conservative variance estimator.
Show solution
Step 1. .
Step 2. Cauchy–Schwarz (Day 16): .
Step 3. So .
Step 4. Hence , estimated by plugging in .
The bound is attained when and are perfectly positively correlated.
Part 3 · Applied
Exercise 11 · School attendance
A deworming RCT randomises 50 schools, 25 to each arm. Attendance rates (%) have sds 8 (treated) and 6 (control); the difference in means is 5 points. Compute the Neyman SE and a 95% CI.
Show solution
Step 1. .
Step 2. SE .
Step 3. CI: .
Answer: attendance rose by 5 points (95% CI 1.1 to 8.9).
Exercise 12 · Using the sharper bound
For Exercise 11, compute the variance bound of Exercise 10.
Show solution
Step 1. .
Step 2. Bound , SE .
Answer: a slightly narrower but still valid interval; the gain is small unless the two sds differ a lot.
Exercise 13 · The exact variance for the training table
For Day 31's four workers (, , ), compute , , and Neyman's exact variance. Check it against the variance of the six estimates from Day 31, Exercise 11.
Show solution
Step 1. ; deviations ; .
Step 2. ; squared deviations ; .
Step 3. , mean 2.25; squared deviations ; .
Step 4. .
Step 5. The six estimates (1.5, 0, 4.5, 0, 4.5, 3) have mean 2.25 and variance . ✓
Answer: 3.5625 exactly, as Neyman's formula says.
Exercise 14 · A binary outcome
A smoking-cessation trial has 200 per arm; 30% quit with the intervention and 40% with usual care. Compute the difference, Neyman SE and z-statistic.
Show solution
Step 1. Difference .
Step 2. Binary outcomes: . .
Step 3. SE ; .
Answer: the intervention lowered quit rates by 10 points (), a surprising result worth checking for implementation problems.
Exercise 15 · Which variance to report?
A study randomises all 120 municipalities of a province (finite population, Day 31 Exercise 14). Is exact, conservative or anti-conservative, and how should results be described?
Show solution
Step 1. For the finite-population ATE, overstates the variance by on average: conservative.
Step 2. If effects are roughly constant across municipalities, the overstatement is negligible.
Answer: report -based CIs as (slightly) conservative for the effect in these 120 municipalities; for other provinces, external validity applies.
Verify in Python
import itertools
import numpy as np
y1 = np.array([14, 12, 13, 15.]); y0 = np.array([10, 12, 8, 15.]); n, n1 = 4, 2
S1, S0, St = y1.var(ddof=1), y0.var(ddof=1), (y1 - y0).var(ddof=1)
print(f"S1^2 {S1:.3f}, S0^2 {S0:.3f}, Stau^2 {St:.3f}; Neyman variance {S1 / n1 + S0 / (n - n1) - St / n:.4f}")
ests = []
for c in itertools.combinations(range(n), n1):
T = np.zeros(n, bool); T[list(c)] = True
ests.append(y1[T].mean() - y0[~T].mean())
print("variance over all assignments:", np.var(ests))
# Coverage of Neyman intervals with heterogeneous effects
rng = np.random.default_rng(36)
N, N1 = 200, 100
Y0 = rng.normal(50, 10, N); Y1 = Y0 + rng.normal(5, 6, N) # heterogeneous effects
tau = (Y1 - Y0).mean(); cover = []; vhat = []
for _ in range(20_000):
T = np.zeros(N, bool); T[rng.choice(N, N1, replace=False)] = True
est = Y1[T].mean() - Y0[~T].mean()
v = Y1[T].var(ddof=1) / N1 + Y0[~T].var(ddof=1) / (N - N1)
vhat.append(v); cover.append(abs(est - tau) <= 1.96 * np.sqrt(v))
true_v = Y1.var(ddof=1) / N1 + Y0.var(ddof=1) / (N - N1) - (Y1 - Y0).var(ddof=1) / N
print(f"true variance {true_v:.3f}, mean Neyman estimate {np.mean(vhat):.3f}, coverage {np.mean(cover):.3f}")
Key takeaways
- Over all randomisations, .
- The last term needs both potential outcomes per unit, so it is dropped: Neyman's estimator is conservative.
- It is exact under constant effects and unbiased for the super-population variance.
Simulation Lab: Neyman's Conservative Variance
Open full screen →The true design variance versus the Neyman estimator as effect heterogeneity grows; coverage of the 95% interval.
A fixed group of patients; only the assignment is random. The true variance of the difference in means subtracts S²τ/N, which the data cannot estimate, so Neyman's estimator is conservative: exact when effects are constant, too large when they vary.