Lesson 3.1 · 6 min read · about 45 min to master at a very slow pace
Regression Fundamentals
Regression predicts a number from inputs. The model, the noise term, what "fitting" means, and how predictions are made, using house prices as a running example.
The question regression answers
Regression predicts a quantitative response (a number) from one or more predictors . How much will this house sell for? What will CO concentration be at noon? How many patients will arrive next week?
Signal plus noise
Regression models assume the response is a systematic part plus random noise:
is the signal: the part of that depends on the predictors. is noise: everything else (unmeasured factors, measurement error, pure chance), assumed to average out to zero. Two houses with identical area and bedrooms still sell for different prices; that difference is .
Linear regression assumes is linear: .
Fitting and predicting
- Fitting means estimating the unknown coefficients from training data, giving (lesson 3.3).
- Fitted values are the model's predictions for the training points.
- Predicting a new case means plugging its predictor values into the fitted equation: .
- Residuals are the observed minus fitted values: how far each training point sits from the line.
Why start with linear regression?
It is the simplest useful ML model: fast, interpretable, with a closed-form solution and a full toolkit for uncertainty (standard errors, p-values, confidence intervals). Many ideas in the rest of the course (loss, overfitting, regularisation) are clearest here first.
Cheatsheet
Signal + noise
Residual
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.