关于「收缩估计:詹姆斯—斯坦、埃夫隆—莫里斯的十八名击球手与收缩排名」,《均值回归与封面诅咒》给出的定量结论是什么?
结论:第四章用埃夫隆与莫里斯的十八名击球手说明收缩估计:在简化版本中,原始打击率的总平方误差是收缩估计的 3.53 倍。
数据口径:书中门店、达人、顾客与报告的参数均为示意;全部计算由书中程序生成;本书是非个人化的经营分析,不构成经营、法律或理财建议,涉及运程报告与原典之处只分析结构与概率,不作任何个人占断。 书中以标注框区分已发表的证据、可运行的 Python 计算(22 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 3.53
| k 18 | grand mean 0.2654 | shrink factor c 0.2117 | ||
| player raw JS rest | player raw JS rest | ||||
| Clemente | 0.400 0.294 0.346 | | | F.Robinson | 0.378 0.289 0.298 |
| Howard | 0.356 0.285 0.276 | | | Johnstone | 0.333 0.280 0.222 |
| Berry | 0.311 0.275 0.273 | | | Spencer | 0.311 0.275 0.270 |
| Kessinger | 0.289 0.270 0.263 | | | Alvarado | 0.267 0.266 0.210 |
| Santo | 0.244 0.261 0.269 | | | Swoboda | 0.244 0.261 0.230 |
| Unser | 0.222 0.256 0.264 | | | Williams | 0.222 0.256 0.256 |
| Scott | 0.222 0.256 0.303 | | | Petrocelli | 0.222 0.256 0.264 |
| Rodriguez | 0.222 0.256 0.226 | | | Campaneris | 0.200 0.252 0.285 |
| Munson | 0.178 0.247 0.316 | | | Alvis | 0.156 0.242 0.200 |
| total squared error: raw 0.0753 | JS 0.0213 | ratio 3.53 | ||
| players whose JS estimate is closer: 16 of 18 | ||||
查看完整验算程序
# Chapter 4. p41: Efron and Morris's 18 batters, shrunk.
# Data: hits in the first 45 at-bats of the 1970 season and the batting
# average over the rest of that season, for the 18 players of Efron and
# Morris (JASA, 1975), as distributed in the R package pscl (EfronMorris).
# A simplified James-Stein estimator (no arcsine transform):
# z_i = ybar + c (y_i - ybar), c = 1 - (k - 3) s2 / S,
# s2 = ybar (1 - ybar) / 45, S = sum of (y_i - ybar)^2.
# Error is measured against the rest-of-season average.
# 真实数据:埃夫隆与莫里斯的十八名击球手,前 45 次打数与赛季余下打击率。
import math
AB = 45
DATA = [("Clemente", 18, 0.346), ("F.Robinson", 17, 0.298),
("Howard", 16, 0.276), ("Johnstone", 15, 0.222),
("Berry", 14, 0.273), ("Spencer", 14, 0.270),
("Kessinger", 13, 0.263), ("Alvarado", 12, 0.210),
("Santo", 11, 0.269), ("Swoboda", 11, 0.230),
("Unser", 10, 0.264), ("Williams", 10, 0.256),
("Scott", 10, 0.303), ("Petrocelli", 10, 0.264),
("Rodriguez", 10, 0.226), ("Campaneris", 9, 0.285),
("Munson", 8, 0.316), ("Alvis", 7, 0.200)]
y = [h / AB for _, h, _ in DATA]
p = [r for _, _, r in DATA]
k = len(y)
ybar = math.fsum(y) / k
s2 = ybar * (1 - ybar) / AB
S = math.fsum((v - ybar) ** 2 for v in y)
c = 1 - (k - 3) * s2 / S
z = [ybar + c * (v - ybar) for v in y]
if __name__ == "__main__":
print("k {} grand mean {:.4f} shrink factor c {:.4f}"
.format(k, ybar, c))
print("player raw JS rest | player raw JS rest")
for i in range(0, k, 2):
cells = []
for j in (i, i + 1):
cells.append("{:<11} {:.3f} {:.3f} {:.3f}".format(
DATA[j][0], y[j], z[j], p[j]))
print(" | ".join(cells))
e_raw = math.fsum((a - b) ** 2 for a, b in zip(y, p))
e_js = math.fsum((a - b) ** 2 for a, b in zip(z, p))
better = len([1 for a, b, t in zip(y, z, p) if abs(b - t) < abs(a - t)])
print("total squared error: raw {:.4f} JS {:.4f} ratio {:.2f}"
.format(e_raw, e_js, e_raw / e_js))
print("players whose JS estimate is closer: {} of {}".format(better, k))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《均值回归与封面诅咒、运程报告后验校准与塞翁失马序列独立性母典》第 4 章「收缩估计:詹姆斯—斯坦、埃夫隆—莫里斯的十八名击球手与收缩排名」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-202 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026202,
author = {Fan, Yafu},
title = {Regression to the Mean and the Cover Jinx: Posterior Calibration of Fortune Reports and Serial Independence in the Tale of the Lost Horse},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}