Recall what the least-squares line minimises
RSS=i=1∑n(yi−a−bxi)2 The vertical distances are squared, so points above and below the line both count against it.
Recall the regression line of x on y
x=a′+b′y,b′=SyySxy,a′=xˉ−b′yˉ This line minimises the squared HORIZONTAL distances, so it is the one to use when x is the response.
Decide which variable is the response here
y is known,x is to be estimated The quantity being estimated is the one whose deviations should be squared.
Choose the line that minimises the deviations in x
minimise ∑(xi−a′−b′yi)2 ⇒ x on y That is the regression line of x on y.
Write down the line of x on y
x=−7.9+0.43y Its gradient is b′=SyySxy, not b1.
Substitute y=28
x^=−7.9+0.43×28=4.14 This is the required estimate.
See what rearranging the wrong line would have given
x=2.1528−19.25≈4.07 A genuinely different answer, because the two lines are different lines.
Explain why the two disagree
bb′=r2=0.9245<1 The two lines coincide only when r2=1; the weaker the correlation, the wider they open out.
Confirm both lines meet at the mean point
(xˉ,yˉ)=(5, 30) They cross there and nowhere else.
Recall the least-squares summary statistics
Sxx=∑x2−n(∑x)2,Sxy=∑xy−n(∑x)(∑y) Everything in linear regression is built from these two sums of squares.
Recall the least-squares gradient
b=SxxSxy Setting the partial derivatives of the residual sum of squares to zero gives this value of b.
Recall the least-squares intercept
a=yˉ−bxˉ The fitted line always passes through the mean point (xˉ,yˉ).
Recall what the least-squares line minimises
RSS=i=1∑n(yi−a−bxi)2 The vertical distances are squared, so points above and below the line both count against it.
Recall the definition of a residual
ei=yi−y^i=yi−(a+bxi) A residual is the signed vertical distance from a data point to the fitted line.
Recall the computational form of the residual sum of squares
RSS=Syy−SxxSxy2 Substituting the least-squares a and b into ∑(yi−a−bxi)2 collapses it to this.
State the line and the estimate
x on y:x^=4.14 Rearranging the line of y on x is the classic error and gives 4.07 instead.