CrackML by @ml.with.umang
Interview questions / ML Math
ML Math interview question

How would you formulate and interpret R-squared for a regression system?

How would you formulate and interpret R-squared for a regression system? Structure your response as you would in a top-tier ML/AI engineering interview.

mediumconceptEvidence 77/1001 source reportAmazon

The 60-second answer

Write the objective/probability expression and define every term before manipulating it. Derive the result step by step and state assumptions such as invertibility, independence, differentiability, or distributional form.

Build the answer in this order

1
Start with intuition

Write the objective/probability expression and define every term before manipulating it.

2
Write the mathematical object

Derive the result step by step and state assumptions such as invertibility, independence, differentiability, or distributional form.

3
State assumptions

Interpret the result geometrically or statistically so the algebra connects back to modeling.

4
Connect back to ML behavior

Mention numerical-stability or finite-sample caveats that matter in implementation.

A useful interview mental model

This is the shape of a strong answer—not a script to memorize.

01Definition
02Mechanism
03Trade-offs
04Failure modes
05When to use

Senior-level signal

  • Distinguish an algebraically valid expression from a numerically stable computation.
  • Explain what changes when the key assumptions are violated.

What the interviewer is really testing

Whether you can connect the math to optimization, uncertainty, model behavior, and a practical engineering decision.

Likely follow-up questions

What assumption makes this approach work?
When would you choose the strongest alternative instead?
What production or data failure mode changes your answer?

Common weak-answer patterns

  • Reciting a definition without mechanism or assumptions.
  • Claiming one technique is always better without a data regime.
  • Stopping before failure modes, validation, or deployment implications.