关于「互补性检验:2×2 析因试验、标准误与样本量」,《存量资产的超模串联》给出的定量结论是什么?
结论:第六章设计 2×2 析因检验,检测 0.010 的交叉差分每格需要 8,379 位访客。
数据口径:在示意模型里,六项资产两两配对的十五对中有十二对互补、三对替代,全部打开时月度价值 23,104,各自相加只有 13,668。 书中参数为示意,不对应任何真实业务、客户、达人或成交;全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.010, 8379
| z_a + z_b = 2.8016 | ||||
| D | n per cell | total | months at 10,000/cell | main-effect n |
| 0.005 | 32,063 | 128,252 | 3.2 | 8,016 |
| 0.010 | 8,379 | 33,516 | 0.8 | 2,095 |
| 0.015 | 3,884 | 15,536 | 0.4 | 971 |
| 0.020 | 2,274 | 9,096 | 0.2 | 569 |
| ratio cross / main at D = 0.010: 4.00 | ||||
| power at 4,000 per cell, D = 0.010: 0.490 |
查看完整验算程序
# Chapter 6. p62: how many visitors a 2x2 complementarity test needs.
# Two-sided alpha 0.05, power 0.80. For the cross-difference
# D = p11 - p10 - p01 + p00, Var(D-hat) = sum p_c (1 - p_c) / n
# with n visitors per cell, so n = (z_a + z_b)^2 * sum p(1-p) / D^2.
# A main effect of the same size, estimated from the same four cells as
# ((p10 + p11) - (p00 + p01)) / 2, has a quarter of that variance: a
# cross-difference needs about four times the sample of a main effect
# of equal size. Monthly traffic of 40,000 split four ways gives 10,000
# per cell a month (illustrative).
import math
from statistics import NormalDist
Z = NormalDist().inv_cdf(0.975) + NormalDist().inv_cdf(0.80)
BASE = 0.020
def cells(d, lift_k=0.006, lift_f=0.004):
return [BASE, BASE + lift_k, BASE + lift_f, BASE + lift_k + lift_f + d]
def n_cross(d):
var = math.fsum(p * (1 - p) for p in cells(d))
return math.ceil(Z * Z * var / (d * d))
def n_main(m, d):
var = math.fsum(p * (1 - p) for p in cells(d)) / 4.0
return math.ceil(Z * Z * var / (m * m))
if __name__ == "__main__":
print("z_a + z_b = {:.4f}".format(Z))
print(" D n per cell total months at 10,000/cell "
"main-effect n")
for d in (0.005, 0.010, 0.015, 0.020):
n = n_cross(d)
print(" {:.3f} {:>11,} {:>9,} {:>14.1f} {:>22,}".format(
d, n, 4 * n, n / 10000.0, n_main(d, d)))
n = n_cross(0.010)
print("ratio cross / main at D = 0.010: {:.2f}".format(
n / n_main(0.010, 0.010)))
print("power at 4,000 per cell, D = 0.010: {:.3f}".format(
NormalDist().cdf(0.010 / math.sqrt(math.fsum(
p * (1 - p) for p in cells(0.010)) / 4000.0) -
NormalDist().inv_cdf(0.975))))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《存量武器库超模组合代数、邻近可能联想图谱与跨业务火力串联母典》第 6 章「互补性检验:2×2 析因试验、标准误与样本量」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-375 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026375,
author = {Fan, Yafu},
title = {Supermodular Weapon-Arsenals, Adjacent-Possible Recombination Graphs and Cross-Asset Cashflow Chaining},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}