Back to tree

🔄 贝叶斯:用新证据更新看法🔄 Bayes' Theorem: Updating Your Belief with Evidence

上一片里,两个独立传感器把「同时坏」的概率算得清清楚楚。可现实中我们常常反过来:先看到结果(检测阳性),再回头猜原因(到底得没得病)。贝叶斯公式,就是这件「回头猜」的利器。 Last leaf, two independent sensors made the chance of a double failure crystal clear. But reality often runs backwards: you see a result (a positive test) and must guess the cause (am I actually sick?). Bayes' theorem is the tool for that backward guess.

第 1 步:侦探的提灯与地图Step 1: The detective's lantern and map

小算盘侦探查案有个习惯:先圈出嫌疑最大的地方,再提灯去找线索。The robot detective has a habit: first circle the most likely spot, then raise the lantern for clues.

侦探提灯:先验、证据、后验
侦探先凭经验在地图上圈出最可疑的位置(先验);提灯照亮一条新线索(证据);他顺着线索,把记号移向更可能的地方(后验)。贝叶斯就是「提灯更新地图」的数学版:看法不是死的,新证据一到,就往前挪一步。 By experience the detective first circles the most likely spot on the map (the prior); the lantern lights up a fresh clue (the evidence); following it, the mark slides toward the more likely place (the posterior). Bayes is the math behind “the lantern updates the map”: a belief isn't frozen — every new clue nudges it.

那这张「会移动的地图」,用数字怎么画?So how do we draw this moving map with numbers?

第 2 步:先验 → 证据 → 后验Step 2: Prior → evidence → posterior

先验、证据、后验三步流程
三步走:①先验 = 检测前得病的概率(比如人群患病率 1%);②证据 = 检测结果阳性;③后验 = 阳性之后得病的概率。算法就一句:后验 = 真阳性 ÷ 全部阳性。别忘了,健康人也会被误报——假阳性混进分母,把后验拉低。 Three steps: ① prior = the chance of disease before testing (say, a 1% population rate); ② evidence = the positive result; ③ posterior = the chance of disease after the positive. The recipe: posterior = true positives ÷ all positives. And don't forget — healthy people get misflagged too; false positives sneak into the denominator and pull the posterior down.

听起来反直觉?把 1000 个真实的人摆出来,一眼就懂。Sounds counterintuitive? Lay out 1000 real people and it becomes obvious.

第 3 步:99% 准确的试剂盒,阳性了还可能没病?Step 3: A 99%-accurate kit — so why can a positive still be wrong?

1000 人点阵:真阳性与假阳性
1000 人里约 10 人得病。99% 准确意味着:这 10 人里约 9.9 人测出阳性;而没病的 990 人里,也有约 9.9 人被误报成阳性。于是阳性总数约 19.8 人,真病人只占约一半(约 50%)——不是 99%!病越罕见,假阳性越容易喧宾夺主。好消息:隔几天再测一次又阳性(两次独立),把 50% 当新先验再更新,后验会跳到约 99%。 About 10 of the 1000 are sick. 99% accuracy means about 9.9 of them test positive; but among the 990 healthy people, roughly 9.9 also get flagged. So there are about 19.8 positives — and only half are real (about 50%, not 99%!). The rarer the disease, the more false alarms crowd in. Good news: test again a few days later, and if it's positive once more (the two tests are independent), the posterior leaps to about 99% — yesterday's posterior becomes today's prior.

🎮 你来当检测分析师🎮 Your turn: the test analyst

先拖滑块玩模拟器,看后验概率实时变化;再答 4 道数值题,全对通关。First drag the sliders and watch the posterior move live; then answer 4 number questions — all correct to win.

一句话记住它:贝叶斯 = 用新证据更新旧看法:后验 = 真阳性 ÷ 全部阳性;病越罕见,阳性的「含金量」越低。 Remember it in one line: Bayes = update old beliefs with new evidence: posterior = true positives ÷ all positives; the rarer the disease, the less a positive means.
先验:还没看证据时的概率(患病率 1%)Prior: the probability before seeing evidence (a 1% disease rate) 后验 = 真阳性 ÷ 全部阳性;假阳性会把它拉低Posterior = true positives ÷ all positives; false positives drag it down 病越罕见越要防虚惊;两次独立检测都阳性,后验能到约 99%Rare diseases invite false alarms; two independent positives push the posterior to about 99%

← 浏览全部 302 个知识点← Browse all 302 topics

内容参考 OpenStax 等公开教材,多来源核对 · AI 生成、人工审核 · 发现错误欢迎指正,帮这片叶子长得更好。 Based on OpenStax and other open textbooks, cross-checked across sources · AI-generated, human-reviewed · Spotted a mistake? Tell us — help this leaf grow.