Linear Regression
Linear regression predicts a continuous target as a weighted sum of features, fit by ordinary least squares (OLS).
Definition
where minimizes , the residual sum of squares (RSS).
Closed-form solution: (when is invertible).
Intuition
Each coefficient tells you the expected change in for a one-unit increase in , holding all else constant.
OLS is the best linear unbiased estimator (BLUE) under Gauss-Markov assumptions: linearity, exogeneity, homoscedasticity, no perfect multicollinearity.
Worked example
Predicting weight from height: , so each extra cm adds about 0.9 kg.
If , then feature has a positive association with after controlling for other features.
The math
Assumptions: , with , , and for inference.
Hypothesis test on : (feature has no effect); p-value from -statistic .
In practice
Baseline regression model; interpretable coefficients make it the go-to for explanatory modeling.
Check residual plots for non-linearity, heteroscedasticity, and outliers — violations indicate model misspecification.
Go deeper
More in Data science
Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.