How do outliers affect an OLS fit compared to a model using Mean Absolute Error?

Quick Overview

Asks how outliers change an ordinary least squares fit compared with a linear model trained on mean absolute error. Tests understanding of squared versus absolute loss, each point's influence on the fit, the mean and median connection, and the limits of absolute loss with high-leverage points.

How do outliers affect an OLS fit compared to a model using Mean Absolute Error?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How do outliers affect an OLS fit compared to a model using Mean Absolute Error? Compare ordinary least squares with a linear model fit by minimizing the mean absolute error of its residuals, both trained on the same data that contains a few extreme points. ```hint Look at the derivative Differentiate each loss with respect to a single residual. How does one point's pull on the fitted line change as its residual keeps growing? ``` ### What a Strong Answer Covers - Why squaring the residuals lets one large error dominate the OLS objective and tilt the line. - How each point's influence on the fit grows with its residual under each loss. - The link between each loss and the conditional statistic it estimates. - Where the absolute-error fit still fails, such as points with extreme feature values. - Trade-offs in efficiency, solvers and inference, and a middle-ground loss. ### Follow-up Questions - With Gaussian errors and no outliers, how much efficiency do you give up by fitting with absolute error? - Does an absolute-error fit protect you from a point with an extreme feature value? Why or why not? - How would you choose the threshold in Huber loss? - You train with absolute error but report RMSE on the test set. What can go wrong with that mismatch?

Overview: Asks how outliers change an ordinary least squares fit compared with a linear model trained on mean absolute error. Tests understanding of squared versus absolute loss, each point's influence on the fit, the mean and median connection, and the limits of absolute loss with high-leverage points.

Nov 25, 2026
mediumData ScientistOtherMachine Learning
0
0

How do outliers affect an OLS fit compared to a model using Mean Absolute Error?

Compare ordinary least squares with a linear model fit by minimizing the mean absolute error of its residuals, both trained on the same data that contains a few extreme points.

What a Strong Answer Covers Guidance

  • Why squaring the residuals lets one large error dominate the OLS objective and tilt the line.
  • How each point's influence on the fit grows with its residual under each loss.
  • The link between each loss and the conditional statistic it estimates.
  • Where the absolute-error fit still fails, such as points with extreme feature values.
  • Trade-offs in efficiency, solvers and inference, and a middle-ground loss.

Follow-up Questions Guidance

  • With Gaussian errors and no outliers, how much efficiency do you give up by fitting with absolute error?
  • Does an absolute-error fit protect you from a point with an extreme feature value? Why or why not?
  • How would you choose the threshold in Huber loss?
  • You train with absolute error but report RMSE on the test set. What can go wrong with that mismatch?