F2-conf-03 — Monte Carlo coverage of OLS confidence intervals (n = 30, heteroskedastic)
Question
In the fixed-design model y_i = 1 + 0.5 x_i + σ_i ε_i (i = 1..30, ε_i iid N(0,1), x_i and σ_i fixed from data/design.csv), do nominal 95% t(28) intervals for the slope based on (a) the conventional OLS SE and (b) the HC1 robust SE reach 95% coverage? We also report (c) the exact SD of β̂ and (d) E[se_conv].
Data and exclusions
data/design.csv (SHA-256 b1a17a52…3e74f0): 30 rows, columns i, x, sigma; no missing values, no duplicates, all σ_i > 0 (n_input_rows, data_issues = []). No rows excluded (out/exclusions.csv: 30 → 30). Design feature: σ_i² is strongly correlated with x_i² (r = 0.987, computed in the audit), so error variance is largest at high-leverage points.
Method
Analytic: β̂ − β = Σ w_i σ_i ε_i with w_i = (x_i − x̄)/S_xx, so SD(β̂) = sqrt(Σ w_i² σ_i²). Monte Carlo: R = 2000 replications (n_replications), n = 30 (n_obs_per_replication), numpy default_rng seed 20261030 (random_seed); only ε redrawn. In each replication OLS is fitted; se_conv = sqrt(s²/S_xx), s² = RSS/(n−2); se_HC1 = sqrt(n/(n−2)) · sqrt(Σ (x_i−x̄)² e_i²)/S_xx. Intervals β̂ ± t_{0.975}(28)·se with t = 2.0484 (t_critical). Both SE formulas were cross-checked against statsmodels for one replication. Undercoverage rule: coverage_conventional < 0.95 − 3·sqrt(0.95·0.05/2000) = 0.9354 (undercoverage_threshold). The conventional interval's coverage is the naïve baseline (baseline_coverage_conventional).
Results
- Conventional interval coverage: 0.844 (
coverage_conventional), far below 95%. - HC1 interval coverage: 0.902 (
coverage_hc1) — better, but still below 95%. - Exact SD of β̂: 0.2680 (
sd_beta_exact); Monte Carlo SD: 0.2696 (sd_beta_mc), agreeing within MC error. - Mean conventional SE: 0.1903 (
mean_se_conventional), about 29% below the true SD of 0.2680; mean HC1 SE is 0.2408 (mean_se_hc1), also below the true SD. Analytic check: sqrt(E[s²]/S_xx) = 0.1932 (sqrt_E_s2_over_Sxx_analytic), consistent with the MC mean SE (Jensen). - Conclusion: the conventional interval does not attain its nominal coverage (
conventional_ci_undercovers= true).
Uncertainty
Binomial Monte Carlo standard errors: conventional coverage 0.844 ± 0.0081 (mcse_coverage_conventional); HC1 coverage 0.902 ± 0.0067 (mcse_coverage_hc1); MC SE at the nominal 0.95 is 0.0049 (mcse_at_nominal). The conventional shortfall (0.106) is about 22 nominal-level MC SEs; the HC1 shortfall (0.048) is about 10. The sd_beta_exact value is analytic (no MC error); sd_beta_mc differs from it by 0.6%, below its approximate MC relative SE of 1.6%.
Limitations and open issues
- Results are conditional on this one synthetic fixed design and normal errors; they do not generalise to other designs.
- Coverage estimates depend on the seed at the level of the reported MC SEs; R = 2000 is fixed by the task.
- HC1 also undercovers in this n = 30 high-leverage design; small-sample refinements (HC2/HC3, wild bootstrap) were not evaluated because the task does not require them.
- No data problems were found; feasibility is "complete".