贝叶斯更新Bayesian Updating
一条新证据应该怎样改变我们对不同解释的相信程度?How should new evidence change our weights for competing explanations?
前置知识:Prerequisites: B13:条件概率。B13: conditional probability.
复习前置:Review prerequisites: B13 · 条件概率Conditional Probability
学完后你能:After this lesson you can: 计算先验与似然的乘积,归一化后验,并识别不可能证据。Multiply prior by likelihood, normalize posteriors, and recognize impossible evidence.
动手观察Explore
调整选中盒子 A 的先验概率,观察抽到红球后两盒的未归一化权重与后验;再试不可能证据。Adjust the prior probability of box A and observe unnormalized weights and posteriors after a red ball; then try impossible evidence.
从观察到解释From observation to explanation
先验与证据Prior and evidence
假设两个盒子事先各有一半机会被选中。A 盒抽红概率是 0.8,B 盒是 0.2。看到红球后,先分别乘:A 的权重 0.5×0.8=0.4,B 为 0.5×0.2=0.1。Suppose each box is initially equally likely. The probability of red is 0.8 in A and 0.2 in B. After seeing red, multiply first: A has weight 0.5×0.8=0.4 and B has 0.5×0.2=0.1.
归一化Normalize
两个权重之和为 0.5。把各自权重除以 0.5,得到 A 的后验 0.8、B 的后验 0.2;它们相加为 1。The weights sum to 0.5. Divide each by 0.5 to get posterior probabilities 0.8 for A and 0.2 for B; together they sum to 1.
先验会改变结论The prior changes the answer
即使红球更支持 A,如果 A 的先验很低,它的后验也可能不高。后验由先验与证据共同决定,不能把 P(红|A) 直接当成 P(A|红)。Even if red favors A, a very low prior for A can leave its posterior low. The posterior depends on both prior and evidence; P(red|A) is not the same as P(A|red).
公式与符号Formula and symbols
Hᵢ 是第 i 个互斥且覆盖所有情况的盒子假设,E 是证据;P(Hᵢ) 是先验,P(E|Hᵢ) 是该假设下的证据概率;分母是总证据概率,必须大于零。Hᵢ is the i-th mutually exclusive and exhaustive box hypothesis; E is evidence. P(Hᵢ) is the prior, P(E|Hᵢ) the evidence probability under that hypothesis, and the denominator is total evidence probability, which must be positive.
留意这个区别Watch for this
若两个盒子都不可能产生所观察的证据,总权重为零,所给假设下后验未定义。If neither box can produce the observed evidence, total weight is zero and the posterior under those hypotheses is undefined.
继续探索Explore further
课后练习
检验你的理解