Financial Analysis puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 47
- Topics
- 13
- Hard
- 30
007You have a biased coin that lands heads one third of the time. How can you use it to produce a fair 50:50 result, and how many flips of the biased coin does each fair result take on average?D.E. ShawNew York · 2026
Try it first
Flip in pairs, keep heads-tails and tails-heads, discard the rest. On average, how many single flips does one fair result take?
Show the worked solution
Flip twice: heads then tails counts as heads, tails then heads counts as tails, and anything else is thrown away and flipped again. The two mixed orders each have probability 2/9, so they are equally likely whatever the bias. A pair succeeds 4/9 of the time, so each fair result takes 9/4 pairs, or 4.5 flips. Knowing the bias is exactly 1/3 lets you cut that to 2.25.
Why are heads-tails and tails-heads always equally likely?
Picture two friends flipping the same lopsided coin, one after the other. The chance the first gets heads and the second tails is the heads chance times the tails chance. The chance of the reverse is the tails chance times the heads chance. Multiplication does not care about order, so the two mixed outcomes are exactly equally likely, whatever the bias. That symmetry is the whole trick, known as the von Neumann method. Here each mixed pair has probability 1/3 times 2/3, which is 2/9.
Flipping the biased coin twice gives heads-tails and tails-heads with probability 2/9 each, so calling one heads and the other tails is fair. Discarding the matching pairs means a pair works 4/9 of the time, which costs 4.5 flips per fair result on average. How do you get the average of 4.5 flips?
Each pair either works or does not, independently of the last. Waiting for a success that happens with probability q takes 1/q tries on average, the same reason a die takes six rolls on average to show a six. A pair works with probability 4/9, so you need 9/4 pairs, and two flips a pair makes 4.5 flips. The method pays for its fairness with waste: 5 pairs in 9 are thrown away.
The relationshipp the chance of heads on one flip, 1/3 2p(1-p) the chance a pair is mixed, 4/9 2 flips used by each pair What it says in wordsDivide the flips per attempt by the chance an attempt succeeds.Can you do better if you know the bias exactly?
Yes, and this is usually the follow-up. With p exactly 1/3, tails-tails has probability 4/9, the same as the two mixed pairs together. Call tails-tails one side and either mixed pair the other, and only heads-heads, 1/9 of pairs, is wasted, so each fair result costs 2 times 9/8, or 2.25 flips. The von Neumann method is still the better answer when nobody tells you the bias, because it works for any p. The limit for any scheme is set by how much randomness one flip carries: about 0.92 of a fair bit here, so no method can beat roughly 1.09 flips per fair result on average.
Where candidates lose it
The common loss is trying to build fairness from single flips, for example calling heads on one flip and tails on two in a row. Those schemes depend on the exact bias and usually fail the moment you write out the probabilities.
The second loss is giving the method and not the cost. The interviewer reported here went straight on to efficiency, so have 4.5 flips ready, then say why the known-bias grouping halves it and why the order trick is still the safe answer.
What the interviewer asks next
- Your fair-result method uses 4.5 flips. How could you reuse the discarded heads-heads and tails-tails pairs to get more fair results from the same flips?
- How would you simulate a fair six-sided die with this coin?
- If the coin's bias is unknown and drifts slowly over time, does the pair method still work?
Asked at D.E. Shaw, Research, New York, 2026 (Wall Street Oasis):
How can I make an effective fair coin given a biased coin with p_heads = 1/3?
051You may roll a fair die up to three times. After each roll you either stop and take the face value in rupees, or roll again; if you reach the third roll you must keep it. What is your strategy, and what is the game worth?RBC Capital MarketsToronto · 2025
Try it first
Before you work it: what is the game worth if you play it well?
Show the worked solution
Stop on a 5 or 6 after the first roll, on 4 or more after the second, and take whatever the third gives. The game is worth 14/3, about 4.67. Solve it from the end: a last roll is worth 3.5, so with two rolls left you keep anything above 3.5, which makes two rolls worth 4.25. With three rolls left you keep only what beats 4.25.
Why do you start from the last roll?
Think of house hunting with three viewings booked and a rule that you must take the last flat if you get that far. You cannot judge the first flat until you know what walking away from it is worth, and that depends on the viewings still to come. A stop or continue decision is only as good as your value for continuing, so you price the last stage first and carry that value backwards. The method is called backward inductionSolving a sequence of decisions from the final step back to the first, so each earlier choice is made knowing what the later ones are worth., and it is how an option to wait is valued in finance too.
On the third roll there is no choice: you get the face, and a fair die averages (1 + 2 + 3 + 4 + 5 + 6) / 6 = 3.5. That 3.5 is the price of walking away from the second roll. So on the second roll you keep a 4, 5 or 6, each of which beats 3.5, and re-roll a 1, 2 or 3. Half the time you keep an average of 5; half the time you collect 3.5. Two rolls are worth 0.5 x 5 + 0.5 x 3.5 = 4.25.
The last roll is worth 3.5, which makes 4, 5 and 6 worth keeping on the second roll and gives two rolls a value of 4.25; that 4.25 then makes only 5 and 6 worth keeping on the first roll, and the game is worth 4.67. What changes when you hold three rolls?
The bar goes up. With three rolls in hand, walking away from the first roll is worth 4.25, so a 4 is no longer good enough: only a 5 or a 6 beats it. Two faces in six you keep, averaging 5.5; four faces in six you roll on and collect 4.25. That is (2/6) x 5.5 + (4/6) x 4.25 = 1.83 + 2.83 = 4.67.
The relationshipV_n the value of the game with n rolls still available 5 the average of the faces kept on the second roll: 4, 5 and 6 5.5 the average of the faces kept on the first roll: 5 and 6 What it says in wordsEach stage is worth the chance of keeping times the average kept, plus the chance of rolling on times the value of the stage after it.What do you add to show you see the pattern?
Two observations. First, the bar rises with the number of chances left. A candidate who applies one rule, keep 4 or more, on every roll gets 4.625 instead of 4.667: a small loss that shows the continuation value was never priced. Second, each extra roll is worth less than the one before: the second roll adds 0.75, the third only 0.42, and a fourth would add 0.28. An extra option is worth less when the options you already hold are good. The limit to say out loud: this strategy maximises the average, which is right for a player who plays many times; someone playing once who needs at least 4 would play differently.
Where candidates lose it
The usual loss is using 3.5 as the bar on every roll. It is right for the second roll and wrong for the first, where the bar is 4.25 because two rolls still remain. Keeping a 4 on the first roll gives up only about 0.04 in value, but it tells the interviewer you never priced the right to continue.
The other loss is solving forwards, listing every path from the first roll. That tree has dozens of branches and eats the clock. Say that you will start from the last roll, and the problem shrinks to three lines.
What the interviewer asks next
- With four rolls allowed, what is the game worth and what is the first-roll bar?
- Each re-roll now costs 0.25. Does the strategy change?
- How does this connect to the early exercise decision on an American option?
Asked at RBC Capital Markets, Quantitative Trading, Toronto, 2025 (Wall Street Oasis):
Best way to maximize EV across 3 chosen dice rolls (can choose to continue or not).
