# F5-conf-02 — Finite-sample bias of the OLS estimator of an AR(1) coefficient ## Scientific question In the Gaussian AR(1) model y_t = c + ρ y_{t−1} + ε_t with ε_t ~ i.i.d. N(0, σ²), the OLS estimator ρ̂ of ρ (regression of y_t on a constant and y_{t−1}) is biased in finite samples. A classical analytical approximation (Marriott and Pope 1954; Kendall 1954) gives E[ρ̂] − ρ ≈ −(1 + 3ρ)/n for the regression with an estimated intercept. The estimands are (i) the value of this analytical bias approximation at the design values of (n, ρ), and (ii) the actual finite-sample bias E[ρ̂] − ρ at the same design, estimated by Monte Carlo with its Monte Carlo standard error. Compare the two and interpret the discrepancy with the correct scope for an approximation of this kind. ## Inputs - `data/design.csv` — columns `parameter`, `value`, `description`: the simulation design (series length `n`, true coefficient `rho`, innovation standard deviation `sigma`, whether the regression includes an intercept, the initial condition, the number of replications `n_replications`, and the random `seed` to use with `numpy.random.default_rng`). Simulated data only; nothing is observed. ## Information-availability rules - Use only `data/design.csv`. Follow the design exactly (n, ρ, σ, intercept, stationary initial condition, number of replications, seed). c = 0 in the data-generating process. - Each replication must simulate a fresh series of n observations and estimate ρ̂ by OLS of y_t on (1, y_{t−1}) for t = 2, …, n. ## Required outputs - `out/results.json` with the keys: | key | type | unit | meaning | |---|---|---|---| | `task_id` | string | — | "F5-conf-02" | | `bias_analytical` | number | — | −(1 + 3ρ)/n at the design values | | `bias_mc` | number | — | Monte Carlo estimate of E[ρ̂] − ρ (mean of ρ̂ over replications minus ρ) | | `bias_mc_se` | number | — | Monte Carlo standard error of `bias_mc` (sd of ρ̂ across replications / √R) | | `rho_hat_mean` | number | — | mean of ρ̂ across replications | | `rho_hat_sd_mc` | number | — | standard deviation of ρ̂ across replications | | `discrepancy_se_units` | number | — | (bias_mc − bias_analytical) / bias_mc_se | | `se_asymptotic` | number | — | textbook asymptotic standard error √((1 − ρ²)/n) at the design values (the baseline quantity) | | `n_replications` | integer | — | number of Monte Carlo replications actually run | | `feasibility` | string | — | "complete", "partial" or "infeasible" | | `feasibility_reason` | string or null | — | explanation if not complete | | `data_issues` | array of {"issue","handling"} | — | data problems detected and how handled (empty list if none) | | `n_input_rows` | object | — | {"design.csv": rows read} | | `n_analysed` | integer or null | — | number of replications used in the main estimate | | `random_seed` | integer or null | — | seed used | - `out/report.md` with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues. The Method or Limitations section must state the nature of the analytical formula (what kind of approximation it is and in what sense it is accurate) and the scope of what the Monte Carlo evidence can and cannot establish. - `out/analysis.py` — running `~/wp29/venv/bin/python out/analysis.py` from the workspace root must regenerate `out/results.json` from `data/` only, deterministically (fixed seed). - `out/claims.json` — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}]. Each claim's status must be justified by the listed results keys. ## Constraints - No network access. Python: `~/wp29/venv/bin/python` (numpy, pandas, scipy, statsmodels available). Do not modify `data/`. - This task is designed to be completed in well under 20 minutes of work; the Monte Carlo runs in seconds when vectorised.