设随机变量 C 表示选到的硬币:
- c1:永远正面
- c2:永远反面
- c3:公平硬币
观察到两次都为正面(记为 HH)后,只可能是 c1 或 c3。
先用贝叶斯更新选中硬币的后验概率:
P(HH∣c1)=1,P(HH∣c2)=0,P(HH∣c3)=(21)2=41,
且先验 P(c1)=P(c2)=P(c3)=31。因此
P(HH)=31⋅1+31⋅0+31⋅41=125,
P(c1∣HH)=12531=54,P(c3∣HH)=125121=51.
第三次为正面的概率为
P(H3∣HH)=1⋅54+21⋅51=109.
Original Explanation
Lets call Hi the result of having a heads on the i-th throw, and C the random variable corresponding to the choice of the coin, with three possible values: c1 is the coin which always comes up heads, c2 is the the coin which always comes up tails, and c3 is the fair coin.
=P(H3∣H1H2)=P(H1H2H3∣H1H2)=P(H1H2)P(H1H2H3)=∑CP(H1H2,C)∑CP(H1H2H3,C)
Lets compute the numerator:
C∑P(H1H2H3,C)=P(H1H2H3∣c1)P(c1)+P(H1H2H3∣c2)P(c2)+P(H1H2H3∣c3)P(c3)=1×1/3+0×1/3+1/8×1/3=9/24
Lets compute the denominator:
C∑P(H1H2,C)=P(H1H2∣c1)P(c1)+P(H1H2∣c2)P(c2)+P(H1H2∣c3)P(c3)=1×1/3+0×1/3+1/4×1/3=5/12
Putting these two together we get:
P(H3∣H1H2)=5/129/24=109