Hedge Funds puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 38
- Topics
- 14
- Hard
- 30
029You roll a fair six-sided die six times. What is the expected number of distinct faces you see?Quant and systematic fundsProp and quant trading firms
Try it first
Pick the closest before you calculate.
Show the worked solution
About 3.99, so roughly four. Give each face its own yes-or-no: did it appear at least once? A face is missed in all six rolls with chance (5/6)^6, about 33.5%, so it appears with chance about 66.5%. The expected count is the sum of the six chances: 6 x (1 minus (5/6)^6), which is 3.9906.
Why not work out the chance of seeing exactly 1, 2, up to 6 faces?
You could, but each of those needs a fiddly count. There is a shortcut that works whenever the question asks for an expected count. Think of a teacher checking attendance: the expected number present is simply the sum, over pupils, of each pupil's chance of turning up. Write the total as a sum of yes-or-no indicators, one per face, and the expected total is the sum of their probabilities, whether or not they are independent. That rule is {term('linearity of expectation', 'The expected value of a sum equals the sum of the expected values, even when the parts depend on each other.')}, and it turns a hard count into one line.
What is the chance that a given face shows up?
It is easier to find the chance it does not. Each roll misses the face with chance 5/6, and the six rolls are independent, so the face is missed every time with chance (5/6)^6, which is 15,625 over 46,656, about 33.5%. So each face appears at least once with chance about 66.5%, and six faces give 3.99. The indicators are not independent, since seeing face 1 a lot leaves less room for face 2, but linearity does not care.
Each of the six faces appears at least once in six rolls with probability 66.5% and is missed with probability 33.5%, so the expected number of distinct faces is 6 x 0.6651, about 3.99. The relationshipf a face of the die, 1 to 6 (5/6)^6 the chance a given face is missed in all six rolls What it says in wordsThe expected number of faces seen is six times the chance any one face is seen.Give the general form and a sense check. With n faces and n rolls the answer is n(1 minus (1 minus 1/n)^n), which tends to n(1 minus 1/e), about 63% of n. For a die that predicts 3.79, and the exact 3.99 is a little higher because six is small. The same logic tells a desk how many distinct names a random sample of trades touches.
Where candidates lose it
The first loss is saying six, or five, from instinct. The chance that six rolls give six different faces is 720 over 46,656, about 1.5%, so repeats are the normal case.
The second loss is trying to build the full distribution of distinct faces under time pressure and running out of time. Say indicator variables in the first sentence and the question is a one-liner.
What the interviewer asks next
- How many rolls do you expect to need before you have seen all six faces?
- What is the expected number of faces that appear exactly once in six rolls?
- What is the variance of the number of distinct faces?
032Two ice cream sellers each choose a spot on a straight 1 km beach. Sunbathers are spread evenly along it and each walks to the nearer seller. Where do the sellers end up, and is that the best outcome for the customers?Prop and quant trading firmsLong-short equity funds
Try it first
Where do two self-interested sellers settle?
Show the worked solution
Both end up side by side in the middle, and customers are worse off. From the quarter points, a seller who steps inward keeps everyone behind them and wins beach from the rival, so both drift to the centre. There they still split customers half and half, but the average walk doubles from 125 m to 250 m. Competition moves the sellers to the spot that maximises share, not the one that serves customers best.
Why can neither seller stay at the quarter points?
Picture two petrol pumps on a highway. Each wants the drivers on its own side plus as many from the middle as it can reach first. A seller keeps every customer on the far side of them wherever they stand, so moving towards the rival only ever adds customers. From 250 m, A steps to 400 m against B at 750 m: the dividing line moves to the midpoint, 575 m, and A's share rises from 50% to 57.5%. B then responds the same way, and the dance ends only when both stand at 500 m.
Sellers at the quarter points split the beach evenly with an average walk of 125 m; when A edges inward to 400 m it wins 57.5% of the beach, and the process ends with both at the middle, still splitting 50/50 but with the average walk doubled to 250 m. What does the middle cost the customers?
With both sellers in the centre, a sunbather is on average a quarter of the beach away, 250 m. With sellers at 250 m and 750 m, nobody is more than 250 m away and the average is 125 m. The shares are identical in both setups; the only thing that changed is how far customers walk, so the stable outcome is strictly worse for them and no better for the sellers. This is the {term('Hotelling model', 'A model of competition on a line, set out by Harold Hotelling in 1929, in which rivals crowd towards the centre to win the middle ground.')}, and it is why rival shops cluster and why two parties often converge on the middle voter.
Say the equilibrium idea in one line: a pair of positions is stable when neither player can do better by moving alone, and the middle is the only such pair here. Then say where the model breaks: if customers stop buying when the walk is too long, or if prices can differ, the sellers have a reason to spread out again. Interviewers ask this to see whether you can reason about another player's best response, which is most of trading.
Where candidates lose it
The common loss is answering the quarter points, because that is the sensible arrangement. The question asks where self-interested sellers end up, and the quarter points are not stable.
The second loss is getting to the middle but not saying what it costs. The interviewer wants the contrast: same shares, twice the walking. Name the stable point, then name the welfare cost.
What the interviewer asks next
- What happens with three sellers?
- If customers refuse to walk more than 300 m, where do the sellers stand?
- Where do you see the same pattern in markets or in fund positioning?
034A stock trades at Rs 1,000 and its one-month options are priced at 30% implied volatility. Without a calculator, roughly what does a one-month at-the-money straddle cost, and how far must the stock move for the buyer to break even at expiry?Volatility and relative value fundsProp and quant trading firms
Try it first
Closest estimate for the straddle:
Show the worked solution
About Rs 69, so the stock must move about 6.9% either way. Scale the 30% annual volatility to one month by the square root of time: 30% x root(1/12) is about 8.7%. An at-the-money straddle is worth about 0.8 times that move times the price: 0.8 x 8.7% x 1,000 is about Rs 69. At expiry the buyer profits only below about Rs 931 or above Rs 1069.
Where does the 0.8 x sigma x root T rule come from?
A straddle pays the size of the move, whichever way it goes, so its value is the expected absolute move. For a normal distribution, the average absolute move is the standard deviation times root(2/pi), which is about 0.8. Over one month the standard deviation of the price is S x sigma x root T = 1,000 x 0.30 x root(1/12), about Rs 87. Times 0.8 gives about Rs 69. Black-Scholes with zero rates gives Rs 69.1, so the shortcut is good to within a rupee for short-dated at-the-money options.
A one month straddle struck at Rs 1,000 costs about Rs 69, so at expiry it loses money anywhere between about Rs 931 and Rs 1069 and profits only on a move of more than about 6.9% either way. Why is the breakeven move bigger than the typical move traders expect?
Buying a straddle is like buying insurance against a big move in either direction: you pay the average claim up front. The breakeven at expiry is the premium, about 6.9%, while the average absolute move is the same 6.9% by construction, so a buyer at fair implied volatility breaks even only on average. The buyer makes money when realised volatility turns out higher than the 30% priced in, and the seller makes money when it turns out lower. That is why desks talk about straddles as a bet on volatility, not on direction.
The relationshipsigma implied volatility, 30% a year T time to expiry in years, 1/12 S the stock price, Rs 1,000 What it says in wordsAn at-the-money straddle costs about 0.8 times the one standard deviation move over its life.Say the limits. The rule assumes the option is at the money and short dated, and rates are small; for long-dated or out-of-the-money options it drifts. A single call or put is half the straddle, about 0.4 x sigma x root T x S, which is a useful second number to have ready.
Where candidates lose it
The most common loss is forgetting to scale volatility to one month, which gives an answer near Rs 240 or Rs 300. Implied volatility is quoted per year; divide by root 12 for a month.
The second loss is forgetting the 0.8 and pricing the straddle at the full one standard deviation move, Rs 87. Say where the 0.8 comes from, the average absolute value of a normal, and the answer sounds reasoned rather than memorised.
What the interviewer asks next
- What does a one-week straddle cost on the same stock?
- Roughly what is the one month at-the-money call worth on its own?
- The stock moves 5% by expiry. Did the straddle buyer or seller win, and what does that say about realised volatility?
035Three assets all have the same pairwise correlation, rho. What is the lowest value rho can take? What is the answer for n assets?Multi-manager platformsQuant and systematic funds
Try it first
Lowest possible common correlation for three assets:
Show the worked solution
Minus one half for three assets, and minus 1/(n minus 1) for n. Give each asset unit variance and add them up. The variance of the sum is 3 plus 6 rho, because there are three variances and six pairwise covariance terms. A variance cannot be negative, so rho is at least -1/2. With n assets the sum's variance is n plus n(n minus 1) rho, which gives rho at least -1/(n minus 1): -0.33 for four, -0.11 for ten.
Why can three assets not all be perfectly opposed?
Three friends cannot all disagree with each other on a yes-or-no question: if Ravi says yes and Meena says no, Arjun agrees with one of them. Perfect opposition is a relationship between two things; with three, two of them must lean the same way. The same limit holds for correlations. A set of numbers in a correlation matrix has to be internally consistent, and equal pairwise correlations become impossible well before -1 once there are three or more assets.
How do you find the exact floor?
Use the one fact that can never fail: a variance is zero or more. Add the three assets with unit variance; the sum has variance 3 from the three diagonal terms plus 6 rho from the six covariance terms, and 3 + 6 rho must be at least zero. That gives rho of at least -1/2. The picture is three arrows 120 degrees apart: each pair has a cosine of -1/2, and the three add to exactly zero, which is the boundary case. For n assets, n + n(n minus 1) rho at least zero gives -1/(n minus 1).
Three unit arrows 120 degrees apart add to zero, the arrangement where every pair has correlation minus one half, and the variance of the sum, 3 + 6 rho, turns negative below that value, which is impossible, so rho cannot fall below minus one half. The relationshipn the number of assets, each with variance 1 rho the common pairwise correlation n(n-1) the number of ordered pairs, each contributing one covariance of rho What it says in wordsThe variance of the equal-weighted basket must be non-negative, which caps how negative a shared correlation can be.Say why a risk desk cares. A correlation matrix that breaks this rule is not a valid risk model: it implies some portfolio has negative variance, and an optimiser will pile into it. This happens in practice when correlations are estimated pair by pair from different data windows or overridden by hand in a stress test. The check is that the matrix is positive semi-definiteA matrix for which every weighted combination of the assets has a variance of zero or more., and the equal-correlation case is the cleanest example of the rule.
Where candidates lose it
The usual loss is answering -1, because that is the floor for any single pair. The interviewer is testing whether you see that the pairs constrain each other.
The second loss is getting -1/2 by intuition but having no proof. Say the variance of the sum in one line. It takes ten seconds, it generalises to n immediately, and it is the answer the follow-ups build on.
What the interviewer asks next
- Two assets have correlation 0.9 with a third. What is the lowest possible correlation between the first two?
- A stress test sets every pairwise correlation in a 20-asset book to -0.1. Is that a valid matrix?
- How would you repair a correlation matrix that is not positive semi-definite?
036A regime model says a bull month is followed by another bull month 90% of the time, and a bear month by another bear month 80% of the time. In the long run, what share of months are bull months?Quant and systematic fundsProp and quant trading firms
Try it first
Long-run share of bull months:
Show the worked solution
Two thirds of months are bull months, whatever the starting state. In the long run the number of months switching from bull to bear must equal the number switching back. 10% of bull months switch out and 20% of bear months switch in, so 0.1 x bull = 0.2 x bear, which makes bull twice as common as bear: 2/3 against 1/3. A second route: bull spells last 10 months on average and bear spells 5.
What has to balance in the long run?
Think of a shop with people walking in and out all day. Once the crowd inside stops growing or shrinking, the number walking in each minute must equal the number walking out. In the long run, the flow from bull to bear must equal the flow from bear to bull, because otherwise one state would keep filling up. The flow out of bull is 10% of bull months; the flow out of bear is 20% of bear months. Setting 0.1 x bull equal to 0.2 x bear, with bull plus bear equal to 1, gives bull = 2/3.
Bull months turn bear 10% of the time and bear months turn bull 20% of the time, so the long-run share of bull months is two thirds, and a chain started in either state is within a few points of two thirds after about a year. How do you check two thirds another way?
Use the length of each spell. A state you leave with probability p each month lasts 1/p months on average, so bull spells last 10 months and bear spells 5. Spells alternate, so over a long stretch the market spends 10 months bull for every 5 bear: 10 out of 15 is two thirds. Two methods that agree is what the interviewer is listening for.
The relationshippi_bull the long-run share of bull months 0.1, 0.2 the chances of leaving bull and leaving bear each month 0.7 how much of any starting gap survives each month What it says in wordsThe long-run share of a state is the chance of entering it divided by the total chance of switching, and the start is forgotten at a rate of 0.7 a month.Answer the part of the question people skip: why the starting state does not matter. The gap between today's odds and two thirds shrinks by a factor of 0.7 every month, so after 12 months only 1.4% of it is left. A model this sticky still forgets its starting point within about a year, which is why regime forecasts beyond a few months mostly return the long-run average.
Where candidates lose it
The first loss is answering 90%, the one-step persistence, as if it were the long-run share. The second is saying it depends on today's state, which is true for next month and false for the long run.
Set up the flow balance in one line, give two thirds, then check it with spell lengths of 10 and 5 months. If you have time, say how fast the start is forgotten: 0.7 a month.
What the interviewer asks next
- Today is a bear month. What is the chance that the month after next is a bull month?
- How long does the average bear spell last, and what is the chance one lasts more than a year?
- How would you estimate the two transition probabilities from 20 years of monthly data, and how wide would the error be?
046A fund has annual volatility of 12% and its benchmark index has 15%. The correlation between them is 0.9. What is the fund's tracking error?Multi-manager platformsQuant and systematic funds
Try it first
Your estimate of the tracking error:
Show the worked solution
About 6.7%. Tracking error is the volatility of the fund's return minus the benchmark's. The variance of a difference is the two variances minus twice the covariance: 0.12 squared plus 0.15 squared minus 2 x 0.9 x 0.12 x 0.15, which is 0.0144 + 0.0225 - 0.0324 = 0.0045. The square root is 6.71%. A correlation of 0.9 sounds tight but still leaves a sizeable gap.
What exactly is tracking error measuring?
Two friends walking to the same station take slightly different routes; tracking error is how far apart they typically are, not how fast either walks. Tracking errorThe standard deviation of the difference between a fund return and its benchmark return, usually quoted per year. is the volatility of the return difference, fund minus benchmark, so it depends on both volatilities and on how closely the two move together. The variance of a difference is Var(F) + Var(B) - 2 Cov(F, B), and the covariance is the correlation times the two volatilities.
Drawn as arrows of length 12 and 15 set 25.8 degrees apart, the angle whose cosine is 0.9, the fund and benchmark tips sit 6.7 apart, which is the tracking error; it would be 3.0% only at a correlation of 1 and rises to 13.7% at 0.5. Why is the answer so much bigger than 3%?
Because the correlation is below 1, the gap is not just the difference in size. The variance of the difference is 144 + 225 - 324 = 45 in squared percent, and the square root of 45 is 6.7%: the 10% of correlation that is missing contributes more than the 3 point difference in volatility. The arrow picture shows it: two arrows 12 and 15 long, set about 26 degrees apart, have tips further apart than 3. That is just the law of cosines.
The relationshipsigma_F, sigma_B the fund and benchmark volatilities, 12% and 15% rho the correlation between their returns, 0.9 What it says in wordsTracking error is the volatility of the gap between fund and benchmark returns.Say what it means for an allocator. A fund with 0.9 correlation to its index can still trail or beat it by 6 to 7 points in an ordinary year, so a single year of underperformance tells you very little. The limitation: the calculation assumes the correlation and volatilities are stable, and they tend to shift in stressed markets, which is when tracking error matters most.
Where candidates lose it
The fast wrong answer is 3%, the difference in volatilities, which is only true at a correlation of exactly one. The interviewer chose 0.9 precisely because it sounds close to one.
The second loss is forgetting the factor of 2 on the covariance term, which gives root(207), over 14%. Write the variance of a difference in full before plugging in numbers.
What the interviewer asks next
- What correlation would give a tracking error of 5%?
- If the fund had a beta of 0.72 to the index, what is its information ratio if it beats the index by 2% a year?
- Why might a fund's realised tracking error jump in a sell-off?
047An index rises 10% one day and falls 10% the next. What happens to the index over the two days, and to a fund that delivers exactly twice the index's daily return?Fund of funds and allocatorsMulti-manager platforms
Try it first
Over the two days, the 2x fund is
Show the worked solution
The index ends down 1% and the 2x fund down 4%, not 2%. The index goes 100, 110, 99. The fund goes 100, 120, 96, because it doubles each day's move: up 20%, then down 20% of a bigger number. Two days of index returns of plus and minus r cost the index r squared, 1%, but cost the 2x fund 4r squared, 4%. The drag comes from resetting leverage daily, and it grows with volatility.
Why is the index down at all after up 10% and down 10%?
A salary cut of 10% after a 10% raise leaves you below where you started, because the cut is taken on the bigger salary. An up move of r followed by a down move of r multiplies to (1 + r)(1 - r) = 1 - r squared, so the index loses r squared, here 1%. This is the same volatility drag that makes compound returns lower than average returns. It is small for the index because r squared is small.
Why does the 2x fund lose four times as much?
Because it resets its leverage each day. The fund multiplies to (1 + 2r)(1 - 2r) = 1 - 4r squared, so its drag is four times the index's, not two times. With r = 10% that is 4%. A buyer expecting twice the index return over the period expected 2 x (-1%) = -2% and got -4%. The extra 2 points is the price of re-levering after the gain, which buys more exposure at the top, and de-levering after the loss.
Over two days of plus and minus 10%, the index ends at 99, down 1%, while the fund that doubles each daily move ends at 96, down 4%, twice the naive 2% loss, because leverage is reset every day. The relationshipL the daily leverage multiple, 2 r the size of each day's index move, 10% What it says in wordsA leveraged fund's drag in a choppy market grows with the square of the leverage.Say where the drag does not apply. In a steady trend, daily resetting helps: two days of +10% take the index to 121 and the 2x fund to 144, more than the naive 142. Daily-reset leveraged funds win in trends and lose in chop, so holding one for months is a bet on the path, not just the direction. That is why allocators treat them as trading tools rather than long-term holdings.
Where candidates lose it
The common loss is saying the 2x fund is down 2%, doubling the index's two-day result. The fund doubles each daily return, and the compounding does the rest.
The second loss is saying the index is flat. Up 10% and down 10% is always a loss; say 1 minus r squared and the two answers come together.
What the interviewer asks next
- What is the two-day return of a fund delivering minus twice the daily return?
- Over a year with 20% index volatility and no trend, roughly how much does a 2x daily fund lag twice the index return?
- Two days of +10%: how does the 2x fund compare with twice the index return?
049You short a stock at Rs 100 at 5% of NAV. It rises to Rs 150 while the rest of the book is flat. What is your loss, and what share of NAV is the short position now?Long-short equity fundsGlobal macro funds
Try it first
The short's share of NAV at Rs 150 is about
Show the worked solution
You lose 2.5% of NAV, and the short is now about 7.7% of the book. On NAV of 100, the short is worth 5. A 50% rise makes it a liability of 7.5, a loss of 2.5, so NAV falls to 97.5. The position is now 7.5 over 97.5, which is 7.7%. A losing short grows as a share of the book, so risk rises exactly when the trade is going wrong, the opposite of a losing long.
How do the loss and the new weight work out?
Keep NAV at 100 so every number is a percentage. The short is a liability that rises with the price: 5 at Rs 100 becomes 7.5 at Rs 150, a loss of 2.5, which takes NAV from 100 to 97.5. The weight is the liability over the new NAV: 7.5 / 97.5 = 7.69%. Both parts of the fraction move against you: the top grows and the bottom shrinks.
Why is a losing short more dangerous than a losing long?
A losing long is like a debt that shrinks as the thing you own loses value: a 5% long falling to half is worth 2.5 of NAV 97.5, 2.6%, and it can never lose more than the 5 you put in. A losing short does the reverse: the more it loses, the bigger it gets, and there is no ceiling on the price, so there is no cap on the loss. Left alone, a short that doubles is 10 of NAV 95, 10.5%, and one that triples is 16.7%. This is why long-short funds size shorts smaller and cut them faster than longs.
A 5% long whose price halves shrinks to 2.6% of the book and can lose at most 5% of NAV, while a 5% short whose price rises to 150 grows to 7.7% and keeps growing, with no cap on the loss. The relationship0.05 the starting weight, 5% of NAV 1.5 the price relative, 150 over 100 0.05 x 0.5 the loss as a share of starting NAV, 2.5% What it says in wordsThe short's new weight is its grown liability over the NAV that the loss has reduced.Add what a desk does about it. Many funds set a stop or a maximum weight for each short and cover part of it as it rises, so that a losing short is brought back towards its original risk. The discipline exists because the position sizes itself up without anyone deciding to. Short squeezes make this worse, since the price can gap up on little news when many holders cover at once.
Where candidates lose it
The common loss is saying the weight is 7.5%, forgetting that NAV fell. It is 7.5 over 97.5, not over 100. A smaller trap is saying 5%, as if the short's size were fixed at the entry value.
The bigger miss is not drawing the lesson. The interviewer wants to hear that shorts grow when they lose and longs shrink, so short risk compounds against you and needs its own limits.
What the interviewer asks next
- At what price does the short reach 10% of NAV?
- How much would you buy back to bring the short to 5% of NAV at Rs 150?
- The stock pays a dividend while you are short. What happens to your P&L?
053Two independent numbers are drawn uniformly at random between 0 and 1. What is the expected value of the smaller one, and of the larger one?Quant and systematic fundsProp and quant trading firms
Try it first
What is the expected value of the smaller of the two draws?
Show the worked solution
The smaller draw averages 1/3 and the larger averages 2/3. Two random points cut the stretch from 0 to 1 into three pieces, and nothing distinguishes one piece from another, so each has expected length 1/3. The minimum ends the first piece and the maximum ends the second. The two averages add to 1, as they must, because the minimum plus the maximum is just the sum of the two draws.
What is the one-line argument?
Imagine two friends who each arrive at a random minute within the same hour. The wait until the first arrival, the gap between the two arrivals and the time from the second arrival to the end of the hour are three stretches of time. No stretch is special, so each averages a third of the hour, and the first friend arrives, on average, 20 minutes in. The same symmetry puts the minimum of two uniform draws at 1/3 and the maximum at 2/3.
The diagonal splits the square of possible draws into two mirror-image halves; the density of the smaller draw falls in a straight line from 2 at zero to 0 at one with its average at 1/3, and the density of the larger draw mirrors it with its average at 2/3. How do you check it with a calculation?
Work from the chance that the minimum sits above some level x. Both draws must be above x, which happens with probability (1 - x) squared. For a quantity that cannot be negative, the average equals the area under its chance of exceeding each level, and the area under (1 - x) squared from 0 to 1 is 1/3. The maximum then follows without a second integral: minimum plus maximum equals X plus Y, which averages 1, so the maximum averages 2/3.
The relationshipP(min > x) the chance both draws exceed x, (1 - x) squared E[min] the expected value of the smaller draw E[max] the expected value of the larger draw What it says in wordsIntegrate the chance that the minimum clears each level to get its average, then use min plus max equals the sum of the draws.Where does the pattern lead next?
With n draws, the points cut the interval into n + 1 pieces, so the smallest averages 1/(n + 1) and the largest n/(n + 1). The ordered values of uniform draws are evenly spaced on average, and that single fact answers a whole family of follow-ups. With ten bids drawn at random across a range, the highest averages 10/11 of the way up. The quick route here is also the one to say first: the order statisticsThe draws sorted from smallest to largest: the minimum is the first order statistic, the maximum the last. of uniform draws split the interval evenly.
Where candidates lose it
The common wrong answer is 1/4, reached by reasoning that the smaller draw lies in the bottom half and so sits at the middle of it. The smaller draw is not confined to the bottom half; it only has to be below the other draw, and it lands above 0.5 a quarter of the time.
The second loss is grinding through the integral in silence and never giving the symmetry argument. Say the three-pieces picture first, then offer the integral as the check.
What the interviewer asks next
- What is the expected distance between the two draws?
- With three draws, what is the expected value of the middle one?
- What is the probability that the smaller draw is below 0.5?
054You flip a fair coin five times. What is the probability of seeing a run of at least three heads in a row somewhere in the five flips?Quant and systematic fundsProp and quant trading firms
Try it first
What is the chance of at least three heads in a row in five flips?
Show the worked solution
The chance is 8 in 32, exactly 1/4. Sort the qualifying sequences by where their first run of three heads starts. Starting at flip 1: HHH then anything, 4 sequences. Starting at flip 2: flip 1 must be tails, then HHH, then anything, 2 sequences. Starting at flip 3: flip 2 must be tails and flip 1 is free, 2 sequences. Four plus two plus two is eight.
Why does the obvious count go wrong?
Suppose you count guests at a party by asking each room how many people it holds, while some guests stand in doorways. They get counted twice. A run of three can start in three places, but one sequence can contain a run starting at more than one of them, so three places times four fillings, 12, counts HHHHH three times and two other sequences twice. The fix is to give each sequence exactly one home: the position where its first run starts.
The eight qualifying sequences sort into four whose first run starts at flip 1, two at flip 2 and two at flip 3, so the chance is 8 of 32, one quarter; the naive count of 12 counts overlapping runs more than once. How do you make every sequence count once?
Force the flip just before the run to be tails. If the first run starts at flip 2, flip 1 must be tails; if it starts at flip 3, flip 2 must be tails, and flip 1 can be anything. That gives 4, then 2, then 2. Then check a second way by counting the complement: sequences with no run of three follow a Tribonacci-style rule, each term the sum of the three before, giving 1, 2, 4, 7, 13, 24 for 0 to 5 flips. And 32 minus 24 is 8.
The relationship2^2 first run at flip 1: the last two flips are free 2 first run at flip 2 or 3: one free flip each 24 sequences with no run of three heads What it says in wordsCount each qualifying sequence once, by the start of its first run, and confirm by counting the sequences that fail.Why would a quant fund ask this?
Streaks are what people notice in trading records and backtests. A run of three heads turns up in a quarter of all five-flip sequences of a fair coin, so a short winning streak is weak evidence of skill. The counting habit matters as much as the number: giving each outcome one home is the same discipline that stops you double counting overlapping signals when you tally how often a strategy fired.
Where candidates lose it
The trap is 12 out of 32: three places a run can start times four fillings of the other flips. It sounds rigorous, and it is wrong because a sequence with a long run is counted once for every place a run of three fits inside it.
The second loss is giving 1/4 with no check. Offer the complement count, 24 sequences with no run of three, as the second route to the same answer.
What the interviewer asks next
- What is the chance of at least three heads in a row in ten flips?
- In five flips, what is the chance of a run of exactly three heads, no longer?
- How many flips do you expect to make before you first see three heads in a row?
