Quant

Statistics and machine learning

The statistics quant interviews lean on: regression and its traps, correlation, what significance does and does not mean, normal tails, return arithmetic and the basics of model fitting.

Read first: Probability and brainteasers

7 concepts8 min read25-question test, from a bank of 33Updated

Concept 1 of 71 min

Regression and its traps

The rule
The OLS (ordinary least squares) slope of y on x is the correlation times σy divided by σx, and with one regressor R² is the squared correlation.
Worked examples

Slope against R²

Given
Correlation0.4
σy6
σx3
  1. Slope = 0.4 × 6 ÷ 3 = 0.8
  2. R² = 0.42 = 0.16

y moves 0.8 per unit of x, yet x explains only 16% of its variance.

A stronger correlation

Given
Correlation0.6
  1. R² = 0.62 = 0.36

Going from 0.4 to 0.6 more than doubles the variance explained, from 16% to 36%.

The picture
Formula
Slope=ρ × σy ÷ σx
R²=ρ²
adjusted R²=1−(1 − R²) × (n − 1) ÷ (n − k − 1)
Why it holds

Heteroskedasticity leaves the coefficients unbiased but the usual standard errors wrong. Near-collinear regressors give unstable coefficients, and leaving out a variable that drives both sides biases the slope.

The slope carries the units of y per unit of x, so it is not the correlation. A correlation of 0.6 explains only about a third of the variance.

With heteroskedastic residuals, t-statistics mislead: use robust (White) standard errors. When 2 regressors move together, the model cannot tell their effects apart, so estimates stay unbiased but imprecise.

A strong link between a stock's returns and its advertising spend can come from the market driving both: add it as a control. Adding a variable never lowers R², so adjusted R² penalises extra regressors.

Watch out
  • Taking the correlation as the slope.
  • Thinking heteroskedasticity biases the coefficients.
  • Judging a model with more regressors on plain R².
In the interview
  1. You find that a stock's returns rise with something it reports each quarter. What would make you doubt the relationship?

    A complete answer covers

    • An omitted variable, such as the market, driving both.
    • Non-stationary series producing spurious correlation.
    • Standard errors that ignore heteroskedasticity or autocorrelation.
    • Data mining: many variables tried, one found.

Also in our technical interviews, on camera, with a score.

Concept 2 of 71 min

Correlation, variance of sums and spurious links

The rule
The variance of a sum adds the variances and twice the covariance, and correlations of trending price levels are often spurious, so correlate returns.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 3 of 71 min

Significance, errors and intervals

The rule
A p-value is the probability of data at least this extreme if the null hypothesis is true, and a mean's standard error is σ ÷ √n.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 4 of 71 min

Normal quantiles, skewness and fat tails

The rule
For a normal variable about 68.3% lies within 1 standard deviation and 95.4% within 2, and 1.645 is the one-sided 5% quantile.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 5 of 71 min

Return arithmetic and robust statistics

The rule
A Sharpe ratio scales with the square root of time, because mean returns grow with time and volatility with its root.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 6 of 71 min

Fitting models: overfitting, regularisation, metrics

The rule
A model that fits training data far better than new data has overfitted, and Lasso can set coefficients to zero while ridge only shrinks them.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 7 of 71 min

AdvancedThe Sharpe ratio luck alone would find

The rule
A Sharpe ratio estimated over T years has a standard error of about the square root of 1 ÷ T for a true Sharpe near zero.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Recap

  • OLS slope = correlation × σy ÷ σx; with one regressor, R² is the squared correlation.
  • Var(X + Y) = Var(X) + Var(Y) + 2 × ρ × σX × σY; correlate returns, not price levels.
  • A p-value is the chance of data this extreme if the null is true, not the chance the null is true; test many strategies and some will pass by luck.
  • Standard error = σ ÷ √n; a 95% interval is ± 1.96 standard errors; 2.33 is the one-sided 1% quantile.
  • Sharpe ratios scale with √time; log returns add; the median resists outliers; a big gap between training and test fit means overfitting.
Now test it

25 questions on Statistics and machine learning

Timed, like the real one, drawn from a bank of 33. Every answer explained.

Test yourself →