Question #333011

The following data show the age (week) and height (cm) of soybean 

plant. 

Age (week) 1 2 3 4 5 6 7

Height (cm) 5 13 16 23 33 38 40

Find the least square regression line of height on age. 


Expert's answer

Consider pairs of points (x,y)(x,y), where xx corresponds to the age and yy corresponds to the height. The least squares regression line is the line: y^=mx+b\hat{y}=m{x}+b that minimizes the following error: E(m,b)=i=1n(yiy^)2E(m,b)=\sum_{i=1}^n(y_i-\hat{y})^2. After substitution y^=mx+b\hat{y}=mx+b we receive: E(m,b)=i=1n(yi(mxi+b))2E(m,b)=\sum_{i=1}^n(y_i-(mx_i+b))^2. After taking the derivatives with respect to mm and bb we get: Em=2i=1nxi((mxi+b)yi)=2(mi=1nxi2+bi=1nxii=1nxiyi)E_m=2\sum_{i=1}^nx_i((mx_i+b)-y_i)=2(m\sum_{i=1}^nx_i^2+b\sum_{i=1}^nx_i-\sum_{i=1}^nx_iy_i) and Eb=2i=1n((mxi+b)yi)=2(mi=1nxi+nbi=1nyi)E_b=2\sum_{i=1}^n((mx_i+b)-y_i)=2(m\sum_{i=1}^nx_i+nb-\sum_{i=1}^ny_i). Denote α=i=1nxi2\alpha=\sum_{i=1}^nx_i^2, β=i=1nxiyi\beta=\sum_{i=1}^nx_iy_i, γ=i=1nxi\gamma=\sum_{i=1}^nx_i and δ=i=1nyi\delta=\sum_{i=1}^ny_i. Necessary conditions of extrema take the form: Em=0,Eb=0E_m=0,E_b=0. The latter is equivalent to: mα+bγβ=0,m\alpha+b\gamma-\beta=0, mγ+nbδ=0m\gamma+nb-\delta=0. From the first equation we get: m=βbγαm=\frac{\beta-b\gamma}{\alpha}. We substitute it in the second equation and get: βγαγ2αb+nbδ=0\frac{\beta\gamma}{\alpha}-\frac{\gamma^2}{\alpha}b+nb-\delta=0We receive: b=δαβγnαγ2b=\frac{\delta\alpha-\beta\gamma}{n\alpha-\gamma^2}, m=nβδγnαγ2m=\frac{n\beta-\delta\gamma}{n\alpha-\gamma^2}. Expressions for mm and bb 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=7n=7, take values from the tables and get: α=140\alpha=140, β=844\beta=844, δ=168\delta=168, γ=28\gamma=28. We receive: b=168140844287140(28)2=47b=\frac{168\cdot140-844\cdot28}{7\cdot 140-(28)^2}=-\frac47, m=7844168287140(28)2=437m=\frac{7\cdot844-168\cdot28}{7\cdot 140-(28)^2}=\frac{43}{7}.

Answer: the least square regression line has the form: y^=437x47\hat{y}=\frac{43}{7}x-\frac47. xx corresponds to the age and y^\hat{y} corresponds to the height.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS