What does Conformal Intervals for Orders conclude, in numbers, about “Classical Sources East and West: Guo Shoujing's "The Calendar Rests on Measurement" and Neyman's Confidence Intervals”?

Answer: Chapter 7 examines Guo Shoujing's principle that the calendar rests on measurement and Neyman's confidence intervals of 1937, and shows that a confidence interval for the mean, used as a prediction interval, covers next week only 0.0912 of the time after three hundred weeks of history.

Scope of the numbers: Parameters are illustrative; all calculations are generated by the book's programs; the book is general business analysis, not individualised business advice. Marked boxes separate published evidence, runnable Python calculations (23 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: 0.0912

95% intervals from n past weeks; 4000 histories each
nCI covers meanCI covers nextconformal nextCI width
100.94100.49251.0000211.5
300.94500.28670.9517116.8
1000.95250.15780.955862.9
3000.95470.09120.949936.3
Show the full program
# Chapter 7. p72: a confidence interval is not a prediction interval.
# Model (illustrative): weekly orders log-normal with median 500 and
# sigma 0.3. From n past weeks a shop computes Neyman's 95%
# confidence interval for the mean, xbar +/- t * s / sqrt(n) (t from
# standard tables: 2.262, 2.045, 1.984, 1.968 for n = 10, 30, 100,
# 300). We record how often it covers the true mean (its own target)
# and how often it would cover next week's orders, beside split
# conformal (a third fits the median, the rest calibrate). Exact
# coverage from the CDF, 4,000 histories per n.
import math
import random
import statistics

ND = statistics.NormalDist()
MED, SIG = 500.0, 0.3
MEAN = MED * math.exp(SIG ** 2 / 2)
T = {10: 2.262, 30: 2.045, 100: 1.984, 300: 1.968}


def cdf(x):
    return 0.0 if x <= 0 else ND.cdf(math.log(x / MED) / SIG)


def one(n, rng):
    xs = [MED * math.exp(rng.gauss(0.0, SIG)) for _ in range(n)]
    m, s = statistics.fmean(xs), statistics.stdev(xs)
    h = T[n] * s / math.sqrt(n)
    hit_mean = abs(m - MEAN) <= h
    ci_next = cdf(m + h) - cdf(m - h)
    f = n // 3
    c = statistics.median(xs[:f])
    sc = sorted(abs(x - c) for x in xs[f:])
    k = math.ceil((len(sc) + 1) * 0.95)
    if k > len(sc):
        cp = 1.0
    else:
        cp = cdf(c + sc[k - 1]) - cdf(c - sc[k - 1])
    return hit_mean, ci_next, cp, 2 * h


if __name__ == "__main__":
    rng = random.Random(20261113)
    print("95% intervals from n past weeks; 4000 histories each")
    print("   n   CI covers mean  CI covers next  conformal next  CI width")
    for n in (10, 30, 100, 300):
        rows = [one(n, rng) for _ in range(4000)]
        print("{:4d}   {:.4f}          {:.4f}          {:.4f}"
              "          {:.1f}".format(
                  n, len([r for r in rows if r[0]]) / 4000,
                  math.fsum(r[1] for r in rows) / 4000,
                  math.fsum(r[2] for r in rows) / 4000,
                  statistics.median([r[3] for r in rows])))

Single source and citation

Fan, Y. (2026). Conformal Prediction and Distribution-Free Intervals: Finite-Sample Coverage Guarantees for Order Counts and Order Values (Version 1.0.0), Chapter 7: Classical Sources East and West: Guo Shoujing's "The Calendar Rests on Measurement" and Neyman's Confidence Intervals. 5D Library. DOI pending

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

BibTeX
@book{fan2026306,
  author    = {Fan, Yafu},
  title     = {Conformal Prediction and Distribution-Free Intervals: Finite-Sample Coverage Guarantees for Order Counts and Order Values},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book