For the four data points , set up and solve the normal equations for the line . What are the residual sum of squares and the unbiased noise-variance estimate ?
Supervised learning, Linear regression
Level L2 Elementary. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can carry the normal equations through with numbers and use .
Key idea
Solve with having a column of ones. The unbiased variance estimate divides by (here ), not by .
Steps
- Build with rows . Then (sums of , , ) and (sums of and ).
- The determinant is , so .
- So the line is . Fitted values at are .
- Residuals are , which sum to 0 (as they must with an intercept).
- .
- . We divide by because two degrees of freedom were used up fitting and .
Common mistakes
- Dividing RSS by and calling it unbiased.
- Dropping the cross term or using wrongly. Verify with the slope formula .
- Forgetting that residuals must sum to zero. A non-zero sum signals an arithmetic slip.
How long your answer should be
Half a page, 4–5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: Four observations are . What is the estimated density at using (a) a box kernel of width , that is for with , and (b) a Gaussian kernel with ?
Next in Supervised learning: Run the perceptron algorithm with learning rate 1, starting from and , on the points with label , with , with and with , in this order. A point counts as a mistake if . What are the weights after each update, and when does it stop?