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?
029A bowl holds 100 noodles. You pick two free ends at random and tie them together, and keep doing this until no free ends are left. What is the expected number of loops in the bowl at the end?Consulting-style caseKPO research support
Try it first
Before you compute: roughly how many loops do you expect from 100 noodles?
Show the worked solution
About 3.28 loops. Every tie cuts the number of strands by one, so there are exactly 100 ties. With k strands left, the second end you grab is one of 2k - 1 free ends, and only one of those closes a loop, so that tie adds 1 over (2k - 1) to the expected count. Summing 1 + 1/3 + 1/5 + ... + 1/199 gives 3.2843.
How do you avoid tracking the whole bowl?
Think of shaking hands at a party where each person has two hands. You do not need the seating plan to know that each handshake joins two hands. Whatever the bowl looks like, every tie reduces the count of strands by exactly one, and a strand is either an open piece or a closed loop that has left the game. So you can ignore the tangled history and ask one question per tie: does this tie close a loop, yes or no?
Pick any free end first; which one does not matter. With k strands there are 2k free ends, so 2k - 1 remain for the second pick, and exactly one of them is the other end of the same strand. That tie closes a loop with chance 1 over (2k - 1). Otherwise two strands fuse into one longer strand.
Early ties almost never close a loop: with 100 strands the chance is 1 in 199, and the expected count is only 1.15 after 90 ties. The last three ties add 0.2, 0.33 and 1, bringing the total to 3.28 loops. Why can you add the step expectations when the steps depend on each other?
Whether an early tie closes a loop changes nothing about how many strands remain, because every tie removes one strand either way. Expected values add even when the events are linked, so the total is simply the sum of the per-tie chances. This is linearity of expectation, and it is what makes the puzzle a two-minute answer instead of a simulation. For large n the sum is close to half the natural log of n plus about 0.98; for 100 noodles that gives 3.28, a useful sanity check.
The relationshipn the number of noodles, 100 k strands left before a tie 1/(2k-1) the chance the second end chosen belongs to the same strand What it says in wordsAdd, tie by tie, the chance that the tie closes a loop.Where candidates lose it
Candidates try to picture how the strands grow and get lost in cases. The problem is only tractable when you notice that each tie does exactly one of two things and that the strand count falls by one either way.
The second loss is getting the chance wrong as 1 over 2k. You have already picked one end, so the pool for the second pick is 2k - 1, not 2k.
What the interviewer asks next
- With just two noodles, what is the chance of ending with two loops?
- Roughly how many loops would you expect from 10,000 noodles?
- Where else does linearity of expectation save you from tracking dependence?
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).
073You pay Rs 100 to roll a fair die and receive Rs 30 times the face. Should you play? Now suppose that after seeing the roll you may pay Rs 20 to roll once more and take the second result instead. What is your rule, and what is the game worth?Consulting-style caseTreasury
Try it first
With the Rs 20 re-roll available, which rolls do you re-roll?
Show the worked solution
Play: one roll pays 30 x 3.5 = Rs 105 on average against a Rs 100 fee, an edge of Rs 5. With the re-roll, keep a 3 or better and re-roll a 1 or 2; the game is worth Rs 118.33, an edge of Rs 18.33. A fresh roll is worth 105 less the Rs 20 fee, 85, so re-roll only a result paying less than 85: 30 and 60 qualify, 90 does not.
Why is the first game worth playing?
A fair die averages 3.5, so the average payout is 30 x 3.5 = Rs 105, more than the Rs 100 you pay. On expected value the game pays Rs 5 a play, so a player who can repeat it should play. Half the time you lose money, since a 1, 2 or 3 pays 30, 60 or 90, and the other half you win 120, 150 or 180; the wins are larger than the losses, which is where the edge sits.
How does the re-roll change the rule?
Think of returning a shirt. You keep it if what you have is worth more than what the shop will hand you after the restocking fee. Re-roll only when the roll in hand is worth less than a fresh roll net of its fee, which is 105 - 20 = Rs 85. A 1 pays 30 and a 2 pays 60, both below 85: re-roll. A 3 pays 90, above 85: keep it, even though 3 is below the average face. The fee is what makes a 3 worth keeping.
Faces 3 to 6 are kept for 90, 120, 150 and 180, while faces 1 and 2 lead to a Rs 20 re-roll worth 85 net, so the game is worth 118.33 against 105 without the option, an edge of 18.33 over the Rs 100 fee. The relationship90 to 180 the payouts kept on a 3, 4, 5 or 6 105 - 20 a fresh roll's average payout less the re-roll fee 2/6 the chance of a 1 or a 2, the rolls you re-roll What it says in wordsThe game is worth the chance of keeping times the average kept, plus the chance of re-rolling times the fresh roll's value after the fee.What does the option itself cost and earn?
The re-roll lifts the game from 105 to 118.33, so the option is worth Rs 13.33 on average, and it also cuts the chance of losing money from a half to a third, because a bad first roll gets a second chance. Re-rolling a 3 as well would give 117.50, worse by 0.83; a free re-roll would make re-rolling the 3 right and lift the game to 127.5. The threshold moves with the fee: below a fee of Rs 15 the 3 is worth re-rolling, above it the 3 is kept. The limit to say: the worst path, a 1 or 2 followed by a 1, costs Rs 90, and a player who cannot afford that should not value the game by its average.
Where candidates lose it
The common loss is re-rolling anything below the 3.5 average, including a 3. The bar is not the average face; it is the value of a fresh roll after its fee, and the Rs 20 fee pulls that bar below 90. Re-rolling a 3 gives up almost a rupee a play.
The quieter slip is forgetting to charge the fee at all, which puts the game at 127.5 and the threshold at 3. State the net value of a re-roll, 85, before deciding anything.
What the interviewer asks next
- The re-roll fee is Rs 10. Which rolls do you now re-roll, and what is the game worth?
- You may re-roll twice, Rs 20 each time. What is the game worth and how does the first-roll bar change?
- The payout is Rs 30 times the face squared. Should you still play at Rs 100, and does the re-roll rule change?
100You toss a fair coin until you see two heads in a row. How many tosses do you expect to need? And why is that more than the number you expect to wait for a head followed by a tail?Consulting-style caseKPO research support
Try it first
Which pattern takes longer on average to appear, HH or HT?
Show the worked solution
Six tosses for HH on average, four for HT. For HH, a tail after a head sends you back to the start with nothing. For HT, once you hold a head, every further head keeps you one toss from finishing, so nothing is lost. Solve HH with two unknowns: from the start E0 = 1 + E0/2 + E1/2, and after a head E1 = 1 + E0/2, which gives E1 = 4 and E0 = 6. For HT, E1 = 1 + E1/2 = 2 and E0 = 4.
Why is waiting for two heads different from waiting for a head then a tail?
Suppose you will go trekking after two dry days in a row. One wet day after a dry one puts you back to zero: you need two fresh dry days. Now suppose instead you are waiting for a dry day followed by a wet one. Extra dry days cost nothing; you stay ready, and the first wet day finishes the job. A failed attempt at HH throws away the progress you had, while a failed attempt at HT keeps it, so HH pays for its failures twice: the wasted toss and the lost head. That asymmetry is the whole answer; the algebra just prices it.
Write the states. E0 is the expected tosses still needed from nothing, E1 from one head in hand. From nothing, one toss is spent and you land back at E0 with a tail or at E1 with a head: E0 = 1 + E0/2 + E1/2, so E0 = 2 + E1. For HH, from one head a head finishes and a tail drops you to E0: E1 = 1 + E0/2. Substitute: E1 = 1 + (2 + E1)/2, so E1/2 = 2, E1 = 4 and E0 = 6. For HT, from one head a tail finishes and a head keeps you at E1: E1 = 1 + E1/2, so E1 = 2 and E0 = 4.
The relationshipE0 expected tosses still needed with no useful toss in hand E1 expected tosses still needed holding one head 1/2 the chance of a head, and of a tail, on a fair coin What it says in wordsEach state's expected wait is one toss plus the average of the waits in the states a head and a tail lead to.In the HH diagram the tail arrow from the one-head state runs all the way back to the start, which is why the wait is 6 tosses, while in the HT diagram a head from the one-head state only loops in place, so the wait is 4. Is there a rule for longer patterns?
Yes, and it is quick enough for the room. For each length k at which the pattern's first k symbols equal its last k symbols, add 2 to the power k. HH matches itself at k = 1 (H and H) and at k = 2 (the whole thing): 2 + 4 = 6. HT matches itself only at k = 2: 4. HHH gives 2 + 4 + 8 = 14; HTH gives 2 + 8 = 10; HTT gives just 8. Patterns that overlap with themselves take longer to appear from a fresh start, because their occurrences come in clusters, and the same long-run frequency spread into clusters means longer gaps between them. Every pattern of length n shows up once in 2 to the n positions on average; what differs is how bunched those appearances are.
The average hides a wide spread. The chance that HH has not appeared after ten tosses is 14.1%, against 1.1% for HT, so one game in seven is still running at toss ten when you wait for HH. And the figures assume a fair, independent coin: with heads at 60%, the HH wait falls to 1/p + 1/p squared, about 4.4 tosses. The finance link is any rule that needs consecutive results, such as a bonus or a covenant test that requires two good quarters in a row: one bad quarter resets the count, so the rule is harder to satisfy than its two-in-four odds suggest.
Where candidates lose it
The common wrong answer is 4 for both, from 'each pattern has probability 1/4, so wait 4 tosses'. That is the long-run frequency, not the wait from a fresh start, and it ignores that a failed HH attempt destroys the head you had. Another is 8, from doubling the single-head wait of 2 and then adding; the state equations, not intuition, settle it at 6.
The second loss is reaching 6 and 4 with no reason. The interviewer asked why, and the one-sentence answer is that HT keeps its progress after a failure and HH does not. Offer the overlap rule afterwards: it shows you can extend the result to HHH or HTH without starting over.
What the interviewer asks next
- How many tosses do you expect to wait for HHH, and for HTH?
- Two players toss one coin: one wins if HH appears first, the other if HT appears first. Who is more likely to win?
- With a coin that shows heads 60% of the time, what is the expected wait for HH?
