Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
091Turn over the cards of a well-shuffled 52-card deck one at a time until the first ace appears. What is the expected number of cards you turn over, counting the ace?Quant tradingProp trading firms
Try it first
Before you calculate: how many cards do you expect to turn?
Show the worked solution
10.6 cards, which is 53/5. Each of the 48 non-aces comes before all four aces with probability 1/5, because among that card and the four aces each is equally likely to be first. So on average 48/5 = 9.6 non-aces precede the first ace, and counting the ace itself gives 10.6. For n cards with m special ones the rule is (n + 1)/(m + 1).
Why isn't the answer 13?
Drop four red counters at random into a line of 48 white ones. Nothing distinguishes the stretch of white before the first red from the stretch between the second and third reds, or the stretch after the last red. The four reds cut the whites into five stretches, and by symmetry each stretch holds the same number on average, 48/5 = 9.6. The answer 13 imagines the aces spread evenly from the top of the deck, but that leaves no room for the stretch after the last ace, which is just as long on average as the others.
The four aces split the 48 other cards into five gaps that average 9.6 cards each, so the first ace arrives at card 10.6 on average; a single shuffle gives unequal gaps such as 6, 23, 7, 8, 4, and spacing the aces evenly at 13 ignores the fifth gap. The relationshipX the position of the first ace, counting the ace card j one of the 48 non-aces 1/5 the chance card j is first among itself and the four aces What it says in wordsCount the non-aces that come before the first ace one card at a time, add up their probabilities, and add one for the ace.How do you make the symmetry argument rigorous?
Use indicators. Pick any non-ace, say the seven of clubs. It is turned before the first ace exactly when it comes first among five cards: itself and the four aces. Those five cards sit in a random order, so that happens with probability 1/5. An expected count is the sum of the probabilities, even when the events depend on each other, so 48 x 1/5 = 9.6 non-aces come first on average and the ace makes it 10.6. The exact sum of the chances that the first ace is later than card k, over k from 0 to 48, gives 53/5 as well, and a seeded simulation of 100,000 shuffles gives 10.63.
The mean hides a skewed shape. The first ace is in the top five cards 34.1% of the time, and the median position is 9, below the mean of 10.6, because a few shuffles bury all four aces deep in the deck and drag the average up. If the interviewer asks for the most likely position, the answer is the very first card: each later position needs every earlier card to be a non-ace, so the chances fall card by card.
How does it generalise, and where is it useful?
With n cards and m special ones, the m specials cut the n - m others into m + 1 gaps, so the first special arrives at (n - m)/(m + 1) + 1 = (n + 1)/(m + 1). Check it with one ace: (52 + 1)/2 = 26.5, the middle of the deck, which is what you would expect. The first spade, with 13 specials, arrives at card 53/14, about 3.79. The same gap symmetry gives the expected wait for the first default in a pool or the first fill among queued orders, provided every ordering is equally likely. That proviso is the limitation: if defaults cluster in time or the deck is stacked, the gaps stop being exchangeable and the rule fails.
Where candidates lose it
The quick wrong answer is 13, from 52 cards divided by 4 aces. That spaces the aces evenly from the top and forgets that the stretch after the last ace is, on average, as long as the stretch before the first.
The second loss is reaching 9.6 and stopping. That is the number of cards before the ace; the question counts the ace itself, so add one to get 10.6. Say which you are quoting, because interviewers vary the wording to catch exactly this.
What the interviewer asks next
- What is the expected position of the second ace?
- What is the expected number of cards turned until the first spade?
- Which is more likely: the card after the first ace is the ace of spades, or it is the two of clubs?
092You climb a staircase of 10 steps, taking either one step or two steps at a time. In how many different ways can you reach the top?Tower Research CapitalNew York · 2012
Try it first
Pick the number of ways.
Show the worked solution
89 ways. Split by the last move: you arrive at step 10 with a single from step 9 or a double from step 8, so ways(10) = ways(9) + ways(8). With 1 way to reach step 1 and 2 ways to reach step 2, the counts run 1, 2, 3, 5, 8, 13, 21, 34, 55, 89: the Fibonacci numbers, with 89 at the top.
How do you count without listing every route?
Imagine a friend at the top of the stairs asks how you got there. There is one thing you can say for certain about your last move: it was either a single from step 9 or a double from step 8, and never both. Every route to step 10 is a route to step 9 followed by a single, or a route to step 8 followed by a double, so the count at step 10 is the sum of the counts at steps 9 and 8. The same holds at every step, which turns the puzzle into a running sum.
Writing the number of ways on each step, each step is the sum of the two below it, so the counts follow the Fibonacci sequence and step 10 collects 55 routes ending with a single and 34 ending with a double, 89 in all. The relationshipw(n) the number of ways to reach step n w(n-1) routes whose last move is a single step w(n-2) routes whose last move is a double step What it says in wordsSort every route by its last move; the two groups do not overlap and together cover everything.Can you check 89 a second way?
Count by how many double steps you take. With k doubles, you make 10 - 2k singles, so 10 - k moves in all, and you only have to choose which k of those moves are the doubles. Summing the binomial counts over k = 0 to 5 gives 1 + 9 + 28 + 35 + 15 + 1 = 89, the same answer by a completely different road. Saying a second check aloud is worth more than the answer itself in a first round, because it shows you do not trust a pattern you have not tested.
Double steps k Moves in total Ways to place the doubles 0 10 C(10, 0) = 1 1 9 C(9, 1) = 9 2 8 C(8, 2) = 28 3 7 C(7, 3) = 35 4 6 C(6, 4) = 15 5 5 C(5, 5) = 1 total 89 Counting routes by the number of double steps gives 89 again, which confirms the Fibonacci running sum. What does the interviewer usually ask next?
Two things. First, allow steps of one, two or three: the same last-move argument gives w(n) = w(n - 1) + w(n - 2) + w(n - 3), and the count for ten steps becomes 274. Second, the coding version. A recursive function that calls itself for n - 1 and n - 2 recomputes the same steps again and again: for 30 steps it makes 1,664,079 calls to return 1,346,269. Storing each step's count once, or just keeping the last two numbers in a loop, does the job in 30 additions. The counts grow by about 1.618, the golden ratio, per step, which is the limitation of any approach that lists routes rather than counting them.
Where candidates lose it
The fast wrong answer is 2^10 = 1,024, treating each of ten stairs as a binary choice. A double step consumes two stairs, so routes have different numbers of moves and the choices are not ten independent coin flips.
The second loss is an off-by-one in the starting values, which lands on 55 or 144. Write the first three steps out by hand: 1 way to step 1, 2 ways to step 2, 3 ways to step 3. Anchor the sequence there and the tenth term is 89.
What the interviewer asks next
- What if you can also take three steps at a time?
- How many ways are there if step 5 is broken and cannot be stood on?
- Write code that counts the ways for 1,000 steps without the recursion blowing up.
Asked at Tower Research Capital, Intern Interview -, New York, 2012 (Wall Street Oasis):
How many ways can you jump up stairs if you can only jump either 1 or 2 steps?
093Three dice: red has faces 2, 6 and 7; green has 1, 5 and 12; blue has 3, 4 and 8, each face appearing twice. You and I each pick a die and roll once, and the higher number wins. Which die do you want, and does it matter who picks first?Belvedere TradingChicago · 2022
Try it first
Which die is best against the other two?
Show the worked solution
No die is best: red beats green, green beats blue and blue beats red, each with probability 5/9. So who picks first matters a great deal. Let me choose, then take the die that beats mine and win 5/9 of the time. If you are forced to pick first, every choice loses 5/9 of the time against an opponent who knows the cycle.
How do you work out who beats whom?
Each matchup has only nine equally likely pairs of faces, so write the 3 by 3 grid and count. Red against green: red's 2 beats only the 1, while its 6 and 7 each beat the 1 and the 5, for 1 + 2 + 2 = 5 wins out of 9. Do the same for the other two pairs and every matchup comes out 5 to 4: red over green, green over blue, blue over red. It is rock, paper, scissors built out of dice, and in rock, paper, scissors nobody asks which hand shape is best.
Counting the nine face pairs in each matchup shows red beats green, green beats blue and blue beats red, each in 5 of 9 cases, so the three dice form a cycle and the second player can always pick a die that wins 5/9 of the time. The relationshipP(R > G) the chance red's roll beats green's 1 + 2 + 2 the wins for red's faces 2, 6 and 7 in turn What it says in wordsCount, face by face, how many of the opponent's three faces each face beats, and divide by nine.Why does green lose to red when green has the higher average?
The averages are red 5, green 6 and blue 5. Winning is about how often, not by how much. Green's 12 wins every time it shows, but it shows only a third of the time, and green's other two faces, 1 and 5, lose to both of red's high faces. A higher mean and a higher chance of winning are different things, and the gap between them is the whole puzzle. Change the rules so the winner collects the difference between the two numbers, and green's expected margin against red is 6 - 5 = +1: now you want green against red, and blue against red is a dead heat at 0.
Where does a trader meet the same thing?
Head-to-head comparisons need not line up into a ranking. Strategy A can beat strategy B on more days than not, B can beat C, and C can beat A, whenever one of them earns its money in rare large wins, as green does. Before choosing between strategies, decide whether you care about how often you win or how much you make, because under the first a cycle like this one means there may be no best choice at all. The limitation of the puzzle is that it is one roll; over many rolls with the total score counted, the mean matters more and green's 12 starts to pay.
Where candidates lose it
The common slip is choosing green because its average, 6, is highest. The game pays for winning, not for margin, and green loses to red five times in nine.
The second loss is answering the first question and missing the second. Because the dice form a cycle, the real answer is strategic: insist that your opponent picks first. Saying that unprompted is what the interviewer is listening for.
What the interviewer asks next
- If each player rolls their die twice and adds the results, does the cycle still hold?
- Design three dice whose faces sum to the same total and still form a cycle.
- With three players each taking one die, can any die be favoured against both others?
Asked at Belvedere Trading, Prop Trading, Chicago, 2022 (Wall Street Oasis):
You have 3 dice: red has 2, 6, 7; green has 1, 5, 12; blue has 3, 4, 8.
094Two points are chosen independently and uniformly on the surface of a unit sphere. What is the expected distance between them measured along the surface, that is, the great-circle distance?Tower Research CapitalNew York · 2019
Try it first
What is the expected great-circle distance?
Show the worked solution
pi/2, about 1.571. Rotate the sphere so the first point sits at the north pole; nothing changes, because the second point is uniform. On a unit sphere the surface distance is the polar angle theta of the second point. The northern and southern hemispheres are mirror images, so theta is as likely to be pi/2 - t as pi/2 + t, and its mean is pi/2.
Why can you put the first point at the pole?
Ask how far apart two random towns are on a perfectly round planet, and you can simply stand in one of them: the globe looks the same from every spot on it. Symmetry lets you fix one point anywhere, so the problem shrinks to one random point and its angle from the pole. On a sphere of radius 1, the distance along the surface between the pole and a point at polar angle theta is theta itself, measured in radians, so the question becomes: what is the average polar angle of a uniform point?
With the first point at the pole, the surface distance is the polar angle theta of the second point, whose density (1/2) sin theta is symmetric about pi/2, so the expected distance is pi/2; a uniform angle, the dashed line, puts too many points near the poles. The relationshiptheta the polar angle of the second point, equal to the surface distance on a unit sphere f(theta) the density of that angle sin theta the relative size of the band of latitude at angle theta What it says in wordsThere is more surface near the equator than near the poles, in proportion to sin theta, and that density is symmetric about pi/2.Where does sin theta come from? The circle of latitude at angle theta from the pole has circumference 2 pi sin theta, so a thin band there holds surface in proportion to sin theta: almost none near the poles, the most at the equator. Archimedes put it more neatly: the area of a band is proportional to its height along the axis, so cos theta is uniform between -1 and 1. The density (1/2) sin theta is a mirror image about pi/2, so the mean is pi/2 without doing the integral. Integration by parts confirms it, a numerical integral gives 1.5708, and a seeded simulation of 100,000 pairs gives 1.570.
If a uniform angle gives the same mean, why does the shape matter?
Because the mean survives by luck of symmetry and almost nothing else does. Choosing theta uniformly on 0 to pi crowds points near the poles. Ask for the chance the two points are within 60 degrees of each other and the correct answer is (1 - cos 60 degrees)/2 = 0.25, while the uniform angle says 0.33. Ask for the expected straight-line chord, 2 sin(theta/2), and the correct density gives 4/3, about 1.333, while the uniform angle gives 4/pi, about 1.273. The simulation gives 1.333 for the chord. This is the limitation of the shortcut: it answers this one question and must not be reused for the next.
Where candidates lose it
The commonest wrong answer is 4/3, the expected straight-line chord, which some candidates remember from a related puzzle. The question asks for distance along the surface, which on a unit sphere is the angle itself.
The second loss is the right answer for the wrong reason: picking the angle uniformly between 0 and pi. The mean comes out right by symmetry, but any follow-up on the chord or on the chance of being close gives the wrong number. Say that the band of latitude grows like sin theta.
What the interviewer asks next
- What is the expected straight-line distance between the two points?
- What is the probability that the two points are within 60 degrees of each other?
- Four points are chosen uniformly on a sphere. What is the chance they all lie in one hemisphere?
Asked at Tower Research Capital, Quantitative Research, New York, 2019 (Wall Street Oasis):
a 3d geometry question about the surface distance between points chosen randomly on the surface of a sphere
095A knight starts in a corner of an empty chessboard and moves at random, choosing uniformly among its legal moves at every turn. What is the expected number of moves until it first returns to the starting corner?Quant researchQuant trading
Try it first
Pick the expected return time.
Show the worked solution
168 moves. A random walk that picks uniformly among a square's moves spends time at each square in proportion to its number of moves, its degree. The degrees on a chessboard sum to 336 and a corner has degree 2, so the knight is in that corner 2/336 of the time. The expected return time is the reciprocal, 336/2 = 168.
Why is the time spent on a square proportional to its number of moves?
Think of a town where every road is two-way and a lost tourist picks a road at random at each junction. Big junctions get more visits simply because more roads lead into them. For a random walk on a network of two-way links, the long-run share of time at a point is its number of links divided by the total, because that split sends exactly as much traffic along every link in each direction. Check it on one knight move from square u to square v: the flow is (d_u/336) x (1/d_u) = 1/336, and the flow back is the same, so nothing piles up anywhere.
The knight's move counts range from 2 in the corners to 8 in the centre and total 336, so the walk spends 2/336 of its time in the starting corner and returns to it every 168 moves on average. The relationshipd_v the number of legal knight moves from square v pi_v the long-run share of time the walk spends at v sum of d_u the total of the move counts over all 64 squares, 336 What it says in wordsThe share of time at a square is its move count over the total, and the average gap between visits is one over that share.How do you get 336 quickly and check it?
Tally the move counts by symmetry, as in the figure: four corners with 2, eight squares with 3, twenty with 4, sixteen with 6 and sixteen with 8. For a check, count the moves themselves: every knight move is a diagonal of a 2 by 3 or 3 by 2 rectangle, there are 84 such rectangles on the board, each holds 2 moves, so there are 168 two-way moves and 336 move ends. The answer, 168, happens to equal the number of moves, a coincidence of the corner having exactly two.
What are the limits of the trick?
The rule that return time is one over the long-run share holds for any chain that can reach every state and settles down, which is Kac's lemma. The degree formula for that share needs two-way moves chosen uniformly; if the knight preferred some moves, you would have to solve for the share directly. One more subtlety is worth saying: a knight always changes square colour, so it can only return after an even number of moves, and the chance of being in the corner at a fixed time does not settle down. The average return time is unaffected, and a seeded simulation of 100,000 returns gives 168.0. From a central square with 8 moves the return time is 336/8 = 42.
Where candidates lose it
The usual wrong answer is 64, from assuming the knight spends equal time on every square. It does not: squares with more moves are visited more often, and a corner, with only two moves, is one of the rarest.
The second loss is setting up 64 equations for expected hitting times. That works on paper and fails in an interview. Say the degree rule, count the degrees by symmetry, and check the total with the rectangle count.
What the interviewer asks next
- What is the expected return time to a central square such as d4?
- Answer the same question for a king starting in a corner.
- Why does the knight always need an even number of moves to come back?
096A desk's daily P&L in Rs lakh over seven days is -1, 2, 4, -9, 8, -2, 3. Which run of consecutive days has the largest total, and how do you find it in one pass through the data?Wolverine TradingChicago · 2014
Try it first
Which run has the largest total?
Show the worked solution
Days 5 to 7, the run 8, -2, 3, which totals Rs 9 lakh. Walk through the days keeping the best total of a run ending today: either today alone or today added to yesterday's best run, whichever is larger. Record the largest value you see. The run 2, 4 looks attractive but totals only 6, and the -9 day makes it pointless to carry anything before it.
How do you find the best run without checking every start and end day?
Picture walking along a road with toll booths that either pay you or charge you. You may choose where to start and stop collecting. If the purse you have carried from earlier booths is in the red, the sensible move is to drop it and start fresh at the next booth. A run ending today is worth extending from yesterday only if the best run ending yesterday is positive; if it is negative it can only drag today down, so today starts a new run. That rule looks at each day once. Checking every pair of start and end days means 28 runs for seven days and 31,375 for a trading year of 250 days.
Carrying the best run forward only while it is positive, the running total drops to -3 after the loss of 9 and restarts at 8 on day 5, so the best run is 8, -2, 3 with a total of 9, ahead of the tempting run 2, 4 at 6. The relationshipx_t the P&L on day t c_t the best total of a run that ends on day t best the largest c_t seen so far What it says in wordsThe best run ending today either starts today or extends the best run ending yesterday; keep whichever is bigger, and remember the biggest.Day P&L Best run ending today Best so far 1 -1 -1 -1 2 2 2 2 3 4 6 6 4 -9 -3 6 5 8 8 8 6 -2 6 8 7 3 9 9 Running the rule day by day, the best run ending today drops to -3 after day 4, restarts at 8 on day 5 and reaches 9 on day 7, which is the answer. Why does the tempting run 2, 4 lose?
Because one later day beats it on its own. After the -9, the best run ending on day 4 is 6 - 9 = -3, so the rule drops the past and day 5 starts fresh at 8. The -2 on day 6 dips the run to 6, but the 3 on day 7 lifts it to 9. The best run can contain a losing day: 8, -2, 3 beats 8 alone because the day after the loss more than repays it. A candidate who stops a run at the first red day misses this, and the brute-force check over all 28 runs confirms 9 is the maximum.
What edge cases does the interviewer probe?
Three. If every day is a loss, the answer should be the least bad single day, so start the best at the first day's value, not at zero, or you will report an empty run worth 0. To report which days, store the start index whenever you restart and copy it when you record a new best. The same pass with the signs flipped finds the worst run, here -9, the single -9 day. The limitation on a desk is that the best run in hindsight is a selected statistic: a strategy that is judged by its best stretch will always look better than it trades.
Where candidates lose it
The quick wrong answer is the run 2, 4, because it is the first good stretch. The 8 on day 5 beats it alone, and carrying 8 through -2 and 3 beats 8.
The second loss is in the code: starting the best total at zero, which reports 0 for a week of all losses, or restarting at every losing day instead of only when the running total itself turns negative. State the rule exactly: carry yesterday's run only while it is positive.
What the interviewer asks next
- Return the start and end days of the best run, not just its total.
- What does your code return if every day in the series is a loss?
- Find the best run if you may skip at most one day inside it.
Asked at Wolverine Trading, Quantitative Research, Chicago, 2014 (Wall Street Oasis):
Develop an algorithm to find out the section that contains the maximum sum.
097How many integers from 1 to 1,000 share no common factor with 1,000 other than 1?Quant researchQuant trading
Try it first
Pick the count.
Show the worked solution
400. Since 1,000 = 2^3 x 5^3, a number shares a factor with 1,000 exactly when it is divisible by 2 or by 5. There are 500 multiples of 2 and 200 of 5, but the 100 multiples of 10 sit in both lists, so 600 numbers share a factor and 400 do not. Euler's formula agrees: 1,000 x 1/2 x 4/5 = 400.
Which numbers share a factor with 1,000?
Picture a hall of 1,000 people where everyone wearing a red badge or a blue badge is asked to leave. To count who stays, you need the red-badge count, the blue-badge count, and how many wear both, because they would otherwise be counted out twice. Write 1,000 as 2^3 x 5^3: a number shares a factor with it exactly when it is divisible by 2 or by 5, so only two badges matter, and the powers 3 do not add any new conditions. Every multiple of 4 or 8 is already a multiple of 2, and every multiple of 25 or 125 is already a multiple of 5.
Of the numbers 1 to 1,000, 500 are multiples of 2 and 200 are multiples of 5, with 100 multiples of 10 in both, so 600 share a factor with 1,000 and 400 lie outside both circles; Euler's product 1,000 x 1/2 x 4/5 gives the same 400. The relationshipphi(1000) Euler's totient: how many of 1 to 1,000 share no factor with 1,000 1000/2, 1000/5 the counts of multiples of 2 and of 5 1000/10 the multiples of both, added back once What it says in wordsRemove the multiples of each prime, add back the multiples of both, and you get the same answer as multiplying by the share that survives each prime.Why does the quick product formula work here?
Half of all numbers are odd, and among those, four in five are not multiples of 5. Because 1,000 is a multiple of 10, the numbers 1 to 1,000 contain exactly 100 full blocks of ten, and in each block exactly 4 numbers, 1, 3, 7 and 9, survive both tests, so 100 x 4 = 400. The strip of 1 to 20 in the figure shows the pattern repeating, 8 survivors in 20. The product is exact only when the range is a whole number of such blocks: for 1 to 1,234 it gives 493.6, while a direct count gives 494.
Where does a question like this lead in an interview?
Usually to powers and remainders. Euler's theorem says a number coprime to n, raised to the power phi(n), leaves remainder 1 when divided by n, and that is the engine behind last-digit puzzles: phi(100) = 40, so 3^40 ends in 01 and so does 3^400. It also leads to probability: the chance that two large random integers share no factor tends to 6/pi^2, about 0.608. The habit the question tests is factorising first: once you see only the primes 2 and 5 matter, a counting question becomes a two-circle Venn diagram.
Where candidates lose it
The usual slip is 1,000 - 500 - 200 = 300, subtracting both lists and forgetting that the multiples of 10 were removed twice. Add them back once and the answer is 400.
The second loss is treating each prime power as a new condition, subtracting multiples of 4, 8, 25 and 125 as well. Every multiple of 4 is already a multiple of 2; only the distinct primes matter.
What the interviewer asks next
- How many integers from 1 to 1,000 share no factor with 360?
- What are the last two digits of 3^400?
- What is the probability that two randomly chosen integers share no common factor?
098Two traders' monthly P&L are independent and normal. A has mean Rs 10 lakh and standard deviation Rs 3 lakh; B has mean Rs 8 lakh and standard deviation Rs 4 lakh. What is the probability that A out-earns B in a given month?DRWLondon · 2025
Try it first
Pick the probability that A earns more than B in a month.
Show the worked solution
About 65.5%. The gap A - B is normal with mean 10 - 8 = Rs 2 lakh and variance 3^2 + 4^2 = 25, so its standard deviation is Rs 5 lakh. A out-earns B when the gap is positive, and zero sits 2/5 = 0.4 standard deviations below the mean, so the probability is Phi(0.4), about 65.5%. The better trader loses about one month in three.
Why do the variances add when you subtract?
You and a colleague set off for the same meeting from different places, and each journey is uncertain by a few minutes. The gap between your two arrival times is more uncertain than either journey, not less, because either of you can be the late one. Subtracting an independent random amount adds its noise, so Var(A - B) = Var A + Var B = 9 + 16 = 25, and the gap's standard deviation is 5, not 1. The mean subtracts as you would expect, 10 - 8 = 2. The gap is normal because a difference of independent normals is normal.
The two traders' monthly P&L overlap heavily, and the gap A - B has mean 2 and standard deviation 5, so the area above zero where A wins is only 65.5%, leaving B ahead in 34.5% of months. The relationshipmu_A, mu_B the mean monthly P&L, 10 and 8 sigma_A, sigma_B the standard deviations, 3 and 4 Phi the standard normal cumulative distribution What it says in wordsThe gap's mean is the difference of the means, its variance the sum of the variances, and the answer is how many standard deviations zero sits below that mean.How much does a longer comparison window help?
A lot, and at a predictable rate. Over a quarter of independent months the total gap has mean 6 and standard deviation 5 x sqrt(3), about 8.7, so A comes out ahead with probability 75.6%. Over a year the mean is 24 and the standard deviation 5 x sqrt(12), about 17.3, so the probability is 91.7%. The edge grows with the number of months and the noise with its square root, so the z-score grows with the square root of time. A risk manager who ranks traders on one month of P&L is ranking mostly noise.
What if the two traders' P&L are correlated?
Then the shared part cancels in the gap. With correlation 0.5, the variance is 9 + 16 - 2 x 0.5 x 3 x 4 = 13, a standard deviation of 3.61, and A wins with probability 71.0%. Positive correlation makes the comparison sharper because common market moves drop out of the difference; negative correlation does the opposite. The limitation is the normal assumption: real P&L has fat tails and skew, and if one trader earns through rare large months, the month-by-month win rate can disagree with the mean, so check the shape before trusting the 65.5%.
Where candidates lose it
The commonest slip is subtracting the standard deviations, 4 - 3 = 1, which makes A look almost certain to win at 97.7%. Noise does not cancel when you subtract independent variables; it adds.
The second loss is subtracting the variances, 16 - 9, or adding the standard deviations, 3 + 4. Square, add, then take the root: sqrt(9 + 16) = 5. The answer is then a z-score of 0.4, and Phi(0.4) is about 0.655.
What the interviewer asks next
- What is the probability that A out-earns B over a full year of independent months?
- If their monthly P&L has correlation 0.5, what is the answer?
- What is the probability that A out-earns B by more than Rs 5 lakh in a month?
Asked at DRW, Trading, London, 2025 (Wall Street Oasis):
technical interview based on normal distribution and market making
099A stock is worth either 100 or 110, with equal probability. 20% of the traders who arrive know the true value: they buy if it is 110 and sell if it is 100. The other 80% buy or sell at random, half and half. Where should a market maker set its ask so that it breaks even, on average, when someone buys from it?Jane StreetNew York · 2025
Try it first
Where should the ask be?
Show the worked solution
Set the ask at 106, and by the same logic the bid at 104. If the stock is worth 110, a buy arrives with probability 0.2 + 0.8 x 0.5 = 0.6; if it is worth 100, with probability 0.4. Given a buy, Bayes puts the chance of 110 at 0.6, so the stock is worth 106 to the market maker selling it. The spread of 2 is the price of trading against informed flow.
Why can't the market maker just quote the expected value of 105?
A second-hand car dealer who pays the average price for every car will find that the owners of good cars go elsewhere and the owners of bad ones queue up. Who chooses to trade with you is information. A market maker does not care what the stock is worth on average; it cares what the stock is worth given that someone has just chosen to buy from it. At an ask of 105, noise buyers are harmless, a loss of 5 when the stock is worth 110 and a gain of 5 when it is worth 100. Informed buyers only appear in the 110 world, and they cost 0.5 per arriving trader on average, so 105 is a losing quote.
Tracing who sends a buy order in each world, buys come with probability 0.30 from the 110 world and 0.20 from the 100 world, so a buy lifts the chance of 110 from 0.5 to 0.6 and the break-even ask is 106. The relationship0.6 the chance of a buy when the stock is worth 110: 0.2 informed plus 0.8 x 0.5 noise 0.4 the chance of a buy when the stock is worth 100: noise only V the stock's true value What it says in wordsSet the ask at the value of the stock conditional on being bought from, which Bayes' rule gives directly.What sets the width of the spread?
The share of informed traders and the size of what they know. With a share alpha informed, a buy is alpha + (1 - alpha)/2 likely in the high world and (1 - alpha)/2 in the low world, and the ask works out to 105 + 5 alpha. The spread is a fee for adverse selection: it is zero when nobody is informed and widens to the full 100 to 110 range when everyone is. The table runs the formula for a few shares. Order processing and inventory costs add to this in real markets, but the information component is what makes spreads jump around earnings and news.
Informed share Ask Bid Spread 0% 105 105 0 10% 105.5 104.5 1 20% 106 104 2 50% 107.5 102.5 5 100% 110 100 10 The break-even spread equals the informed share times the 10-point value gap, so it is 2 at 20% informed and 5 at 50% informed. What happens after the first trade?
The market maker updates. After one buy, the chance of 110 is 0.6, and if a second buy arrives the same Bayes step lifts it to 0.692, so the next ask is about 106.92. Each order moves the quotes towards the true value, which is how prices come to reflect what the informed traders know. The limitation is that the model has one share size, no inventory risk and no competition between market makers; real desks also skew quotes to manage position, which this puzzle leaves out.
Where candidates lose it
The fast wrong answer is 105, the unconditional expected value. It ignores that the act of buying is evidence: informed traders buy only when the stock is worth 110, so a market maker at 105 loses on every informed buyer and only breaks even on noise traders.
The second loss is overreacting and quoting 110 because some buyers are informed. Most buyers are noise traders, and a quote at 110 drives them away. Bayes gives the exact weight, 0.6 on the high value, and the ask of 106.
What the interviewer asks next
- Where should the bid be, and why is the spread symmetric here?
- After one buy at 106, where is the next ask?
- How does the spread change if half of the traders are informed?
Asked at Jane Street, Generalist, New York, 2025 (Wall Street Oasis):
It was a probability theory based quant trading style market making questions which were intense
100You regress a centred target y on one standardised feature x with no intercept. The sum of x squared is 100 and the sum of x times y is 80. What is the OLS slope, and what is the ridge slope with penalty lambda = 25?Citadel SecuritiesLondon · 2026
Try it first
Pick the pair.
Show the worked solution
OLS gives 0.8 and ridge gives 0.64. OLS minimises squared error and its slope is the sum of xy over the sum of x squared, 80/100. Ridge adds lambda times the slope squared to the loss, which puts lambda into the denominator: 80/(100 + 25) = 0.64. That is the OLS slope times 100/125 = 0.8, so ridge shrinks the slope towards zero but never to zero.
Where does lambda end up in the formula?
Think of a new analyst's forecast that you half trust: you do not discard it, you shade it towards zero, and the less data behind it the more you shade. Ridge does that mechanically. It minimises the squared errors plus lambda times the slope squared; setting the derivative to zero gives b = Sxy/(Sxx + lambda). Penalising the size of the slope acts exactly like adding observations whose x squared totals lambda and whose y is zero, data that say the slope is zero. With 100 of real evidence and 25 of make-believe evidence, the slope is 80/125 = 0.64.
The ridge slope 80/(100 + lambda) falls from the OLS value 0.8 to 0.64 at lambda 25 and 0.40 at lambda 100 without ever reaching zero, while the lasso slope falls in a straight line and hits exactly zero at lambda 160. The relationshipsum x_i y_i the cross-product of feature and target, 80 sum x_i^2 the sum of squares of the feature, 100 lambda the ridge penalty, 25 What it says in wordsRidge is OLS with lambda added to the sum of squares, so every slope is multiplied by Sxx/(Sxx + lambda).Why would you want a slope that is biased towards zero?
Because a smaller, steadier estimate can be closer to the truth on average. Suppose the true slope is 0.5 and the noise variance is 25. OLS is unbiased but its variance is 25/100 = 0.25. Ridge at lambda 25 has variance 0.16 and a bias of -0.1, so its mean squared error is 0.17. Ridge trades a little bias for a larger cut in variance, and when the signal is weak relative to the noise that trade wins. In this one-feature case the best lambda is noise variance over slope squared, 100, which halves the slope and cuts the error to 0.125. In practice the truth is unknown, so lambda is chosen by cross-validation.
lambda Slope on this data Variance Bias squared Mean squared error 0 0.80 0.2500 0.0000 0.2500 25 0.64 0.1600 0.0100 0.1700 100 0.40 0.0625 0.0625 0.1250 Assuming a true slope of 0.5 and noise variance 25, ridge at lambda 25 and 100 has a lower mean squared error than OLS because the drop in variance outweighs the bias it adds. How does lasso differ?
Lasso penalises lambda times the absolute slope instead. In one dimension that subtracts lambda/2 from the cross-product rather than adding to the denominator: (80 - 12.5)/100 = 0.675 at lambda 25, and exactly zero once lambda reaches 160. Ridge scales coefficients down; lasso shifts them down and can set them to exactly zero, which is why lasso selects features and ridge does not. Both penalties depend on the scale of x, which is why the feature must be standardised first; with correlated features, ridge spreads the weight across them while lasso tends to keep one.
Where candidates lose it
The fast wrong answer subtracts the penalty from the slope or from the numerator, which is lasso's mechanics, not ridge's. Ridge adds lambda to the sum of squares in the denominator, so the slope is scaled, not shifted.
The second loss is saying ridge is always better because it has lower variance. It trades variance for bias; if the true slope is large and the data plentiful, shrinking costs more in bias than it saves. Say that lambda is chosen by cross-validation, not by taste.
What the interviewer asks next
- What value of lambda halves the OLS slope?
- With two highly correlated features, how do ridge and lasso split the weight between them?
- Why must features be standardised before applying a ridge penalty?
Asked at Citadel Securities, Quantitative Research, London, 2026 (Wall Street Oasis):
very detailed and difficult questions about regularisation ridge and lasso

