返回题库

用偏硬币模拟公平硬币

Simulating a Fair Coin with an Unfair One

专题
Probability / 概率
难度
L4

题目详情

一枚硬币正面概率 p=17p=\frac{1}{7},反面概率 q=67q=\frac{6}{7}。只用这枚硬币,设计方法模拟一次公平抛硬币(正反各 1/21/2)。

A coin is biased such that it comes up heads with probability p=17p = \frac{1}{7} and tails with probability q=67q = \frac{6}{7}. Using only this coin, design a method to simulate a fair coin, i.e., to get heads and tails with equal probability of 12\frac{1}{2}.

解析

冯·诺依曼方法:连续抛两次。

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

因为 P(HT)=pqP(HT)=pqP(TH)=qpP(TH)=qp 相等,所以在条件事件 {HT,TH} 下输出正反各为 1/21/2


Original Explanation

To simulate a fair coin using the biased coin, follow this procedure:

  1. Flip the coin twice and observe the outcome.

There are four possible outcomes:

  • HH
  • HT
  • TH
  • TT

Now examine their probabilities:

  • P(HT)=pqP(\text{HT}) = p \cdot q
  • P(TH)=qpP(\text{TH}) = q \cdot p

Both HT and TH have the same probability, namely pqpq.

So, define your fair coin outcome as follows:

  • If you get HT, declare the result as "Heads"
  • If you get TH, declare the result as "Tails"
  • If you get HH or TT, discard the outcome and flip again.

This method ensures that the resulting outcomes are equiprobable because P(HT)=P(TH)P(\text{HT}) = P(\text{TH}), thereby simulating a fair coin with a biased one.