Fair Coin Trick for 1/3 Chance

Simulating one third chance with coin is an easy quant interview question on Simulation.

Difficulty Easy Topic Simulation

This question is about designing a simple random procedure, using only flips of a fair coin, that creates an outcome which happens with a given nontrivial probability. The specific target here is a one-in-three chance, so the candidate must think about how to build three symmetric, equally likely cases out of sequences of heads and tails. It sits at the intersection of probability puzzles and basic simulation ideas, common in interviews for roles that touch Monte Carlo methods or randomized algorithms, including some quantitative trading and research positions where understanding how to engineer randomness is important.

The solution relies on reasoning about equally likely sequences, constructing a partition of the sample space, and dealing carefully with "leftover" outcomes. Candidates are expected to use independence of coin flips, count outcome patterns, and justify why their construction is exactly unbiased rather than just approximate. Interviewers listen for a clean argument about uniformity, an explicit handling of what happens when the first attempt does not yield a usable outcome, and an understanding of why recursion or repetition does not distort the target probability. Clarity, not algebraic complexity, is what is being assessed.

What it tests

The core structure here is the method of simulating arbitrary probabilities using a uniform random source by partitioning its outcome space into equally likely, non-overlapping groups that match the desired probability ratios. This is possible because, for any rational probability $p = m/n$, you can group the outcomes of a sequence of fair coin tosses into $n$ equally likely outcomes and assign $m$ of them to represent the event. If the number of possible outcomes does not divide evenly, you can discard (reject) the leftover outcomes and repeat the process, ensuring no bias is introduced. This approach leverages the uniformity and independence of the coin tosses to build up more complex probabilities from simple ones. The reason this works is that the rejection step preserves the uniformity of the remaining outcomes, so the simulated event's probability matches the target exactly, not approximately.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free