What is the intuition behind Ordinary Least Squares (OLS)?

Updated May 16, 2026

Short answer

OLS finds coefficients that minimize squared vertical distances between predictions and actual values.

Deep explanation

OLS minimizes the sum of squared residuals by projecting y onto the column space of X. The solution is the orthogonal projection that minimizes Euclidean distance in feature space.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Linear Regression interview questions

View all →