Simulating a Biased Coin With a Fair One
Suppose you need to simulate an event that happens \(p = 1/4\) of the time, and all you have is a
fair coin. Well, that’s easy enough. Flip the coin twice. Report success if
you get 2 heads, and report failure otherwise.
alexirpan.com