Consider pairs of points (x,y), where x corresponds to the age and y corresponds to the height. The least squares regression line is the line: y^=mx+b that minimizes the following error: E(m,b)=∑i=1n(yi−y^)2. After substitution y^=mx+b we receive: E(m,b)=∑i=1n(yi−(mxi+b))2. After taking the derivatives with respect to m and b we get: Em=2∑i=1nxi((mxi+b)−yi)=2(m∑i=1nxi2+b∑i=1nxi−∑i=1nxiyi) and Eb=2∑i=1n((mxi+b)−yi)=2(m∑i=1nxi+nb−∑i=1nyi). Denote α=∑i=1nxi2, β=∑i=1nxiyi, γ=∑i=1nxi and δ=∑i=1nyi. Necessary conditions of extrema take the form: Em=0,Eb=0. The latter is equivalent to: mα+bγ−β=0, mγ+nb−δ=0. From the first equation we get: m=αβ−bγ. We substitute it in the second equation and get: αβγ−αγ2b+nb−δ=0We receive: b=nα−γ2δα−βγ, m=nα−γ2nβ−δγ. Expressions for m and b as well as verifications of sufficient conditions of extrema can be also found in the respective literature about the least square regression line. Set n=7, take values from the tables and get: α=140, β=844, δ=168, γ=28. We receive: b=7⋅140−(28)2168⋅140−844⋅28=−74, m=7⋅140−(28)27⋅844−168⋅28=743.
Answer: the least square regression line has the form: y^=743x−74. x corresponds to the age and y^ corresponds to the height.
Comments