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 | ||||
| n | CI covers mean | CI covers next | conformal next | CI width |
| 10 | 0.9410 | 0.4925 | 1.0000 | 211.5 |
| 30 | 0.9450 | 0.2867 | 0.9517 | 116.8 |
| 100 | 0.9525 | 0.1578 | 0.9558 | 62.9 |
| 300 | 0.9547 | 0.0912 | 0.9499 | 36.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
- Chapter 1 · The Coverage Gap of Normal Intervals: Heavy-Tailed Orders Push Every Miss to the Right
- Chapter 2 · The Correct Rank: Why "Plus One" Matters and Where the Finite-Sample Guarantee Comes From
- Chapter 3 · The Price of the Guarantee: Interval Width, the Shape of the Score and the Extra Paid When Normality Holds
- Chapter 4 · How Large a Calibration Set: Coverage Given the Calibration Set Follows a Beta Law
- Chapter 5 · Marginal Is Not Conditional: Traffic Bands, Customer Segments and Intervals Too Wide to Use
- Chapter 6 · When Exchangeability Breaks: Weekend Effects, Growth Drift, Promotion Shocks and Three Repairs
- Chapter 8 · Closing the Loop: the Weekly Order-Count Interval Sheet, the Conformal Interval Calculator and a Pre-Registered Test