Interview Q&A / Data Science

IntermediateQuick answer1 min readUpdated 3 Oct 2026

What are the assumptions of linear regression?

SHORT ANSWER

The main ones are a linear relationship, independent errors, constant error variance (homoscedasticity), roughly normal errors for inference, and no severe multicollinearity. Violations mainly hurt interpretation and confidence intervals rather than raw prediction.

Explain it simply

Linear regression works best when the data behaves in a particular way. A helpful acronym is LINE:

  • Linearity: y relates to x along a straight line (or you have transformed things so it does).
  • Independence: one row's error does not tell you another row's error. Time series data often breaks this.
  • Normality: errors are roughly bell-shaped. This matters for p-values and intervals, much less for the fitted line.
  • Equal variance: the spread of errors is the same across the range of predictions.

Add one for multiple regression: predictors should not be nearly copies of each other.

Example

Predicting house price from area. A residual plot (errors against predictions) shows a fan: small errors for cheap flats, huge ones for expensive flats. Equal variance is violated.

Typical fixes:

  • Take the log of price, which often evens out the fan.
  • Add a squared term if the plot curves.
  • Use robust standard errors.
python
import numpy as np
resid = np.array([-1, 1.5, -1, 1.5, -1])
print(round(resid.mean(), 2))  # 0.0

Residuals from least squares with an intercept average to zero over the full fitted data; check patterns, not the mean.

What to say in the interview

"I check linearity and equal variance with a residual plot, normality with a Q-Q plot of the residuals, independence from how the data was collected, and multicollinearity with VIF. Prediction survives many violations, but inference such as p-values and confidence intervals does not."

Common mistakes

  • Thinking the features or the target themselves must be normal. It is the errors that matter.

#linear-regression#assumptions#regression

Related questions

Practise more Data Science questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Data Science quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.