SPB Git

spb/wp29_uqo

Public

# F5-conf-02 — Finite-sample bias of OLS ρ̂ in a Gaussian AR(1)

# Question

In y_t = c + ρ y_{t−1} + ε_t, with ε_t ~ iid N(0, σ²) and c = 0 in the DGP, how large is the finite-sample bias of the OLS slope ρ̂ from regressing y_t on (1, y_{t−1})? How does the Marriott–Pope/Kendall approximation −(1+3ρ)/n compare with a Monte Carlo estimate of that bias at the design n = 30, ρ = 0.8?

# Data and exclusions

The only input is data/design.csv (7 rows, SHA-256 2f459c53…6ecb; n_input_rows). Design: n = 30, ρ = 0.8, σ = 1, intercept included, stationary start y_1 ~ N(0, σ²/(1−ρ²)), R = 20000 replications, seed 20261029 (random_seed). The audit found no problems (data_issues = []). The exclusion ledger (out/exclusions.csv) has one rule: drop replications with a non-finite ρ̂. It removed 0, so 20000 replications were analysed (n_replications, n_analysed).

# Method

  • Simulation. numpy.random.default_rng(20261029) drew y_1 from the stationary distribution for every replication, then innovations ε_2..ε_30. The series follow y_t = 0.8 y_{t−1} + ε_t.
  • Estimation. In each replication, ρ̂ is the OLS slope of y_t on (1, y_{t−1}) for t = 2..30, i.e. 29 regression observations. It was computed in closed form from demeaned data and checked against numpy.linalg.lstsq on 5 replications.
  • Bias estimate. bias_mc = mean(ρ̂) − ρ, with Monte Carlo SE = sd(ρ̂)/√R.
  • Baseline (no simulation needed). The analytical approximation −(1+3ρ)/n at n = 30, plus the textbook asymptotic SE √((1−ρ²)/n).

What the analytical formula is. −(1+3ρ)/n is the leading O(1/n) term of an asymptotic expansion of E[ρ̂] − ρ. It was derived for a stationary Gaussian AR(1) with an estimated mean. The terms it drops are O(n⁻²), so it is accurate only in the sense that the error shrinks faster than 1/n as n → ∞. It does not promise a given accuracy at any fixed n. The dropped terms are relatively larger when n is small and ρ is near 1, both of which hold here. The formula also leaves the choice of "n" open: series length (30) or regression sample (29). Following the task, the headline uses n = 30, and n − 1 = 29 is reported as a sensitivity check.

# Results

  • Analytical bias: −0.11333 (bias_analytical). With n − 1 = 29 it is −0.11724 (bias_analytical_neff).
  • Monte Carlo: mean ρ̂ = 0.67629 (rho_hat_mean), so the bias is −0.12371 (bias_mc), with MC SE 0.00105 (bias_mc_se).
  • The MC bias is 1.092 times the analytical value (ratio_bias_mc_to_analytical). In other words, the approximation understates the size of the bias by about 9%.
  • The gap is −9.85 MC standard errors (discrepancy_se_units). Using n − 1 it is −6.14 (discrepancy_se_units_neff).
  • The distribution of ρ̂ is skewed to the left: the median is 0.6987 (rho_hat_median) and 79.3% of the estimates fall below ρ (share_rho_hat_below_rho).
  • The MC sd of ρ̂ is 0.1489 (rho_hat_sd_mc). The asymptotic SE of 0.1095 (se_asymptotic) is only 0.736 of that (se_asymptotic_over_sd_mc), so asymptotic inference would understate how variable ρ̂ is at n = 30.

# Uncertainty

The MC 95% interval for the bias is [−0.12577, −0.12165] (bias_mc_ci95_low, bias_mc_ci95_high), and it does not contain the analytical value −0.11333. The only randomness is Monte Carlo sampling error under a fixed seed. A different seed would move bias_mc by roughly one bias_mc_se, which cannot close a gap of about 10 SE. The analytical value itself has no sampling uncertainty.

# Limitations and open issues

  • The discrepancy is not an error in the formula. At n = 30, the formula does not hold "exactly" and then fail. It is a first-order large-n approximation, and the roughly 0.010 gap is the O(n⁻²) remainder it was never designed to capture. The large discrepancy in SE units only shows that 20000 replications are enough to detect that remainder. It does not mean the approximation is poor for practical purposes: it captures about 92% of the bias.
  • What the MC evidence covers. It establishes the bias at this one design point (n = 30, ρ = 0.8, Gaussian errors, stationary start, intercept, c = 0), within MC error. It says nothing about other n, ρ, error distributions, initial conditions, or regressions without an intercept or with a trend. It also cannot by itself confirm the asymptotic rate of the approximation, which would need a sequence of n values that was not run.
  • The "n" convention matters. Using 29 instead of 30 narrows the gap (discrepancy_se_units_neff) but does not close it.
  • The task required nothing beyond this design, and no further extensions were run.
Files · main
Menu

Theme