F2-conf-03 — Coverage of OLS slope CIs in a small heteroskedastic fixed design
Question
In y_i = 1 + 0.5 x_i + σ_i ε_i (n = 30; x_i, σ_i fixed from data/design.csv; ε_i iid N(0,1)), does the nominal 95% interval β̂ ± t₀.₉₇₅(28)·se reach 95% coverage, using (a) the conventional OLS SE and (b) the HC1 robust SE? Also: (c) the exact SD of β̂ and (d) E[se_conv].
Data and exclusions
One input, data/design.csv (30 rows, columns i, x, sigma; n_input_rows). The audit (out/state/data_audit.md) found no missing values, duplicates or non-positive σ; data_issues is empty and no rows were excluded (out/exclusions.csv: 30 → 30). Note on the design: σ_i increases with |x_i − x̄| (correlation 0.84, computed during the audit), so the error variance is largest at the high-leverage points.
Method
- Exact SD (no simulation): β̂ − β = Σ w_i σ_i ε_i with w_i = (x_i − x̄)/S_xx, so SD(β̂) = sqrt(Σ w_i² σ_i²) (
sd_beta_exact). - Monte Carlo: R = 2000 replications (
n_replications), n = 30 (n_obs_per_replication), numpydefault_rngwith seed 20261030 (random_seed). Only ε is redrawn. For each replication: OLS fit, se_conv = sqrt(s²·[(X'X)⁻¹]₂₂) with s² = RSS/(n−2), se_HC1 = sqrt(n/(n−2)·Σ a_i² e_i²) (HC0 sandwich × n/(n−2)), critical value t₀.₉₇₅(28) = 2.0484 (t_critical_28). Coverage = share of replications whose interval contains 0.5. - The baseline is the conventional interval coverage (
coverage_conventional), which the task names as the naïve baseline. - Decision rule: the conventional CI undercovers iff coverage_conventional < 0.95 − 3·MCSE, with MCSE = sqrt(0.95·0.05/2000) = 0.00487 (
mcse_coverage_at_nominal), giving a threshold of 0.9354 (undercoverage_threshold). I evaluated the binomial SE at the nominal 0.95 because the rule tests against that value. - Validation: results matched statsmodels (OLS nonrobust and HC1) for the first 5 replications to machine precision. A clean re-run reproduced the results exactly (
out/state/checks.md).
Results
| quantity | value | key |
|---|---|---|
| Coverage, conventional CI | 0.844 | coverage_conventional |
| Coverage, HC1 CI | 0.902 | coverage_hc1 |
| Exact SD of β̂ | 0.2680 | sd_beta_exact |
| MC SD of β̂ | 0.2696 | sd_beta_mc |
| Mean se_conv | 0.1903 | mean_se_conventional |
| Mean se_HC1 | 0.2408 | mean_se_hc1 |
| Mean β̂ | 0.4962 | mean_beta_hat |
| Conventional CI undercovers | true | conventional_ci_undercovers |
The conventional interval does not reach its nominal 95% coverage. Its coverage of 0.844 (coverage_conventional) is far below the threshold of 0.9354 (undercoverage_threshold). The cause is that se_conv is too small on average: 0.190 (mean_se_conventional), compared with the true SD of 0.268 (sd_beta_exact), about 29% too small. The homoskedastic formula ignores that the noisiest observations are also the high-leverage ones. The HC1 interval does better at 0.902 (coverage_hc1) but still falls short of 95%, because its mean SE of 0.241 (mean_se_hc1) is still below 0.268 at n = 30. The MC SD of β̂ agrees with the exact value (0.2696 vs 0.2680), and the mean of β̂ is consistent with 0.5. This is a check that the simulation is correct.
Uncertainty
- Monte Carlo SE of coverage_conventional, from the estimated proportion: 0.0081 (
mcse_coverage_conventional). Approximate 95% MC interval: 0.828–0.860. - Monte Carlo SE of coverage_hc1: 0.0066 (
mcse_coverage_hc1). Approximate 95% MC interval: 0.889–0.915. - MCSE at the nominal level used in the decision rule: 0.00487 (
mcse_coverage_at_nominal). The decision does not change if the estimate-based MCSE is used instead: 0.95 − 3·0.0081 = 0.926 > 0.844. - MC SE of mean se_conv: 0.0007 (
mcse_mean_se_conventional). MC SE of mean β̂: 0.0060 (mcse_mean_beta_hat). sd_beta_exactis analytic and has no MC error.
Limitations and open issues
- The results apply only to this one fixed design, with normal errors and R = 2000. Coverage estimates carry the MC error stated above. Other seeds would move them by about ±0.016 (2 MCSE).
- The task does not fix how the "binomial standard error" in the undercoverage rule should be computed. I used the value at the nominal p = 0.95, and the conclusion is the same under the alternative.
- The HC1 shortfall below 95% is a descriptive finding. I did not test it formally against a threshold, although 0.902 is more than 7 MCSE below 0.95.