# Public fixed-margin law/event review

This is a concrete technical workflow using public documentation inputs. It is not a customer case, expert review, experiment design validation or a source-sampler implementation. [audit_contingency_law.py](../tools/audit_contingency_law.py) computes a complete finite support, each rational mass, one explicitly defined event under a declared intended law, and the same event's probability under a candidate law. A fixed event is necessary to compare the models; silently redefining “extreme” under a different law changes the question.

The [R tea example](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/fisher.test.html) supplies [[3,1],[1,3]] with a positive-association alternative. Our independent enumeration of all 70 assignments of four labels to eight distinct slots yields table masses 1/70,16/70,36/70,16/70,1/70. The declared upper-left tail has probability 17/70 under conditional independence versus 2/5 under a uniform law on the five integer tables. Exact TV is 13/35. Both exceed the declared 1/20 threshold. [Input](../fixtures/contingency-r-tea-tasting-2026-10-09-v1.json), [complete report](contingency-r-tea-tasting-2026-10-09-v1.json).

For the public SciPy example [[8,2],[1,5]], our probability-order event is defined under the intended conditional-independence law, then held fixed. Its probability is 5/143 under that law and 3/7 under uniform feasible tables. The 1/20 classification changes. This shows an exact consequence of model substitution, not an error in SciPy. [Documented input](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html), [input record](../fixtures/contingency-scipy-fisher-threshold-2026-10-09-v1.json), [exact comparison](contingency-scipy-fisher-threshold-2026-10-09-v1.json).

A separate two-by-three documented margin example checks the per-table column-frequency weights. The underlying fixed-margin law is already provided by existing statistical tools. [Primary distribution API](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.random_table.html), [exact report](contingency-scipy-random-table-2026-10-09-v1.json). The proposed component is an auditable law/constraint/event report, not a replacement RNG or evidence that those tools use an incorrect model.

An explicitly generated bound-conditioning control restricts the tea margins to upper-left values zero/one. The original independence event has mass 17/70, and its conditioned law is 1/17,16/17; uniform tables give 1/2,1/2. A structural-zero restriction to one table has original mass 1/70 and conditioned mass one. This chosen conditioning operation does not automatically model a real structural-zero mechanism. [Bounded control](contingency-explicit-bound-conditioning-2026-10-09-v1.json).

[617 controls](../snapshots/2026-10-08-baseline/contingency-event-law-validation-2026-10-09-v1.json) compare all two-by-two margins up to total eight with hypergeometric closed forms, labelled assignments and a separate bounded three-row Cartesian oracle; they also test exact thresholds, same-event comparison, explicit conditioning and unknown-budget behavior. The utility caps dimension six, total 128, 2,000 tables, 50,000 memo states, one million count and four million enumeration work units. No partial probability or classification is returned on exhaustion.

A live comparison now succeeds in a fresh isolated Python 3.12.14 environment with SciPy 1.18.1 and NumPy 2.5.3. [586 controls](../snapshots/2026-10-08-baseline/scipy-live-law-validation-2026-10-09-v1.json) compare all per-table pmfs and every Fisher probability-order event across 284 two-by-two margin pairs at totals one through eight, comprising 494 observed tables. Five public/generated fixture cases also compare the fixed event and explicit bound-event renormalization. [Versioned runtime/results](scipy-live-contingency-comparison-2026-10-09-v1.json). Floating comparison uses relative tolerance 2e-12 and absolute tolerance 2e-14 against the rational reference.

The default installation and a first fresh SciPy 1.15.3/NumPy 2.2.6 environment fail through the native _spropack zero-fill section loader error; all existing and fresh environments are preserved. The succeeding 1.18.1 environment does not repair or overwrite those installations. R was not run, package-wheel hashes were not captured during the SciPy installation, and no RNG, source FPRAS, proof, large-support or experiment-design certification follows. The [earlier failed-import record](../snapshots/2026-10-08-baseline/data-flow-external-evidence-2026-10-09-v1.json) remains accurate for its dated run.

The next business test is whether a repeated aggregate-review workflow has material law/constraint mistakes that this report catches with less preparation and support effort than current practice. A public teaching example shows technical relevance, not willingness to pay. [Current dossier](../opportunities/004-fixed-margin-data-sandbox/2026-10-09-v4.md).
