返回题库

1000 枚硬币里找双头币

Unfair Coin

专题
Probability / 概率
难度
L4

题目详情

你有 1000 枚硬币,其中 1 枚是双头硬币(每次必为正面),其余 999 枚是公平硬币。

你随机选一枚硬币,连抛 10 次,结果全是正面。

问:你选中的是双头硬币的概率是多少?

You have 1000 coins. Among them, 1 coin is a two-headed coin (unfair), and the other 999 coins are fair. You randomly pick one coin and toss it 10 times. All 10 results are heads. What is the probability that the chosen coin is the unfair one?

解析

AA 为“选中双头币”,BB 为“10 连正”。

P(A)=11000,P(BA)=1,P(BAc)=(12)10=11024.P(A)=\frac{1}{1000},\quad P(B\mid A)=1,\quad P(B\mid A^c)=\left(\frac12\right)^{10}=\frac{1}{1024}.

贝叶斯:

P(AB)=P(BA)P(A)P(BA)P(A)+P(BAc)P(Ac)=1100011000+9991000110240.506.P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B\mid A)P(A)+P(B\mid A^c)P(A^c)} =\frac{\frac{1}{1000}}{\frac{1}{1000}+\frac{999}{1000}\cdot\frac{1}{1024}}\approx 0.506.

Original Explanation

Let AA = “the chosen coin is the two-headed coin,” and BB = “10 heads in a row.”

  • P(A)=11000,P(Ac)=9991000.P(A) = \frac{1}{1000}, \quad P(A^c) = \frac{999}{1000}.
  • P(BA)=1,P(B \mid A) = 1,
  • P(BAc)=(12)10=11024.P(B \mid A^c) = \left(\frac{1}{2}\right)^{10} = \frac{1}{1024}.

By Bayes’ formula: P(AB)=P(BA)P(A)P(BA)P(A)+P(BAc)P(Ac)=1100011000+9991000110240.5.P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B \mid A)\,P(A) + P(B \mid A^c)\,P(A^c)} = \frac{\frac{1}{1000}}{\frac{1}{1000} + \frac{999}{1000}\cdot \frac{1}{1024}} \approx 0.5.