Constraining the intercept to zero
For observations , and , find the least-squares slope when the fitted line is constrained to pass through the origin.
Worked answer
. The products sum to and the squares sum to .
For observations (0,1), (1,1) and (2,4), find the least-squares slope when the fitted line is constrained to pass through the origin.
9/5=1.8. The products xiyi sum to 9 and the squares xi2 sum to 5.