关于「东西方原典考辨:《尚书·洪范》「三人占,则从二人之言」与孔多塞 1785 年的《论文》」,《相关误差下的多模型投票》给出的定量结论是什么?

结论:第七章考辨《尚书·洪范》「三人占,则从二人之言」与孔多塞的《论文》,只分析投票结构,不做任何占断:独立时票差为 5 的多数判对概率是 0.9857,相关系数 0.1、一百零一票时只有 0.5819;三人中二人一致时,相关系数 0.3 下多数判对的概率是 0.6077。

数据口径:书中参数为示意;全部计算由书中程序生成;本书是非个人化的经营分析,不构成经营建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(19 段程序)、原典与作者的假说。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.1, 0.3, 0.5819, 0.6077, 0.9857

probability the winning side is right, p = 0.70
nkmarginrho=0rho=0.1rho=0.3rho=0.5
3210.70000.66360.60770.5667
3330.92700.89050.82950.7818
9510.70000.60590.54520.5222
9750.98570.90190.72810.6220
9990.99950.98730.92320.8474
251550.98570.75090.58870.5404
2525251.00000.99930.96760.8931
1015350.98570.58190.52280.5099
101 1011011.00001.00000.99080.9359
查看完整验算程序
# Chapter 7. p72: what a winning margin is worth, Condorcet vs shared
# errors. Model: yes/no question, both answers equally likely in
# advance. Independent voters right with prob p: after k of n vote for
# an answer, it is right with probability p^m / (p^m + (1 - p)^m),
# m = 2k - n, which depends on the margin m alone (the classical
# reading of Condorcet's analysis). With exchangeable correlated
# errors (Beta-binomial, p21) the same tally is worth
# BB(k) / (BB(k) + BB(n - k)), which depends on n and saturates.
# p = 0.70; values of rho illustrative.
import math



def lbeta(a, b):
    return math.lgamma(a) + math.lgamma(b) - math.lgamma(a + b)


def ab(p, rho):
    s = 1 / rho - 1
    return p * s, (1 - p) * s


def bb_major(n, p, rho):
    if rho == 0:
        lp, lq = math.log(p), math.log(1 - p)
        terms = [math.exp(math.lgamma(n + 1) - math.lgamma(k + 1)
                          - math.lgamma(n - k + 1) + k * lp
                          + (n - k) * lq)
                 for k in range(n // 2 + 1, n + 1)]
        return math.fsum(terms)
    a, b = ab(p, rho)
    terms = [math.exp(math.lgamma(n + 1) - math.lgamma(k + 1)
                      - math.lgamma(n - k + 1) + lbeta(k + a, n - k + b)
                      - lbeta(a, b))
             for k in range(n // 2 + 1, n + 1)]
    return math.fsum(terms)


def betacf(a, b, x):
    tiny = 1e-300
    c, d = 1.0, 1.0 - (a + b) * x / (a + 1)
    d = 1.0 / (d if abs(d) > tiny else tiny)
    h = d
    for m in range(1, 400):
        m2 = 2 * m
        for num in (m * (b - m) * x / ((a + m2 - 1) * (a + m2)),
                    -(a + m) * (a + b + m) * x / ((a + m2) * (a + m2 + 1))):
            d = 1.0 + num * d
            d = 1.0 / (d if abs(d) > tiny else tiny)
            c = 1.0 + num / c
            c = c if abs(c) > tiny else tiny
            h *= d * c
        if abs(d * c - 1.0) < 1e-15:
            break
    return h


def betai(a, b, x):
    if x <= 0:
        return 0.0
    if x >= 1:
        return 1.0
    lead = math.exp(a * math.log(x) + b * math.log(1 - x) - lbeta(a, b))
    if x < (a + 1) / (a + b + 2):
        return lead * betacf(a, b, x) / a
    return 1.0 - lead * betacf(b, a, 1 - x) / b


def limit(p, rho):
    if rho == 0:
        return 1.0 if p > 0.5 else 0.0
    a, b = ab(p, rho)
    return 1.0 - betai(a, b, 0.5)


def bb_pk(k, n, p, rho):
    if rho == 0:
        return math.comb(n, k) * p ** k * (1 - p) ** (n - k)
    a, b = ab(p, rho)
    return math.exp(math.lgamma(n + 1) - math.lgamma(k + 1)
                    - math.lgamma(n - k + 1) + lbeta(k + a, n - k + b)
                    - lbeta(a, b))


def post(k, n, p, rho):
    x, y = bb_pk(k, n, p, rho), bb_pk(n - k, n, p, rho)
    return x / (x + y)


if __name__ == "__main__":
    p = 0.7
    print("probability the winning side is right, p = 0.70")
    print("   n   k  margin   rho=0  rho=0.1  rho=0.3  rho=0.5")
    for n, k in ((3, 2), (3, 3), (9, 5), (9, 7), (9, 9), (25, 15),
                 (25, 25), (101, 53), (101, 101)):
        cells = "  ".join("{:.4f}".format(post(k, n, p, r))
                          for r in (0.0, 0.1, 0.3, 0.5))
        print("  {:>3} {:>3} {:>6}   {}".format(n, k, 2 * k - n, cells))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《孔多塞陪审团定理与相关误差、多模型投票何时越投越准何时同源共错母典》第 7 章「东西方原典考辨:《尚书·洪范》「三人占,则从二人之言」与孔多塞 1785 年的《论文》」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-309 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026309,
  author    = {Fan, Yafu},
  title     = {Condorcet's Jury Theorem with Correlated Errors: When Multi-Model Voting Gets More Accurate and When Shared Origins Make Everyone Wrong Together},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论