关于「警报阈值:信号检测、ROC、代价矩阵与每屏警报上限」,《数据后台减负与防呆表单》给出的定量结论是什么?
结论:海桥 Harbourbridge 的对账后台每天进来约 1,200 行流水,按第一章定下的全书样本,其中 18 行是真异常:金额不符、重复入账、汇率错用、有款无单、已付未到账。系统给每一行算一个「异常分」,分数越过某条线,这一行就被标红。第三章讲了红色怎样被眼睛先看见、红色该分几层;本章讲那条线该画在哪里。
数据口径:本书不是会计、审计或法律意见。 书中以标注框区分已发表的证据、可运行的计算、原典与作者的假说,每条假说都写明什么结果会推翻它;原典考辨取唐代刘晏的报数制度,原文只转述大意。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 1200, 18
| rows per day 1,200; true anomalies 18 (base rate 0.015); clean rows 1,182 | |||||||
| rule with d' = 2.0 | |||||||
| t | hit | FA | hits | misses | false | flags | PPV |
| 1.0 | 0.841 | 0.1587 | 15.14 | 2.86 | 187.5 | 202.7 | 0.075 |
| 1.5 | 0.691 | 0.0668 | 12.45 | 5.55 | 79.0 | 91.4 | 0.136 |
| 2.0 | 0.500 | 0.0228 | 9.00 | 9.00 | 26.9 | 35.9 | 0.251 |
| 2.5 | 0.309 | 0.0062 | 5.55 | 12.45 | 7.3 | 12.9 | 0.431 |
| 3.0 | 0.159 | 0.0013 | 2.86 | 15.14 | 1.6 | 4.5 | 0.642 |
| 3.5 | 0.067 | 0.0002 | 1.20 | 16.80 | 0.3 | 1.5 | 0.814 |
| rule with d' = 2.5 | |||||||
| t | hit | FA | hits | misses | false | flags | PPV |
| 1.0 | 0.933 | 0.1587 | 16.80 | 1.20 | 187.5 | 204.3 | 0.082 |
| 1.5 | 0.841 | 0.0668 | 15.14 | 2.86 | 79.0 | 94.1 | 0.161 |
| 2.0 | 0.691 | 0.0228 | 12.45 | 5.55 | 26.9 | 39.3 | 0.316 |
| 2.5 | 0.500 | 0.0062 | 9.00 | 9.00 | 7.3 | 16.3 | 0.551 |
| 3.0 | 0.309 | 0.0013 | 5.55 | 12.45 | 1.6 | 7.1 | 0.777 |
| 3.5 | 0.159 | 0.0002 | 2.86 | 15.14 | 0.3 | 3.1 | 0.912 |
| two operators on the same audit set (fictional labelled week) | |||||||
| operator A: hit 0.80 FA 0.10 -> d' = 2.123, criterion c = 0.220, beta = 1.595 | |||||||
| operator B: hit 0.50 FA 0.02 -> d' = 2.054, criterion c = 1.027, beta = 8.240 |
查看完整验算程序
# Chapter 4. p40: The four cells of signal detection on one Harbourbridge reconciliation day, per threshold.
# Book-wide fictional sample (Chapter 1, p10): 1,200 ledger rows a day, 18 of them truly anomalous (0.015).
# Each row carries an anomaly score: N(0, 1) on clean rows and N(d', 1) on anomalous rows (the
# equal-variance Gaussian model of signal detection theory). Two rules: the book's working rule
# (d' = 2.0, as in p11) and a sharper reconciliation-gap score (d' = 2.5). No real data is used.
import math
from statistics import NormalDist
Z = NormalDist()
ROWS, ANOM = 1200, 18
CLEAN = ROWS - ANOM
print("rows per day {:,}; true anomalies {} (base rate {:.3f}); clean rows {:,}".format(
ROWS, ANOM, ANOM / ROWS, CLEAN))
for d in (2.0, 2.5):
print("rule with d' = {}".format(d))
print(" t hit FA hits misses false flags PPV")
for t in (1.0, 1.5, 2.0, 2.5, 3.0, 3.5):
hit = 1 - Z.cdf(t - d)
fa = 1 - Z.cdf(t)
hits, fas = ANOM * hit, CLEAN * fa
flags = hits + fas
print(" {:.1f} {:.3f} {:.4f} {:5.2f} {:6.2f} {:6.1f} {:6.1f} {:.3f}".format(
t, hit, fa, hits, ANOM - hits, fas, flags, hits / flags))
print("two operators on the same audit set (fictional labelled week)")
for name, h, f in (("operator A", 0.80, 0.10), ("operator B", 0.50, 0.02)):
zh, zf = Z.inv_cdf(h), Z.inv_cdf(f)
dp = zh - zf
c = -(zh + zf) / 2
print(" {}: hit {:.2f} FA {:.2f} -> d' = {:.3f}, criterion c = {:.3f}, beta = {:.3f}".format(
name, h, f, dp, c, math.exp(c * dp)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《高密度数据工作台视觉减负、条件格式显著性与零培训防呆表单工程》第 4 章「警报阈值:信号检测、ROC、代价矩阵与每屏警报上限」(版本 0.1.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-138 · v0.1.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026138,
author = {Fan, Yafu},
title = {Cognitive Unloading of Dense Data Workbenches, Conditional-Format Salience and Zero-Training Error-Proof Form Engineering},
year = {2026},
publisher = {5D Library},
edition = {0.1.0},
note = {DOI pending}
}