Practice · Quant prep · Statistics & machine learning
Statistics & machine learning interview questions
43 questions with worked solutions. Regression, regularisation, classification metrics, estimation and backtest pitfalls.
26 easy · 17 medium · 0 hard · Question type reported at: XTX Markets Squarepoint Two Sigma D. E. Shaw G-Research Hudson River Trading
Practise timed: 30 questions · 60s each
All Quant prep topics
Applying to trading firms? The Quant Careers Report : what 13 firms test and pay, and when they hire. £79.
1
Easy
Type asked at Citadel Man Group Jane Street
The unbiased sample variance of
n n n observations divides the sum of squared deviations by:
n n n n − 1 n-1 n − 1 n + 1 n+1 n + 1 n \displaystyle \sqrt n n
Show answer
One degree of freedom is used up estimating the mean (Bessel's correction).
2
Easy
Type asked at DRW J.P. Morgan Hudson River Trading
The ordinary least squares estimate in
y = X β + ε y=X\beta+\varepsilon y = X β + ε is:
X ⊤ y \displaystyle X^\top y X ⊤ y ( X ⊤ X ) − 1 X ⊤ y \displaystyle (X^\top X)^{-1}X^\top y ( X ⊤ X ) − 1 X ⊤ y ( X X ⊤ ) − 1 y \displaystyle (XX^\top)^{-1}y ( X X ⊤ ) − 1 y X − 1 y \displaystyle X^{-1}y X − 1 y
Show answer
Answer: ( X ⊤ X ) − 1 X ⊤ y (X^\top X)^{-1}X^\top y ( X ⊤ X ) − 1 X ⊤ y
Setting the gradient of
∥ y − X β ∥ 2 \lVert y-X\beta\rVert^2 ∥ y − X β ∥ 2 to zero gives the normal equations
X ⊤ X β = X ⊤ y X^\top X\beta=X^\top y X ⊤ X β = X ⊤ y .
3
Easy
Type asked at Squarepoint Man Group Morgan Stanley
In a simple linear regression the correlation between
x x x and
y y y is
0.6 0.6 0.6 . What is
R 2 R^2 R 2 ?
Show answer
With one regressor,
R 2 = ρ 2 R^2=\rho^2 R 2 = ρ 2 .
4
Medium
Type asked at Morgan Stanley Man Group XTX Markets
In
k k k -nearest-neighbours, increasing
k k k generally:
raises variance and lowers bias raises bias and lowers variance raises both has no effect
Show answer
Answer: Raises bias, lowers variance
Averaging over more neighbours smooths the prediction: less sensitive to noise, less able to follow local structure.
5
Easy
Type asked at Jump Trading Morgan Stanley XTX Markets
Which penalty tends to set some coefficients exactly to zero?
L2 (ridge) L1 (lasso) Neither Both equally
Show answer
Answer: L1 (lasso)
The L1 ball has corners on the axes, so the optimum often lands where some coordinates are 0.
6
Easy
Type asked at Hudson River Trading Morgan Stanley Goldman Sachs
Logistic regression is fitted by minimising:
squared error cross-entropy (log loss) hinge loss absolute error
Show answer
Answer: Cross-entropy
It is maximum likelihood for a Bernoulli model, which is the log loss.
7
Easy
Type asked at G-Research Jane Street Millennium
Low training error with much higher test error is a sign of:
underfitting overfitting data leakage only a perfect model
Show answer
Answer: Overfitting
The model has learned noise specific to the training set.
8
Easy
Type asked at Jump Trading DRW Squarepoint
A classifier has 40 true positives and 10 false positives. What is its precision?
Show answer
T P T P + F P = 40 50 \dfrac{TP}{TP+FP}=\dfrac{40}{50} T P + F P T P = 50 40 .
9
Easy
Type asked at Two Sigma Citadel Morgan Stanley
A classifier has 40 true positives and 60 false negatives. What is its recall?
Show answer
T P T P + F N = 40 100 \dfrac{TP}{TP+FN}=\dfrac{40}{100} T P + F N T P = 100 40 .
10
Medium
Type asked at Citadel Millennium Morgan Stanley
Precision is
0.8 0.8 0.8 and recall is
0.4 0.4 0.4 . What is the F1 score?
Show answer
Answer: 8 15 ≈ 0.533 \tfrac{8}{15}\approx0.533 15 8 ≈ 0.533
The harmonic mean:
2 ⋅ 0.8 ⋅ 0.4 0.8 + 0.4 = 0.64 1.2 \dfrac{2\cdot0.8\cdot0.4}{0.8+0.4}=\dfrac{0.64}{1.2} 0.8 + 0.4 2 ⋅ 0.8 ⋅ 0.4 = 1.2 0.64 .
11
Easy
Type asked at Morgan Stanley XTX Markets Millennium
99% of examples are negative. What accuracy does a model get by always predicting "negative"?
Show answer
Which is why accuracy is a poor metric for imbalanced classes; look at precision, recall or AUC.
12
Easy
Type asked at Squarepoint J.P. Morgan Two Sigma
The first principal component is the direction that:
minimises variance of the projection maximises variance of the projection is orthogonal to the data mean maximises correlation with the target
Show answer
Answer: Maximises projected variance
It is the top eigenvector of the covariance matrix.
PDF · Edition 2 · £79
The Quant Careers Report
Research roles test statistics and code more than puzzles. The report sets out what each of 13 firms tests, the pay they state, and when to apply.
Buy the report — £79
See what is inside
13
Medium
Type asked at Citadel Squarepoint Hudson River Trading
A covariance matrix has eigenvalues
5 , 3 , 2 5,3,2 5 , 3 , 2 . What fraction of variance does the first principal component explain?
Show answer
5 5 + 3 + 2 \dfrac{5}{5+3+2} 5 + 3 + 2 5 .
14
Easy
Type asked at XTX Markets J.P. Morgan Man Group
A population has standard deviation 10. What is the standard error of the mean of 100 observations?
Show answer
σ / n = 10 / 10 \sigma/\sqrt n=10/10 σ / n = 10/10 .
15
Medium
Type asked at Squarepoint Jane Street DRW
With
σ = 20 \sigma=20 σ = 20 and
n = 400 n=400 n = 400 , what is the half-width of a 95% confidence interval for the mean?
Show answer
1.96 ⋅ σ / n = 1.96 ⋅ 20 / 20 1.96\cdot\sigma/\sqrt n=1.96\cdot20/20 1.96 ⋅ σ / n = 1.96 ⋅ 20/20 .
16
Easy
Type asked at Man Group Jane Street Millennium
If the learning rate in gradient descent is too large, the loss typically:
converges faster oscillates or diverges reaches the global minimum stays constant
Show answer
Answer: Oscillates or diverges
Steps overshoot the minimum; beyond a threshold (about
2 / L 2/L 2/ L for an
L L L -smooth loss) the iterates blow up.
17
Medium
Type asked at Hudson River Trading Citadel Goldman Sachs
What is the derivative of the sigmoid
σ ( x ) = 1 1 + e − x \sigma(x)=\dfrac1{1+e^{-x}} σ ( x ) = 1 + e − x 1 at
x = 0 x=0 x = 0 ?
Show answer
σ ′ ( x ) = σ ( x ) ( 1 − σ ( x ) ) = 1 2 ⋅ 1 2 \sigma'(x)=\sigma(x)(1-\sigma(x))=\tfrac12\cdot\tfrac12 σ ′ ( x ) = σ ( x ) ( 1 − σ ( x )) = 2 1 ⋅ 2 1 .
18
Easy
Type asked at Hudson River Trading DRW Citadel
Which activation most directly mitigates vanishing gradients in deep networks?
sigmoid tanh ReLU step function
Show answer
Answer: ReLU
Its gradient is 1 for positive inputs, so it does not shrink through many layers the way sigmoid and tanh do.
19
Easy
Type asked at XTX Markets Hudson River Trading Millennium
The main purpose of
k k k -fold cross-validation is to:
speed up training estimate out-of-sample performance increase the training set remove outliers
Show answer
Answer: Estimate out-of-sample performance
Each fold is held out once, giving a less noisy estimate than a single split.
20
Medium
Type asked at Hudson River Trading Citadel D. E. Shaw
A backtest uses each day's closing price to decide a trade executed at that same close. This is an example of:
survivorship bias look-ahead bias regularisation mean reversion
Show answer
Answer: Look-ahead bias
The signal uses information not available when the trade would actually have been placed.
21
Medium
Type asked at Hudson River Trading Two Sigma Squarepoint
Strong multicollinearity among regressors mainly causes:
biased coefficients inflated variance of the coefficients a lower R 2 \displaystyle R^2 R 2 non-normal residuals
Show answer
Answer: Inflated coefficient variance
OLS stays unbiased, but
( X ⊤ X ) − 1 (X^\top X)^{-1} ( X ⊤ X ) − 1 becomes large, so estimates are unstable.
22
Easy
Type asked at Jump Trading Squarepoint Two Sigma
Dropout in neural networks is primarily a form of:
optimisation regularisation normalisation data augmentation
Show answer
Answer: Regularisation
Randomly removing units stops the network relying on any single pathway.
23
Easy
Type asked at Squarepoint G-Research Jane Street
Naive Bayes assumes the features are:
normally distributed conditionally independent given the class uncorrelated with the class identically distributed
Show answer
Answer: Conditionally independent given the class
That is what makes the likelihood factorise into a product.
24
Easy
Type asked at XTX Markets Jane Street Millennium
What is the entropy of a fair coin, in bits?
Show answer
− 2 ⋅ 1 2 log 2 1 2 = 1 -2\cdot\tfrac12\log_2\tfrac12=1 − 2 ⋅ 2 1 log 2 2 1 = 1 .
25
Medium
Type asked at DRW Morgan Stanley Jane Street
What is the entropy of a fair six-sided die, in bits?
Show answer
Answer: log 2 6 ≈ 2.585 \log_26\approx2.585 log 2 6 ≈ 2.585
A uniform distribution on
n n n outcomes has entropy
log 2 n \log_2n log 2 n .
26
Easy
Type asked at D. E. Shaw Jump Trading Man Group
Kullback–Leibler divergence
D K L ( P ∥ Q ) D_{KL}(P\Vert Q) D K L ( P ∥ Q ) is:
symmetric in P P P and Q Q Q not symmetric, and always ≥ 0 \ge0 ≥ 0 sometimes negative a true metric
Show answer
Answer: Not symmetric, always ≥ 0
Gibbs' inequality gives non-negativity; in general
D K L ( P ∥ Q ) ≠ D K L ( Q ∥ P ) D_{KL}(P\Vert Q)\ne D_{KL}(Q\Vert P) D K L ( P ∥ Q ) = D K L ( Q ∥ P ) .
27
Medium
Type asked at Morgan Stanley Man Group Two Sigma
X ∼ N ( 0 , 1 ) X\sim N(0,1) X ∼ N ( 0 , 1 ) . What is
corr ( X , X 2 ) \operatorname{corr}(X,X^2) corr ( X , X 2 ) ?
Show answer
cov ( X , X 2 ) = E [ X 3 ] = 0 \operatorname{cov}(X,X^2)=\mathbb E[X^3]=0 cov ( X , X 2 ) = E [ X 3 ] = 0 . Zero correlation despite complete dependence.
28
Easy
Type asked at Morgan Stanley Man Group Jump Trading
A coin gives 7 heads in 10 tosses. What is the maximum-likelihood estimate of
P ( heads ) P(\text{heads}) P ( heads ) ?
Show answer
For a Bernoulli model the MLE is the sample proportion.
29
Medium
Type asked at Man Group G-Research Goldman Sachs
Waiting times are modelled as exponential and the sample mean is 4. What is the MLE of the rate
λ \lambda λ ?
Show answer
λ ^ = 1 / x ˉ \hat\lambda=1/\bar x λ ^ = 1/ x ˉ .
30
Medium
Type asked at Jane Street G-Research Citadel
A strategy has a daily Sharpe ratio of
0.1 0.1 0.1 . Roughly what is its annualised Sharpe ratio (252 trading days)?
Show answer
Answer: ≈ 1.59 \approx1.59 ≈ 1.59
Mean scales with
T T T , volatility with
T \sqrt T T , so the Sharpe ratio scales with
252 ≈ 15.9 \sqrt{252}\approx15.9 252 ≈ 15.9 .
31
Medium
Type asked at Millennium Hudson River Trading Goldman Sachs
Two uncorrelated assets each have 20% volatility. What is the volatility of an equal-weight portfolio, in %?
Show answer
Answer: ≈ 14.1 % \approx14.1\% ≈ 14.1%
0.5 2 ⋅ 0.2 2 ⋅ 2 = 0.2 / 2 \sqrt{0.5^2\cdot0.2^2\cdot2}=0.2/\sqrt2 0. 5 2 ⋅ 0. 2 2 ⋅ 2 = 0.2/ 2 .
32
Easy
Type asked at Squarepoint Millennium Jump Trading
You test 20 strategies that truly have no edge, each at the 5% significance level. How many false positives do you expect?
Show answer
20 × 0.05 20\times0.05 20 × 0.05 . The reason backtest results need multiple-testing corrections.
33
Easy
Type asked at Jump Trading J.P. Morgan D. E. Shaw
With a Bonferroni correction for 20 tests at overall level 0.05, what threshold should each test use?
Show answer
Answer: 0.0025 0.0025 0.0025
34
Easy
Type asked at D. E. Shaw XTX Markets Jump Trading
That the distribution of a sample mean is approximately normal for large
n n n is:
the law of large numbers the central limit theorem Chebyshev's inequality Jensen's inequality
Show answer
Answer: The central limit theorem
The law of large numbers says the mean converges; the CLT describes its fluctuations.
35
Medium
Type asked at Jump Trading DRW Two Sigma
The ridge regression estimate with penalty
λ ∥ β ∥ 2 \lambda\lVert\beta\rVert^2 λ ∥ β ∥ 2 is:
( X ⊤ X ) − 1 X ⊤ y \displaystyle (X^\top X)^{-1}X^\top y ( X ⊤ X ) − 1 X ⊤ y ( X ⊤ X + λ I ) − 1 X ⊤ y \displaystyle (X^\top X+\lambda I)^{-1}X^\top y ( X ⊤ X + λ I ) − 1 X ⊤ y ( X ⊤ X − λ I ) − 1 X ⊤ y \displaystyle (X^\top X-\lambda I)^{-1}X^\top y ( X ⊤ X − λ I ) − 1 X ⊤ y λ ( X ⊤ X ) − 1 X ⊤ y \displaystyle \lambda(X^\top X)^{-1}X^\top y λ ( X ⊤ X ) − 1 X ⊤ y
Show answer
Answer: ( X ⊤ X + λ I ) − 1 X ⊤ y (X^\top X+\lambda I)^{-1}X^\top y ( X ⊤ X + λ I ) − 1 X ⊤ y
The penalty adds
2 λ β 2\lambda\beta 2 λ β to the gradient, shifting the normal equations by
λ I \lambda I λ I .
36
Easy
Type asked at Citadel D. E. Shaw Goldman Sachs
What is the training error of 1-nearest-neighbour classification (no duplicate points)?
Show answer
Each training point is its own nearest neighbour. A reminder that training error says little.
37
Medium
Type asked at Citadel XTX Markets Morgan Stanley
You fit ordinary least squares with 100 features and only 50 observations. What happens?
The fit is unique and unbiased There are infinitely many coefficient vectors that fit the data exactly The residual sum of squares is minimised at a unique interior point The estimator is consistent The variance of the estimator is zero
Show answer
Answer: B. There are infinitely many coefficient vectors that fit the data exactly
With more features than observations the design matrix has a non-trivial null space, so the normal equations are underdetermined: infinitely many solutions give a perfect in-sample fit. This is why regularisation is needed.
38
Easy
Type asked at Jane Street Squarepoint Morgan Stanley
What is the area under the ROC curve for a classifier that assigns scores at random?
Show answer
Random scores rank a positive above a negative half the time, and AUC is exactly that probability.
39
Easy
Type asked at Millennium DRW G-Research
In ridge regression, what happens to the coefficients as the penalty
λ → ∞ \lambda\to\infty λ → ∞ ?
They approach the OLS estimates They approach zero They diverge They approach one They become exactly sparse
Show answer
Answer: B. They approach zero
The penalty dominates the loss, so the minimiser shrinks to the zero vector. Ridge shrinks smoothly; lasso is the one that sets coefficients exactly to zero.
40
Medium
Type asked at Millennium J.P. Morgan Jane Street
In
k k k -nearest-neighbour regression, what happens as
k k k increases?
Bias falls and variance rises Bias rises and variance falls Both rise Both fall Neither changes
Show answer
Answer: B. Bias rises and variance falls
Averaging over more neighbours smooths the fit: less sensitive to noise (lower variance) but less able to follow the true function (higher bias).
41
Medium
Type asked at Hudson River Trading Man Group D. E. Shaw
A classifier has precision 0.6 and recall 0.3. What is its
F 1 F_1 F 1 score?
Show answer
F 1 F_1 F 1 is the harmonic mean:
2 ( 0.6 ) ( 0.3 ) 0.6 + 0.3 = 0.36 0.9 \tfrac{2(0.6)(0.3)}{0.6+0.3}=\tfrac{0.36}{0.9} 0.6 + 0.3 2 ( 0.6 ) ( 0.3 ) = 0.9 0.36 .
42
Easy
Type asked at Man Group Squarepoint Goldman Sachs
What is the correlation between
X X X and
2 X + 3 2X+3 2 X + 3 ?
Show answer
Correlation is invariant to positive linear transformations.
43
Medium
Type asked at Morgan Stanley Jump Trading Man Group
In a simple regression of
y y y on
x x x , the correlation is 0.6 and the two standard deviations are equal. What is the slope?
Show answer
β ^ = ρ s y s x \hat\beta=\rho\,\tfrac{s_y}{s_x} β ^ = ρ s x s y , and the ratio is 1. This is regression to the mean: the slope is below 1 even though the variables are equally spread.
Keep practising
Probability Expected value, conditioning, random walks, order statistics and the classic puzzles.
147 questions →
Brainteasers Counting, pigeonhole, weighing and logic puzzles, with the short argument that cracks each.
114 questions →
Stochastic calculus Brownian motion, Itô’s lemma, martingales, Girsanov and Black–Scholes.
38 questions →
Stochastic differential equations Geometric Brownian motion, Ornstein–Uhlenbeck and CIR, hitting times, Fokker–Planck, simulation schemes and Girsanov.
50 questions →
Expected value & market making Fair value, betting and Kelly, options intuition and quoting against informed flow.
42 questions →
Mental arithmetic The fast, exact arithmetic trading interviews test under time pressure.
66 questions →
GMAT practice questions 239 questions with worked solutions, and a timed test.
Open →
GRE practice questions 120 questions with worked solutions, and a timed test.
Open →
Oxbridge maths practice 90 questions with worked solutions, and a timed test.
Open →
Executive Assessment practice 91 questions with worked solutions, and a timed test.
Open →
Want someone to work through these with you? Quant interview preparation ,
one to one, or book a free 20-minute call .