F2-conf-03 — Coverage of OLS slope confidence intervals under heteroskedasticity
Question
In the fixed-design model y_i = 1 + 0.5 x_i + σ_i ε_i (n = 30, with x_i and σ_i from data/design.csv and ε_i iid N(0,1)), do nominal 95% intervals β̂ ± t_0.975(28)·se cover β = 0.5 with probability 0.95? The question is asked for (i) the conventional OLS standard error and (ii) the HC1 robust standard error.
Data and exclusions
The only input is data/design.csv: 30 rows, columns i, x, sigma. Its SHA-256 matches the bundle manifest. It has no missing values and no duplicate rows, and every σ is positive (n_input_rows). No rows were excluded (out/exclusions.csv: 30 → 30), and no data issues were found (data_issues = []). σ_i is largest at the extreme x values, so the heteroskedasticity sits on the high-leverage points. Full audit: out/state/data_audit.md.
Method
- Exact SD of β̂ (computed analytically): sqrt(Σ w_i² σ_i²), with w_i = (x_i − x̄)/S_xx. I confirmed it against the sandwich matrix formula.
- Monte Carlo: R = 2000 replications (
n_replications), n = 30 (n_obs_per_replication), numpydefault_rngwith seed 20261030 (random_seed). Only ε is redrawn; x and σ are held fixed. - Standard errors in each replication:
- se_conv = sqrt(s²/S_xx), where s² uses divisor n − 2.
- se_HC1 = sqrt(n/(n−2) · Σ(x_i−x̄)² e_i² / S_xx²).
- Critical value: t_0.975(28) = 2.0484 (
t_crit_28). - Coverage: the share of replications with |β̂ − 0.5| ≤ t·se.
- Undercoverage decision: the conventional interval is declared to undercover if 0.95 − coverage > 3 × sqrt(0.95·0.05/2000). This uses the binomial MC standard error at the nominal level (
mcse_at_nominal= 0.00487), which gives a threshold of 0.9354 (undercoverage_threshold). - Baseline: the conventional interval is the naïve baseline.
- Cross-check: statsmodels OLS/HC1 on the same draws reproduced every number exactly.
Results
| quantity | value | key |
|---|---|---|
| Coverage, conventional interval | 0.844 | coverage_conventional |
| Coverage, HC1 interval | 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_bhat_mc |
| Conventional CI undercovers | true | conventional_ci_undercovers |
The conventional interval does not reach its nominal 95% coverage.
- Its coverage of 0.844 is about 10.6 points below 0.95, far beyond the three-MC-SE threshold of 0.9354.
- On average, se_conv (0.190) understates the true sampling SD (0.268) by about 29%. Its mean is close to the homoskedastic-formula SD (0.196,
sd_beta_homoskedastic_formula), which ignores the fact that error variance is concentrated at high-leverage x.
HC1 helps but also undercovers in this small sample.
- HC1 coverage is 0.902 and its mean SE is 0.241. Both are better than the conventional interval but still below nominal.
- No formal three-SE test was specified for HC1. Even so, 0.902 is about 7 binomial MC SEs at the estimate (≈ 0.0066) below 0.95.
The MC SD of β̂ agrees with the exact SD (z ≈ 0.39), and mean β̂ is consistent with unbiasedness (out/state/checks.md).
Uncertainty
- Conventional coverage: MC standard error at the estimate is sqrt(p(1−p)/R) = 0.0081 (
mcse_coverage_conventional), giving an approximate 95% MC interval of 0.828–0.860. - HC1 coverage: MC standard error is 0.0066 (
mcse_coverage_hc1), giving an approximate interval of 0.889–0.915. - At the nominal level: the MC SE is 0.0049 (
mcse_at_nominal). - SD estimate: sd_beta_mc has a sampling SE of about sd/sqrt(2(R−1)) ≈ 0.0042.
- Other sources: the results depend on the single seed 20261030. Under the stated model the analytic SD has no uncertainty.
Limitations and open issues
- The results apply only to this specific synthetic design (n = 30, these x and σ) with normal errors. They should not be generalised to other designs or error distributions.
- I used one seed and R = 2000, as the task specifies. Coverage figures are therefore accurate only to about ±0.016 (2 MC SEs).
- The undercoverage rule uses the binomial SE at the nominal 0.95. Using the SE at the estimate (0.0081) gives the same conclusion.
- Small-sample HC variants (HC2, HC3, wild bootstrap) were outside scope and were not evaluated.