← Citadel Interview Insights

Citadel·Data Scientist·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jun 2026

Summary

Citadel data scientist interview, technical screen with a stats/optimization question. Pretty math-heavy and they wanted a full derivation, not just the answer.

Questions Asked (1)

Q1

You have a set of observed values and you want to predict a single constant for all of them. If you minimize the sum of absolute errors, what constant should you pick? Derive it and discuss whether the answer is always unique.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I knew the answer was the median but fumbled the actual derivation under pressure.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize that minimizing the sum of absolute errors leads to the median of the observed values. Derive this by considering the subgradient of the objective function and showing that any median minimizes it. Discuss uniqueness by analyzing cases where the number of observations is odd or even, and whether the median is unique.

Pro tip: Emphasize that the median is robust to outliers, which is often why it's preferred over the mean in certain applications. Also, mention that for even-sized samples, any value between the two middle observations is a minimizer, so the solution is not unique.

1. Define the objective

Let the observed values be x1, x2, ..., xn. We want to find a constant c that minimizes f(c) = Σ |xi - c|.

2. Derive the minimizer

Compute the subgradient of f(c): it is the sum of signs of (xi - c). Set it to zero to find critical points. Show that any median of the data satisfies this condition.

3. Analyze uniqueness

If n is odd, the median is unique. If n is even, any value between the two middle observations minimizes the sum, so the solution is not unique.

4. Discuss implications

Mention that the median is a robust estimator, less sensitive to outliers than the mean, and that non-uniqueness in the even case means any median is acceptable.

Key Points to Mention

  • The sum of absolute errors is minimized by the median.
  • Derivation using subgradient: the derivative is the sum of signs, which is zero when c is a median.
  • Uniqueness depends on sample size: odd n gives a unique median, even n gives an interval of medians.
  • The median is robust to outliers, unlike the mean which minimizes squared errors.
  • For even n, any value between the two middle values is a minimizer, so the answer is not always unique.
  • This is a classic example of L1 regression (least absolute deviations).

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