Published June 1, 2026 | Version v1
Computational notebook Open

Companion verification code for "The information limit of consensus detection on bounded ordinal scales"

Description

This archive contains the verification and figure-generation code for the manuscript "The information limit of consensus detection on bounded ordinal scales" (submitted to Statistics & Probability Letters). The manuscript establishes a per-item lower bound, equal to the Chernoff information C between consensus and polarization vote-generating laws, on the error of any test that decides consensus from item-level statistics on a bounded ordinal (Likert) scale. It then shows that mean/variance heuristics are exponentially sub-optimal relative to this bound, that symmetric soft polarization vanishes quartically in the Chernoff information at small faction separation, and that the same gap diverges exponentially when viewed as a false-discovery rate on the consensus verdict.

The code reproduces every numerical claim of the manuscript and its supplementary material. It is organised as a small Python library plus three driver scripts: a reviewer-facing verification driver with programmatic assertions, a figure-generation script, and a SageMath script for symbolic verification of two analytical identities. Running python3 companion.py --quick (about 30 seconds) reproduces every numerical value in the manuscript and confirms each via an assertion; running it without --quick (about three minutes) raises the Monte-Carlo replications. All random seeds are fixed for bit-level reproducibility.

Dependencies are minimal: Python 3.10 or later with NumPy and SciPy for the core driver, Matplotlib for figure generation, and SageMath 10.x for the optional symbolic script (the numerical content does not depend on it). Tested on Linux and macOS. The archive is distributed under the MIT licence for code and CC0 for any tabular data, with no restrictions on reuse.

Files

Files (45.9 kB)

Name Size Download all
md5:fc1e3f06548dfb89ae223355815ec3e8
26.6 kB Download
md5:dcb4493e2f4b770ec27d8ab5c71e7480
10.0 kB Download
md5:27a13bbe9484bce545108d1284716e9f
2.0 kB Download
md5:532c66cc80d51b545a6c4d8e166588d8
7.4 kB Download