关于「东西方原典考辨:郭守敬「历之本在于测验」与奈曼的置信区间」,《共形预测与订单区间》给出的定量结论是什么?
结论:第七章考辨郭守敬「历之本在于测验」与奈曼 1937 年的置信区间,并说明把均值的置信区间当作预测区间时,三百周历史下对下一周的覆盖率只有 0.0912。
数据口径:书中参数为示意;全部计算由书中程序生成;本书属于非个人化经营建议。 本书作蓝图修正:正态区间的缺口是本书程序的模拟结果,集中在右尾与单侧上界;东方原典句出自《元史·郭守敬传》。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 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 |
查看完整验算程序
# 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])))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《共形预测与无分布区间、订单量与客单价有限样本覆盖保证母典》第 7 章「东西方原典考辨:郭守敬「历之本在于测验」与奈曼的置信区间」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}