What does Ockham's Razor for Rule Bases conclude, in numbers, about “Closing the Loop: the Admission Check-up, the Rule Admission Description-Length Referee and a Pre-registered Plan of Refutation”?

Answer: Chapter 8 gives the admission check-up, the distilled Rule Admission Description-Length Referee and a pre-registered plan of refutation; testing whether the gate beats no gate needs 2,733 hold-out records per arm. Marked boxes separate published evidence, runnable Python calculations (18 programs), classical sources and the author's hypotheses.

Scope of the numbers: All decision records are synthetic, all parameters illustrative, and all calculations generated by the book's programs; it is general business analysis, not personalised business advice. Marked boxes separate published evidence, runnable Python calculations (18 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 2733

part 1: ledger records needed (d 16 bits, p 0.25, m 2)
cell share c q0.60 q=0.70 q=0.85
0.024091 2043 1179
0.051651 826 443
0.10826 388 208
part 2: hold-out records per arm (alpha 0.05, power 0.80)
MDL gate vs proposer end0.1916 vs 0.2223: 2733
MDL gate vs oracle0.1916 vs 0.1872: 124485
Show the full program
# Chapter 8. p82: sample sizes for the pre-registered test.
# Part 1: how many ledger records N before a rule of cell share c and
#   act rate q (inside its cell) can clear the gate: SE margin > d with
#   d = 16 bits, overall exception share p = 0.25, a two-condition rule
#   (mean log2 V of p22), k = 3 rules already. Expected counts, exact
#   code lengths (p21), smallest N found by doubling and bisection.
# Part 2: hold-out records per arm for a two-sided two-proportion test,
#   alpha 0.05, power 0.80, normal approximation; error rates taken from
#   p32 (MDL gate 0.1916, proposer end 0.2223, oracle 0.1872).
import math
from statistics import NormalDist

V = (4, 4, 3, 4, 3, 5)
A = len(V)


def gamma(n):
    return 2 * (n.bit_length() - 1) + 1


def exc_bits(n, e):
    return gamma(e + 1) + math.log2(math.comb(n, e))


def cost(m=2, k=3):
    lv = math.fsum(math.log2(v) for v in V) / A
    return math.fsum([float(gamma(m)), math.log2(math.comb(A, m)),
                      m * lv, float(gamma(k + 2) - gamma(k + 1))])


def margin(n, c, q, p=0.25):
    e = round(p * n)
    net = round(n * c * (2 * q - 1))
    return exc_bits(n, e) - exc_bits(n, e - net) - cost()


def n_min(c, q, d=16.0):
    hi = 50
    while margin(hi, c, q) <= d:
        hi *= 2
    lo = hi // 2
    while hi - lo > 1:
        mid = (lo + hi) // 2
        lo, hi = (lo, mid) if margin(mid, c, q) > d else (mid, hi)
    return hi


def per_arm(p1, p2, alpha=0.05, power=0.80):
    z = NormalDist()
    za, zb = z.inv_cdf(1 - alpha / 2), z.inv_cdf(power)
    pb = (p1 + p2) / 2
    num = za * math.sqrt(2 * pb * (1 - pb)) + zb * math.sqrt(
        p1 * (1 - p1) + p2 * (1 - p2))
    return math.ceil(num * num / (p1 - p2) ** 2)


if __name__ == "__main__":
    print("part 1: ledger records needed (d 16 bits, p 0.25, m 2)")
    print("  cell share c   q=0.60   q=0.70   q=0.85")
    for c in (0.02, 0.05, 0.10):
        print("  {:>12.2f} {:>8} {:>8} {:>8}".format(
            c, *[n_min(c, q) for q in (0.60, 0.70, 0.85)]))
    print("part 2: hold-out records per arm (alpha 0.05, power 0.80)")
    for name, p1, p2 in (("MDL gate vs proposer end", 0.1916, 0.2223),
                         ("MDL gate vs oracle", 0.1916, 0.1872)):
        print("  {:<25} {:.4f} vs {:.4f}: {:>7}".format(
            name, p1, p2, per_arm(p1, p2)))

Single source and citation

Fan, Y. (2026). The Minimum Description Length Principle and Ockham's Razor for Rule Bases: Two-Part Codes that Decide Whether a New Rule Earns Its Place (Version 1.0.0), Chapter 8: Closing the Loop: the Admission Check-up, the Rule Admission Description-Length Referee and a Pre-registered Plan of Refutation. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-311 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026311,
  author    = {Fan, Yafu},
  title     = {The Minimum Description Length Principle and Ockham's Razor for Rule Bases: Two-Part Codes that Decide Whether a New Rule Earns Its Place},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book