返回题库

三重硬币

Triple Coin

专题
Probability / 概率
难度
L3

题目详情

你有 3 个硬币。一枚总是正面朝上,一枚总是反面,一枚只是一枚普通的公平硬币。如果你选择一枚硬币,抛两次,两次都出现正面,那么再次抛同一枚硬币,再次出现正面的概率是多少?

You have 3 coins. One always comes up heads, one always comes up tails, and one is just a regular fair coin. If you pick one coin, flip it twice and get heads twice, what's the probability of flipping the same coin again and getting heads again?

解析

设随机变量 CC 表示选到的硬币:

  • c1c_1:永远正面
  • c2c_2:永远反面
  • c3c_3:公平硬币

观察到两次都为正面(记为 HHHH)后,只可能是 c1c_1c3c_3

先用贝叶斯更新选中硬币的后验概率:

P(HHc1)=1,P(HHc2)=0,P(HHc3)=(12)2=14,P(HH|c_1)=1,\quad P(HH|c_2)=0,\quad P(HH|c_3)=\left(\frac12\right)^2=\frac14,

且先验 P(c1)=P(c2)=P(c3)=13P(c_1)=P(c_2)=P(c_3)=\frac13。因此

P(HH)=131+130+1314=512,P(HH)=\frac13\cdot 1+\frac13\cdot 0+\frac13\cdot \frac14=\frac{5}{12}, P(c1HH)=13512=45,P(c3HH)=112512=15.P(c_1|HH)=\frac{\frac13}{\frac{5}{12}}=\frac45,\quad P(c_3|HH)=\frac{\frac{1}{12}}{\frac{5}{12}}=\frac15.

第三次为正面的概率为

P(H3HH)=145+1215=910.P(H_3|HH)=1\cdot\frac45+\frac12\cdot\frac15=\boxed{\frac{9}{10}}.

Original Explanation

Lets call HiH_i the result of having a heads on the ii-th throw, and CC the random variable corresponding to the choice of the coin, with three possible values: c1c_1 is the coin which always comes up heads, c2c_2 is the the coin which always comes up tails, and c3c_3 is the fair coin.

=P(H3H1H2)=P(H1H2H3H1H2)=P(H1H2H3)P(H1H2)=CP(H1H2H3,C)CP(H1H2,C)= P(H_3 | H_1H_2) = P(H_1 H_2 H_3 | H_1 H_2) = \frac{P(H_1H_2H_3)}{P(H_1H_2)} = \frac{\sum_CP(H_1H_2H_3,C)}{\sum_CP(H_1H_2,C)}

Lets compute the numerator: CP(H1H2H3,C)=P(H1H2H3c1)P(c1)+P(H1H2H3c2)P(c2)+P(H1H2H3c3)P(c3)=1×1/3+0×1/3+1/8×1/3=9/24\sum_CP(H_1H_2H_3,C) = P(H_1H_2H_3|c_1)P(c_1) + P(H_1H_2H_3|c_2)P(c_2) + P(H_1H_2H_3|c_3)P(c_3) \\ = 1 \times 1/3 + 0 \times 1/3 + 1/8 \times 1/3 = 9/24

Lets compute the denominator:

CP(H1H2,C)=P(H1H2c1)P(c1)+P(H1H2c2)P(c2)+P(H1H2c3)P(c3)=1×1/3+0×1/3+1/4×1/3=5/12\sum_CP(H_1H_2,C) = P(H_1H_2|c_1) P(c_1) + P(H_1H_2|c_2)P(c_2) + P(H_1H_2|c_3)P(c_3) \\ = 1 \times 1/3 + 0 \times 1/3 + 1/4 \times 1/3 = 5/12\\

Putting these two together we get:

P(H3H1H2)=9/245/12=910P(H_3|H_1H_2) = \frac{9/24}{5/12} = \frac{9}{10}