← 返回资讯屏轩教育 · 行业资讯

Bayes' Theorem | 贝叶斯定理

2026-08-03 03:49 · 本文部分内容由AI辅助创作

📚 Bayes' Theorem | 贝叶斯定理

Bayes' Theorem is a fundamental result in probability theory that describes how to update the probability of an event based on new evidence. Named after the Reverend Thomas Bayes, it provides a mathematical framework for reasoning under uncertainty and forms the basis for Bayesian inference in statistics.

贝叶斯定理是概率论中的一个基本结果,描述了如何基于新的证据更新某个事件的概率。该定理以托马斯·贝叶斯牧师的名字命名,为不确定条件下的推理提供了数学框架,并构成了统计学中贝叶斯推断的基础。


1. Conditional Probability Review | 条件概率回顾

Before exploring Bayes' Theorem, it is essential to understand conditional probability. The conditional probability of event A given event B, denoted P(A|B), is the probability that A occurs given that B has already occurred. It effectively shrinks the sample space to only the outcomes where B occurs, and then measures how much of A falls within that restricted space.

在探讨贝叶斯定理之前,理解条件概率至关重要。事件A在事件B发生的条件下的条件概率,记作 P(A|B),是指在B已经发生的前提下A发生的概率。它实际上将样本空间缩小到只有B发生的结果,然后衡量A在这个受限空间中所占的比例。

P(A|B) = P(A ∩ B) / P(B),     provided P(B) > 0

study Physics. The probability a student studies Chemistry given they study Physics is P(C|P) = 8/10 = 0.8.

例如,在一个30名学生的班级中,12人学习化学,8人同时学习化学和物理,10人学习物理。已知一名学生学习物理,则他学习化学的概率为 P(C|P) = 8/10 = 0.8。


2. Multiplication Law | 乘法法则

By rearranging the conditional probability definition, we obtain the multiplication law for joint probabilities. This rule allows us to compute the probability that two events occur together by chaining a marginal and a conditional probability.

重新排列条件概率的定义,我们得到联合概率的乘法法则。该规则允许我们通过将一个边缘概率与一个条件概率相乘,来计算两个事件同时发生的概率。

P(A ∩ B) = P(A) × P(B|A) = P(B) × P(A|B)

mely useful when the conditional probability is known, and it forms the numerator in Bayes' Theorem. For independent events, P(B|A) = P(B), so the multiplication law simplifies to P(A ∩ B) = P(A) × P(B).

当条件概率已知时,这个法则非常有用,它也构成了贝叶斯定理中的分子。对于独立事件,P(B|A) = P(B),因此乘法法则简化为 P(A ∩ B) = P(A) × P(B)。


3. Law of Total Probability | 全概率公式

Suppose we have a set of mutually exclusive and exhaustive events {A₁, A₂, ..., Aₙ}, which partition the sample space. For any event B, its probability can be expressed as a weighted average of the conditional probabilities P(B|Aᵢ), where the weights are the probabilities P(Aᵢ) of the partitioning events.

假设我们有一组两两互斥且完备的事件 {A₁, A₂, ..., Aₙ},它们构成了样本空间的一个划分。对任意事件 B,它的概率可以表示为条件概率 P(B|Aᵢ) 的加权平均,权重就是划分事件的概率 P(Aᵢ)。

P(B) = Σᵢ P(B|Aᵢ) × P(Aᵢ)    (sum over i = 1 to n)

In words, we sum over all the mutually exclusive paths that lead to B. This result is crucial because it provides the denominator when we invert a conditional probability using Bayes' Theorem.

简而言之,我们对所有导致B发生的互斥路径进行求和。这个结果至关重要,因为它为应用贝叶斯定理反转条件概率提供了分母。


广告 / Sponsored

4. Statement of Bayes' Theorem | 贝叶斯定理的陈述

Bayes' Theorem elegantly combines the definition of conditional probability with the law of total probability. For a partition {A₁, A₂, ..., Aₙ} and an event B with P(B) > 0, the posterior probability of a particular partition element Aₖ given B is:

贝叶斯定理巧妙地将条件概率的定义与全概率公式结合起来。对于划分 {A₁, A₂, ..., Aₙ} 且事件 B 满足 P(B) > 0,给定 B 时某个特定划分元素 Aₖ 的后验概率为:

