返回题库

用偏硬币生成公平结果

Fair Probability from an Unfair Coin

专题
Probability / 概率
难度
L4

题目详情

给你一枚偏硬币,正面概率 pp 未知(可能偏向正面或反面)。能否只用这枚硬币生成一次公平的 50%-50% 结果?

Can we generate a fair outcome from an unfair coin, which may favor heads or tails at an unknown probability?

解析

可以,用两次抛掷(冯·诺依曼):

  • 若结果为 HT,输出“正”;
  • 若结果为 TH,输出“反”;
  • 若为 HH 或 TT,丢弃并重来。

因为 P(HT)=p(1p)=P(TH)P(HT)=p(1-p)=P(TH),所以在条件事件 {HT,TH} 下输出正反各为 1/21/2


Original Explanation

A single toss cannot yield fairness if the coin is biased. However, using two tosses:

  • Call the outcome (H,T) = “win” and (T,H) = “lose.”
  • If the outcome is (H,H) or (T,T), discard and repeat.

Since P(H,T)=p×(1p)P(\text{H,T}) = p \times (1-p) and P(T,H)=(1p)×pP(\text{T,H}) = (1-p) \times p, they are equal. Hence it is fair.