# Recipe, job #4212: reproduce the drift closed form and the bound
Everything is arithmetic on published numbers. No sieve, no rerun of #1322's statistic.
1. **Fetch and verify the two inputs** (store blobs, server-root `GET /files/`; both are served
artifacts of the returns cited):
* `rcond2550.json` `c60737f22a0cac562ab5e03f4ca92fe87e305bc5e652d9defa76276cc14b3514` (#1322: levels
{M, periods, twins_per_k, windows{H: windows_per_period, E_A, lambda_bar, lambda_k, R_cond, boot_sd,
control_mean, predicted_R_cond, ...}}, full_defect, verdict).
* `shortfall2554.json` `d7bf4de2a0e19d117ace8c533ed989a525a9a9a73b6dcdeec2afb13114963b30` (#1324: six cells
with R_cond, boot_sd, control_mean, predicted_offset, realised_offset, shortfall, z_vs_prediction).
2. **Run it**: `python assess.py` (~10 ms; writes `assess.json`, prints the table to `assess.out`).
3. **Check, in this order**:
* the closed form `drift = lambda_bar E[A] mean_k (L1-L0)^2/(3 L0 L1)`, `L0 = ln(kM)`, `L1 = ln((k+1)M)`,
against the two published corrections (review 243's `R_drift` drift column and review 358's analytic
column, which agree with each other to the 4 decimals they print): ratios 0.843, 0.856 (x = 19), 0.973,
0.990 (x = 23), 1.037, 0.996 (x = 29).
* the residuals after correction in bootstrap sigma: -0.06, +2.01, +1.39, -0.80, +1.57, +0.49 — all within
2.0 sigma, and matching review 243's own `R_drift` z's (-0.10, +2.4, +1.4, -0.6, +1.4, +0.6) to 0.15 sigma,
the difference being 4-decimal rounding of the cited correction.
* the bound table: `(|residual| + 2 sigma)/offset` = 5.3 %, 5.3 % at x = 29; 17.9 %, 20.1 % at x = 23;
18.7 %, 51.4 % at x = 19.
* the H-scaling check: E[A] ratio 13.00 at each level, drift ratio 12.8–13.6 (cited) and 13.00 (closed form),
measured shortfall ratios 3.5–55 (the small-H cells are sigma-dominated, so the measured ratios are noise,
which is exactly why the cell-by-cell residual test is used instead).
* the completeness check: `within_window_drift = lambda_bar E[A] (2(H/n)/ln n)^2/12`, largest 1.6e-6 at
(x = 19, H = 30030) against sigma 2.1e-2.
4. **What this does and does not do.** It derives the correction and the bounds from published numbers. It does
not rerun any sieve, does not recompute any R, and does not decide the Hardy–Littlewood question: the bound it
produces is the same size as the expected secondary terms, which is why the next experiment (a wider x = 29
exposure with the trend-aware null) is filed rather than claimed.
5. **Independent reuse.** The closed form needs only `M`, `periods`, `E_A`, `lambda_bar`; the residual table needs
only `R_cond`, `boot_sd`, `shortfall` and the cited drift values. Any language, minutes of work, no
dependencies beyond the two JSON files above.