P(Aₖ|B) = P(B|Aₖ) × P(Aₖ) / P(B) = P(B|Aₖ) × P(Aₖ) / Σᵢ P(B|Aᵢ) × P(Aᵢ)

Here, P(Aₖ) is called the prior probability (what we believed before seeing evidence B), P(B|Aₖ) is the likelihood, and P(Aₖ|B) is the posterior probability (our updated belief). The denominator acts as a normalising constant to ensure the posterior sums to 1 over all k.

这里,P(Aₖ) 称为先验概率(看到证据B之前的信念),P(B|Aₖ) 是似然度,而 P(Aₖ|B) 是后验概率(更新后的信念)。分母起到了标准化常数的作用,确保所有k上的后验概率之和为1。


5. Derivation of Bayes' Theorem | 贝叶斯定理的推导

The derivation is short, starting from the definition of conditional probability for P(Aₖ|B).

推导过程简短,从 P(Aₖ|B) 的条件概率定义开始。

P(Aₖ|B) = P(Aₖ ∩ B) / P(B)

Then, rewrite P(Aₖ ∩ B) using the multiplication law: P(Aₖ ∩ B) = P(B| rator and replacing the denominator P(B) with the total probability expansion yields Bayes' Theorem. This simple algebraic manipulation underpins all Bayesian reasoning.

然后,用乘法法则改写 P(Aₖ ∩ B):P(Aₖ ∩ B) = P(B|Aₖ) × P(Aₖ)。将其代入分子,并将分母 P(B) 替换为全概率展开式,就得到了贝叶斯定理。这个简单的代数操作是所有贝叶斯推理的基础。


6. Intuitive Interpretation: Updating Beliefs | 直观解读:信念更新

Bayes' Theorem formalises the process of learning from experience. The prior P(Aₖ) represents our initial degree of belief. The likelihood P(B|Aₖ) captures how compatible the new evidence B is with each possible hypothesis Aₖ. Multiplying them and dividing by the total probability of the evidence essentially reweights our beliefs. The resulting posterior can then become the prior for the next piece of evidence, enabling sequential updating.

贝叶斯定理将从经验中学习的过程形式化。先验 P(Aₖ) 代表我们初始的信念程度;似然度 P(B|Aₖ) 捕捉了新的证据 B 与每个可能的假设 Aₖ 的兼容程度。将它们相乘并除以证据的总概率,实质上是重新调整了我们的信念权重。得到的后验概率随后可以作为下一个证据的先验,实现顺序更新。

This is why Bayes' Theorem is so powerful in fields ranging from medical diagnosis to machine learning: it quantifies how rational agents should change their mind in light of new data.

这就是为什么贝叶斯定理从医学诊断到机器学习等领域都如此强大:它量化了理性决策者应当如何在面对新数据时改变想法。


7. Medical Testing Example | 医学检测示例

A classic illustration involves testing for a rare disease. Suppose a disease affects 1% d P(healthy) = P(H) = 0.99. A diagnostic test has a sensitivity (true positive rate) of 95%: P(+|D) = 0.95, and a specificity (true negative rate) of 95%, meaning the false positive rate P(+| t to know the probability a person truly has the disease given a positive test result, P(D|+).

一个经典示例涉及对罕见病的检测。假设某种疾病影响1%的人口,所以先验概率 P(D) = 0.01,P(健康) = P(H) = 0.99。一种诊断方法的灵敏度(真阳性率)为95%:P(+|D) = 0.95,特异度(真阴性率)为95%,即假阳性率 P(+|H) = 0.05。我们希望得知,在检测结果呈阳性的条件下,此人确实患病的概率 P(D|+)。

Applying Bayes' Theorem:

应用贝叶斯定理:

P(D|+) = P(+|D) P(D) / [P(+|D)P(D) + P(+|H)P(H)]

= (0.95 × 0.01) / (0.95 × 0.01 + 0.05 × 0.99) = 0

Published by TutorHao | IB Mathematics Revision Series | aleveler.com

广告 / Sponsored
IBDP国际文凭计算机科学学生用书 高级及标准水平 Computer Science for the IB Diplo…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥524.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao