# F2-conf-03 — Coverage of OLS slope CIs in a small heteroskedastic fixed design ## Question In the fixed design y_i = 1 + 0.5 x_i + σ_i ε_i (n = 30, ε_i iid N(0,1), x_i and σ_i taken from `data/design.csv`), how often do nominal 95% intervals β̂ ± t_{0.975}(28)·se cover β = 0.5 when se is (a) the conventional OLS SE or (b) the HC1 robust SE? Also: (c) the exact SD of β̂ and (d) E[se_conv]. Does the conventional interval attain nominal coverage? ## Data and exclusions One input, `data/design.csv` (SHA-256 b1a17a52…e74f0), 30 rows (`n_input_rows`), columns i, x, σ. No missing values, duplicates or invalid σ; `data_issues` is empty and no rows were excluded (`out/exclusions.csv`: 30 → 30). σ_i rises with |x_i| (it is almost exactly a function of x²), so the noise is largest at the high-leverage design points. This pattern makes the conventional SE too small. Full audit: `out/state/data_audit.md`. ## Method - Exact SD (c): β̂ − β = Σ w_i σ_i ε_i with w_i = (x_i − x̄)/Σ(x_j − x̄)², so SD(β̂) = sqrt(Σ w_i² σ_i²). No simulation is used. - Monte Carlo: R = 2000 replications (`n_replications`), n = 30 (`n_obs_per_replication`). In each replication only ε is redrawn (numpy `default_rng`, seed `random_seed` = 20261030). Each replication fits OLS and computes se_conv = sqrt(s²·[(X'X)⁻¹]₂₂) with s² = RSS/28, and se_HC1 = sqrt(30/28 · Σ a_i² e_i²), where a is the slope row of (X'X)⁻¹X'. The critical value is t_{0.975}(28) = 2.0484 (`t_critical_28`). Coverage is the share of replications with |β̂ − 0.5| ≤ t·se. - Decision rule: `conventional_ci_undercovers` is true iff the conventional coverage is below 0.95 − 3·sqrt(0.95·0.05/2000) = 0.9354 (`undercoverage_threshold`). - For replication 1, statsmodels gives the same conventional and HC1 SEs as the script (asserted in `out/analysis.py`). ## Results | quantity | value | key | |---|---|---| | Coverage, conventional CI (naïve baseline) | 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 estimated coverage of 0.844 (`coverage_conventional`) is far below the 0.9354 threshold (`undercoverage_threshold`). The cause is visible in the SEs: on average se_conv is 0.190 (`mean_se_conventional`), about 29% below the true SD of 0.268 (`sd_beta_exact`). As a check, the exact value of sqrt(E[se_conv²]) is 0.193 (`sqrt_expected_se_conv_sq_exact`), in line with the MC mean. HC1 does much better, at 0.902 (`coverage_hc1`), but it still falls short of 95% at n = 30: its average SE of 0.241 (`mean_se_hc1`) is still below the true SD. The MC SD of β̂ agrees with the exact value (`sd_beta_mc` vs `sd_beta_exact`), and β̂ is unbiased (`mean_beta_hat`). ## Uncertainty Binomial Monte Carlo standard errors with R = 2000: - conventional coverage: 0.0081 (`mcse_coverage_conventional`), giving an approximate 95% MC interval of 0.828–0.860; - HC1 coverage: 0.0066 (`mcse_coverage_hc1`), giving an approximate 95% MC interval of 0.889–0.915; - MC SE at the nominal level 0.95: 0.0049 (`mcse_at_nominal_095`). The conventional shortfall is 0.106, which is about 22 nominal MC SEs, so the undercoverage verdict does not depend on simulation noise. HC1's shortfall of 0.048 is also many MC SEs, so HC1 undercovers here as well. That statement goes beyond the required outputs and was not tested with a formal rule. sd_beta_exact is analytical and has no MC error. ## Limitations and open issues - The results are specific to this one fixed design and to normal errors. With a different design or error distribution, coverage would differ. - Only the HC1 robust interval is assessed. Small-sample variants (HC2, HC3, wild bootstrap) were not studied because the task did not ask for them. - The coverage estimates depend on the seed (20261030) only through MC error, which is quantified above. - No part of the task was infeasible (`feasibility` = "complete").