← Citadel Interview Insights

Citadel·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Citadel quant engineer interview that went deep into regression theory. The core question was about deriving OLS slopes and showing their product equals r squared. More math-heavy than I expected for an engineering role.

Questions Asked (2)

Q1

Derive the least squares slopes for regressing y on x and for regressing x on y. Then show that multiplying the two slopes together gives you the squared Pearson correlation coefficient.

Technical Trade-offsData Modeling
Author's notes

I got the individual slope formulas fine, Cov(x,y)/Var(x) and Cov(x,y)/Var(y).

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by writing the least squares slope formulas for both regressions, then multiply them and simplify using the definitions of covariance and variance. Finally, recognize that the product equals the squared Pearson correlation coefficient by definition.

Pro tip: Emphasize the symmetry and the fact that the product of slopes is always between 0 and 1, which is a key insight for understanding regression to the mean and predictive power.

1. Define the regression models

State the linear models: y = a + bx + ε and x = c + dy + η, where b and d are the slopes to be derived.

2. Derive the least squares slope for y on x

Using calculus or known formulas, show that b = Cov(x,y) / Var(x).

3. Derive the least squares slope for x on y

Similarly, show that d = Cov(x,y) / Var(y).

4. Multiply the slopes

Compute b * d = [Cov(x,y)]^2 / [Var(x) * Var(y)].

5. Relate to Pearson correlation

Recognize that the squared Pearson correlation coefficient r^2 = [Cov(x,y)]^2 / [Var(x) * Var(y)], so b * d = r^2.

Key Points to Mention

  • Least squares slope formulas: b = Cov(x,y)/Var(x) and d = Cov(x,y)/Var(y).
  • Covariance and variance definitions: Cov(x,y) = E[(x-μx)(y-μy)], Var(x) = E[(x-μx)^2].
  • Pearson correlation coefficient: r = Cov(x,y) / (σx σy), so r^2 = [Cov(x,y)]^2 / (Var(x) Var(y)).
  • The product of slopes is always non-negative and ≤ 1, with equality when there is a perfect linear relationship.
  • This result is independent of the units of measurement, as the correlation is scale-invariant.
  • The derivation assumes that the variances are non-zero and that the relationships are linear.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Why are the two regression lines not inverses of each other? What does that tell you geometrically about what each regression is actually minimizing?

Technical Trade-offsData Modeling
Author's notes

This is the part I actually liked.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that the two regression lines (Y on X and X on Y) minimize different error terms: vertical vs. horizontal squared errors. Explain that because these minimizations are not symmetric, the lines are not inverses; geometrically, each line minimizes squared distances in a specific direction, leading to different slopes unless the correlation is perfect.

Pro tip: Emphasize that the product of the two slopes equals the squared correlation coefficient (r²), which is ≤ 1, so the lines coincide only when r = ±1. This shows you understand the mathematical relationship and its practical implications.

1. Define the two regression lines

State that the regression of Y on X minimizes the sum of squared vertical errors, while the regression of X on Y minimizes the sum of squared horizontal errors.

2. Explain why they are not inverses

Point out that minimizing vertical errors is not equivalent to minimizing horizontal errors, so the lines are not algebraic inverses. The slopes are b_yx = r * (s_y/s_x) and b_xy = r * (s_x/s_y), and their product is r², which is less than 1 unless |r|=1.

3. Describe the geometric interpretation

Explain that each line minimizes squared distances in a specific direction: vertical for Y on X, horizontal for X on Y. This directional minimization leads to different lines that intersect at the means of X and Y.

4. Connect to correlation and practical implications

Discuss how the discrepancy between the lines reflects the strength of the linear relationship: the weaker the correlation, the more the lines diverge. This matters in prediction and modeling, where the choice of regression depends on the error to minimize.

Key Points to Mention

  • Vertical vs. horizontal squared error minimization
  • Slopes: b_yx = r * (s_y/s_x) and b_xy = r * (s_x/s_y)
  • Product of slopes equals r², which is ≤ 1
  • Lines coincide only when r = ±1 (perfect correlation)
  • Geometric: each line minimizes distances in one direction, not orthogonal distances
  • Intersection at the means (x̄, ȳ)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.