用偏硬币造公平硬币
UnBiased coin
题目详情
有一枚偏硬币,出现正面的概率为 ,反面的概率为 (其中 )。
如何利用这枚偏硬币构造一次“公平抛硬币”(得到正/反概率各 )?
We have a weighted coin that shows a Head with probability and tails with , . How to define two equally likely events using this coin?
Each event is a function of the outcomes of one or more coin tosses. For example, we can toss 2 times and define Event1 as [HH, TT] and Event2 as [TH, HT].
Hint
Since is unknown, the probability of HH and TT are unreliable.
解析
冯·诺依曼(Von Neumann)方法:
- 连续抛两次:
- 若结果为 HT,则输出 H。
- 若结果为 TH,则输出 T。
- 若为 HH 或 TT,则丢弃这两次结果,重新来。
因为 与 相等,所以在条件事件“出现 HT 或 TH”下,输出 H 与 T 的概率各为 。
Original Explanation
Toss 2 times, event1 is HT, event2 is TH, and repeat the process otherwise.
Solution
For an arbitrary , this cannot be accomplished in a single toss. If we toss twice, we observe that the probability of HT and TH is the same, i.e. the probability of heads in the first toss and tails in the second is the same as its reverse, i.e.
Hence, we can declare these two as the two events. If we observe HH or TT, we retry.
Follow-up question
What's the probability of an infinite repetition?
Follow-up Answer
Let us calculate the probability of the first retry
Probability of HH or TT =
This is a quadratic equation, with a minimum value of at , and for the range
Thus, the probability of an infinite repetition is (because )
Note that if is close to 1 then is close to 1, and it might take a very long sequence before event 1 or event 2 occurs.