Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
008Z1 and Z2 are independent standard normal random variables. What are the mean and variance of Z1 squared + Z2 squared, and what is the probability that it exceeds 2?Quant researchQuant trading
Try it first
What is P(Z1 squared + Z2 squared > 2)?
Show the worked solution
Mean 2, variance 4, and the probability of exceeding 2 is e to the -1, about 36.8%. Each Z squared has mean 1 and variance 2, so the sum has mean 2 and variance 4. The sum is a chi-squared with two degrees of freedom, which happens to be exactly an exponential with mean 2. Its tail beyond t is e to the -t/2, so beyond 2 it is e to the -1.
How do you get the mean and variance without the distribution?
E[Z squared] is the variance of Z, which is 1. For the variance of Z squared you need the fourth moment: E[Z to the 4] is 3 for a standard normal. So Var(Z squared) = 3 - 1 = 2, and because Z1 and Z2 are independent the variances add, giving a mean of 2 and a variance of 4. Say the fourth moment of 3 aloud; it is the number interviewers check you know, and it is why normal kurtosis is quoted as 3.
The sum of two squared standard normals has density one half times e to the minus x over 2, an exponential with mean 2 and variance 4, and the area beyond 2 is exactly e to the minus 1, about 36.8%. Why is this particular sum exponential?
Think of a dart thrown at a board where both the horizontal and vertical errors are independent standard normals. The joint density depends only on the distance from the centre, so the dart's direction is uniform and all the information is in the radiusThe distance of the point (Z1, Z2) from the origin, the square root of Z1 squared plus Z2 squared.. Switching to polar coordinates, the chance that the squared distance exceeds t is e to the -t/2, which is the tail of an exponential with mean 2. At t = 2 the answer is e to the -1.
The relationshipr the distance of (Z1, Z2) from the origin \frac{1}{2\pi} e^{-r^2/2} the joint density of two independent standard normals e^{-t/2} the tail of an exponential distribution with mean 2 What it says in wordsIn polar coordinates the angle integrates out and the radius gives an exponential tail.Why is 50% the tempting wrong answer?
Because 2 is the mean and people read the mean as the middle. For a right-skewed distribution the mean sits above the median, so less than half the mass lies beyond it; here the median is 2 ln 2, about 1.39. A simulation of 200,000 pairs gives a mean of 1.997, a variance of 3.96 and a tail share of 0.368, matching the exact results. The same polar trick is what powers the Box-Muller method for generating normal random numbers.
Where candidates lose it
The common wrong answer is 50%, from treating the mean as the median. Chi-squared variables are skewed to the right, and the skew is largest with few degrees of freedom.
The second trap is the variance. Candidates who say the variance of Z squared is 1 have confused it with the variance of Z. The fourth moment of 3 is the step, and missing it gives a variance of 2 for the sum instead of 4.
What the interviewer asks next
- What is the distribution of the square root of Z1 squared + Z2 squared?
- How would you use this to generate normal random numbers from uniforms?
- What are the mean and variance of a chi-squared with k degrees of freedom?
020A broad stock index has returned an average of 11% a year over the past 30 years, with an annual standard deviation of 16% (illustrative figures). Assuming yearly returns are independent, give a 95% confidence interval for its true expected annual return.Old Mission CapitalChicago · 2025
Try it first
Roughly how wide is the 95% interval?
Show the worked solution
About 5.3% to 16.7%. The standard error of a 30-year average is 16% divided by the square root of 30, 2.92 points. A 95% interval is 1.96 standard errors either side: 11% plus or minus 5.7. With a t value for 29 degrees of freedom it is a touch wider, plus or minus 6.0. Thirty years of data still leave the expected return very uncertain.
Why is the band so wide after thirty years?
Imagine judging a new cricketer's true batting average from a handful of innings. Scores swing wildly from one innings to the next, so a few innings tell you little. The precision of an average grows only with the square root of the number of observations, and yearly returns swing by 16 points, so 30 years give a standard error of about 2.9 points. That is large next to an average of 11%: the true figure could plausibly be 6% or 16%.
Around an 11% average with 16% annual volatility, the 95% interval is plus or minus 9.9 points with 10 years of data, 5.7 points with 30 years and still 2.9 points with 120 years, because precision grows only with the square root of the sample. How do you set it up in the room?
State the assumption, then compute. Treat the 30 annual returns as independent draws with a standard deviation of 16%, so the sample average has a standard error of 16 over root 30. Root 30 is about 5.48, so the standard error is 2.92. Multiply by 1.96: 5.73. The interval is 5.3% to 16.7%. If the interviewer pushes, note that with only 30 observations a t distributionThe distribution used for an average when the standard deviation is estimated from the same small sample; it has fatter tails than the normal. with 29 degrees of freedom gives a multiplier of about 2.045, widening the band slightly.
The relationship\bar r the average annual return, 11% \sigma the annual standard deviation, 16% n the number of yearly observations, 30 What it says in wordsThe interval is the average plus or minus 1.96 standard errors, and the standard error is volatility over the square root of years.What limitation should you add?
Halving the band needs four times the data: 120 years still only pins the average to within about 2.9 points, and markets change over such spans. Returns are also not quite independent from year to year, fat tails make the normal multiplier optimistic, and the arithmetic average overstates the compound growth rate. The practical lesson is that expected returns are the hardest input in finance to estimate, far harder than volatility, which is why many quant processes lean on risk estimates and treat return forecasts with caution.
Where candidates lose it
The common mistake is using 16% as the width, the spread of a single year, rather than the standard error of the average. That gives an interval from -20% to 42%, which describes one year's return, not the long-run mean.
The opposite slip is dividing by 30 instead of the square root of 30, which gives a band of about 1 point and badly overstates what the data can tell you.
What the interviewer asks next
- How many years of data would you need to pin the mean to within plus or minus 1 point?
- How would monthly data change the interval for the mean?
- Why is volatility much easier to estimate than the mean from the same data?
Asked at Old Mission Capital, Prop Trading, Chicago, 2025 (Wall Street Oasis):
Confidence interval on S&P 500 return past 30 years
041Five observations come from a uniform distribution on 0 to theta: 3.1, 7.4, 5.2, 9.0 and 1.8. What is the maximum likelihood estimate of theta, is it biased, and how would you correct it?AQR Capital ManagementTown of Greenwich · 2022
Try it first
What is the maximum likelihood estimate of theta?
Show the worked solution
The MLE is 9.0, the largest observation; it is biased low, and multiplying by (n + 1)/n = 6/5 gives an unbiased 10.8. Each observation has density 1/theta when theta covers it, so the likelihood is theta to the minus 5 for theta at least 9.0 and zero below. That peaks at 9.0. But the sample maximum averages 5/6 of theta, never above it, so scale it up by 6/5.
Why does the likelihood peak at the largest observation?
Suppose raffle tickets are numbered 1 to N and you see five, the highest being 90. N cannot be below 90, and the smaller N is, the more likely it was to produce those particular five tickets. For a uniform on 0 to theta, each observation has density 1/theta, so the likelihood is theta to the minus 5, which only falls as theta grows, but it is zero for any theta below an observation. The best allowed value is the smallest theta that covers all the data: the maximum, 9.0. Calculus does not help here, because the peak sits at the edge where the likelihood jumps from zero.
The likelihood is zero for theta below 9.0, peaks at 9.0 and then falls as theta to the minus 5, down to 40% of the peak at 10.8; on the data line, the MLE of 9.0 sits at the largest observation, the method of moments gives 10.6 and the bias-corrected estimate is 10.8. Why is 9.0 biased, and what is the right correction?
The sample maximum can never exceed theta, so it can only err on the low side. Five points drop into 0 to theta and cut it into six gaps of the same average size, so the largest point sits on average one gap short of theta: at 5/6 of theta. Scaling the maximum by (n + 1)/n removes that bias: 9.0 x 6/5 = 10.8. The same logic underlies the classic serial-number estimation problem from wartime production counts.
The relationshiptheta the unknown upper end of the uniform n = 5 number of observations max the largest observation, 9.0 What it says in wordsThe likelihood peaks at the sample maximum, which on average falls short of theta by a factor n/(n + 1), so scale it up.An interviewer may ask why not use twice the mean, 2 x 5.3 = 10.6, which is also unbiased. The corrected maximum is far more precise: its variance is theta squared over n(n + 2), against theta squared over 3n for twice the mean, so twice the mean is 2.3 times as variable with five points. Twice the mean can even land below the largest observation, an estimate the data have already ruled out. The limitation of the correction is that unbiased is not the only goal: the multiple of the maximum with the smallest mean squared error is (n + 2)/(n + 1), which gives 10.5 here, and saying you would choose by the loss that matters shows you know the trade.
Where candidates lose it
The common loss is setting the derivative of the log-likelihood to zero, getting -5/theta = 0, and concluding there is no maximum. The maximum is at a boundary, where the indicator switches on, and that is the point of the question.
The second is answering 9.0 and stopping. The follow-up is always the bias; say that the maximum sits below theta on average and give the (n + 1)/n correction with its one-line reason.
What the interviewer asks next
- What is the MLE if the distribution is uniform on theta to 2 theta?
- Derive the variance of the corrected estimator.
- The observations come from a uniform on theta minus 1 to theta plus 1. What is the MLE now?
Asked at AQR Capital Management, Trading, Town of Greenwich, 2022 (Wall Street Oasis):
Derive the mle for some given distribution. Explain linear regression intuitively and derive the ols estimate.
057Z is a standard normal random variable. What is the expected value of max(Z, 0), and what does that number tell you about the price of an at-the-money option?Quant researchQuant trading
Try it first
Roughly what is E[max(Z, 0)]?
Show the worked solution
1/sqrt(2 pi), about 0.399. Only the positive half contributes, and there you integrate z times the normal density. Because the derivative of the density is minus z times the density, the integral is simply the density's height at zero. So an at-the-money call on a normally distributed move is worth about 0.4 standard deviations of that move: roughly 0.4 x S x volatility x the square root of time.
Why is the answer not zero, and not one half?
Think of a shop that keeps the profit on good days and closes, losing nothing, on bad days. Its average day is better than the average of all days, because the bad days have been floored. max(Z, 0) throws away every negative outcome and keeps every positive one at its full size, so its mean is the positive half's contribution alone: the integral of z times the density from zero to infinity. That is not one half, which is only the chance of being positive; the size of each positive draw matters too.
The shaded area under z times the normal density on the positive side is exactly 0.399, the same as the density's peak height, so an at-the-money call on a normal move of one standard deviation is worth about 0.4, which for a Rs 1,000 stock at 20% volatility over three months is about Rs 40. How do you do the integral in one line?
Notice what differentiating the density gives. The derivative of e to the minus z squared over 2 is minus z times itself, so z times the density is the negative derivative of the density, and its integral from 0 to infinity is the density at 0 minus the density at infinity. The density at infinity is zero, and at zero it is 1/sqrt(2 pi). No tables, no substitution: the answer is 0.3989. Doubling it gives E[|Z|], about 0.798, which is the at-the-money straddle.
The relationshipphi(z) the standard normal density, e^(-z^2/2) / sqrt(2 pi) phi(0) the height of the density at its peak What it says in wordsThe expected positive part of a standard normal equals the height of the bell at its centre.What does it say about an at-the-money option?
If the stock's move to expiry is roughly normal with standard deviation S x vol x sqrt(T), an at-the-money call pays the positive part of that move. So its value is about 0.4 x S x vol x sqrt(T), the rule of thumb option traders use to price at-the-money options in their heads. For a Rs 1,000 stock at 20% volatility and three months, sqrt(T) is 0.5 and the call is about 0.399 x 1,000 x 0.2 x 0.5 = Rs 39.9; the Black-Scholes value with zero rates is Rs 39.88. The rule loosens for long maturities and high volatilities, where the lognormal skew matters.
Where candidates lose it
The two fast wrong answers are 0, from averaging Z itself, and 0.5, from confusing the probability of a positive draw with its expected size. Both come from answering before writing down what is being averaged.
The second loss is getting 0.399 and not connecting it to options, which is why the question is asked on a trading desk. Say the 0.4 rule in the same breath.
What the interviewer asks next
- What is E[max(Z, 1)]?
- What is the variance of max(Z, 0)?
- Using the rule, what is an at-the-money straddle worth on a Rs 500 stock at 30% volatility for one month?
088A strategy's true annualised Sharpe ratio is 1.0. Roughly how many years of returns do you need before a t-test rejects a zero mean at about the 5% level? What if the Sharpe ratio is 0.5?Viking Global InvestorsNew York · 2014
Try it first
How many years does a Sharpe 0.5 strategy need?
Show the worked solution
About 4 years at a Sharpe of 1, and about 16 years at 0.5. The t-statistic for a mean return is the Sharpe ratio times the square root of the number of years, so reaching t = 2 needs (2 / SR)^2 years. Halving the Sharpe ratio quadruples the evidence you need, and sampling daily instead of yearly does not shorten it.
Why does the t-statistic come out as Sharpe times root years?
A t-test on a mean divides the average return by its standard error, which is the volatility over the square root of the number of observations. With annual observations that ratio is (mean / volatility) x sqrt(years), and mean over volatility is exactly the annual Sharpe ratio. So a Sharpe of 1 gives t = sqrt(years): 2 after 4 years. A Sharpe of 0.5 gives t = 0.5 x sqrt(years): 2 only after 16 years. With the textbook 1.96 in place of 2 the numbers are 3.8 and 15.4 years; the round figures are what you say in the room.
The t-statistic equals the Sharpe ratio times the square root of years, so a Sharpe of 1 reaches t = 2 after 4 years and a Sharpe of 0.5 only after 16: halving the Sharpe quadruples the track record you need. The relationshipr bar the average annual return in excess of cash sigma the annual volatility N the number of years observed SR the annual Sharpe ratio, r bar over sigma What it says in wordsThe evidence for a real edge grows with the square root of time, scaled by the Sharpe ratio.Can you shortcut it with daily data?
This is the follow-up that separates candidates. Sampling daily gives about 252 times as many observations a year, but the daily Sharpe ratio is smaller by the square root of 252, because daily mean scales with time and daily volatility with its square root. The two effects cancel exactly, so the t-statistic depends on calendar time, not on how finely you slice it. Think of estimating a river's average level: measuring every minute instead of every day does not help if the river's slow swings are the uncertainty.
What makes the real requirement even longer?
Three things, each worth one sentence. Returns are not independent from year to year, and positive autocorrelation inflates the true standard error. If you tested twenty strategies and kept the best, a t of 2 is easy to get by luck, so the bar has to rise with the number of ideas tried. And the Sharpe ratio itself drifts as markets change, so a sixteen-year record may be measuring two different strategies. A desk that says a Sharpe 0.5 strategy is proven after three years is reading noise.
Where candidates lose it
The first loss is scaling linearly: a Sharpe half as big needs twice as long, so 8 years. The t-statistic grows with the square root of time, so the years scale with the square of 1/Sharpe, and 16 is right.
The second loss is proposing daily data as the fix. The number of observations goes up but the per-observation Sharpe goes down by the square root of that factor, and the two cancel.
What the interviewer asks next
- How many years does a Sharpe of 2 need, and why do high-frequency desks care?
- If you tested 50 strategies, roughly what t-statistic would you demand of the best one?
- How does positive autocorrelation in monthly returns change the answer?
Asked at Viking Global Investors, Quantitative Research, New York, 2014 (Wall Street Oasis):
how to reject a hypothesis test, what's your structure of your code, what's the sample size
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
