关于「东西方原典考辨:《吕氏春秋·察传》与 Yule 1903」,《辛普森悖论与后门调整》给出的定量结论是什么?
结论:第七章考辨《吕氏春秋·察传》「辞多类非而是,多类是而非」与 Yule 1903。
数据口径:书中门店、方案与成交数均为示意;全部计算由书中程序生成。 第一章在伯克利六个最大院系上复算反转:合并后男性录取率 0.445、女性 0.304,按申请者构成标准化后男性 0.387、女性 0.430;三店示意报表中甲在每店都高 0.050,合并后却落后 0.2493,并给出反转可能的充要条件。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| (a) flip chance per retelling q | 0.1 |
| after | 1 retellings P(wrong) = 0.1000 |
| after | 2 retellings P(wrong) = 0.1800 |
| after | 3 retellings P(wrong) = 0.2440 |
| after | 5 retellings P(wrong) = 0.3362 |
| after 10 retellings P(wrong) | 0.4463 |
| after 20 retellings P(wrong) | 0.4942 |
| (b) h looks-right-is-wrong looks-wrong-is-right total | |
| 0.10 | 0.0600 0.0585 0.1185 |
| 0.25 | 0.1244 0.1183 0.2427 |
| 0.40 | 0.1559 0.1553 0.3113 |
| 0.49 | 0.1736 0.1747 0.3483 |
查看完整验算程序
# Chapter 7. p71: "white becomes black after several retellings" and
# "seems right but is wrong", written as two checkable quantities.
# (a) Each retelling flips a yes/no claim with probability q; after n
# retellings P(wrong) = (1 - (1 - 2q)^n) / 2, exact Fraction.
# (b) Random three-branch worlds (no sampling noise): branch weights
# uniform on the simplex, B rates uniform in [0.05, 0.85], branch
# effects uniform in [-0.1, 0.1], P(A | branch) uniform in
# [0.5 - h, 0.5 + h]. How often does the pooled gap carry the
# wrong sign relative to the back-door average effect?
# Fixed seed; parameters illustrative.
import math
import random
from fractions import Fraction as F
WORLDS = 20000
def world(rng, h):
g = [rng.expovariate(1.0) for _ in range(3)]
t = math.fsum(g)
pz = [x / t for x in g]
pb = [rng.uniform(0.05, 0.85) for _ in range(3)]
ef = [rng.uniform(-0.1, 0.1) for _ in range(3)]
pa = [rng.uniform(0.5 - h, 0.5 + h) for _ in range(3)]
ate = math.fsum(pz[s] * ef[s] for s in range(3))
ma = math.fsum(pz[s] * pa[s] for s in range(3))
ya = math.fsum(pz[s] * pa[s] * (pb[s] + ef[s]) for s in range(3))
yb = math.fsum(pz[s] * (1 - pa[s]) * pb[s] for s in range(3))
pooled = ya / ma - yb / (1 - ma)
return ate, pooled
def main():
q = F(1, 10)
print("(a) flip chance per retelling q = {}".format(float(q)))
for n in (1, 2, 3, 5, 10, 20):
p = (1 - (1 - 2 * q) ** n) / 2
print(" after {:2d} retellings P(wrong) = {:.4f}".format(
n, float(p)))
rng = random.Random(20261113)
print("(b) h looks-right-is-wrong looks-wrong-is-right total")
for h in (0.1, 0.25, 0.4, 0.49):
a = b = 0
for _ in range(WORLDS):
ate, pooled = world(rng, h)
if pooled > 0 and ate < 0:
a = a + 1
elif pooled < 0 and ate > 0:
b = b + 1
print(" {:5.2f} {:15.4f} {:21.4f} {:12.4f}".format(
h, a / WORLDS, b / WORLDS, (a + b) / WORLDS))
if __name__ == "__main__":
main()唯一数据源与引用
范雅福(Fan, Y.). (2026). 《辛普森悖论与后门调整准则、多分店数据合并结论反转与因果图去混杂母典》第 7 章「东西方原典考辨:《吕氏春秋·察传》与 Yule 1903」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-302 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026302,
author = {Fan, Yafu},
title = {Simpson's Paradox and the Back-Door Criterion: Reversals When Branch Data Are Pooled and De-Confounding with Causal Graphs},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}