The chart below shows values of x, y, x2, xy, & y2 for each given (x,y) and also shows the sum for each column.
----------------------------x--------------y--------------x2------------- xy--------------y2----------------
--------------------------(-2)-----------(-2)-------------4---------------4---------------4-----------------
--------------------------(-1)-----------(-1)-------------1---------------1---------------1-----------------
----------------------------0--------------0--------------0---------------0---------------0-----------------
----------------------------1--------------3--------------1---------------3---------------9-----------------
----------------------------2--------------3--------------4---------------6---------------9-----------------
COLUMN SUMS------0-------------3-------------10-------------14-------------23-----------------
LEAST SQUARES REGRESSION LINE OF Y ON X Find a & b for y = a + bx. Write the normal equations ∑y = an + b∑x & ∑xy = a∑x +b∑x2 and then supply values from the chart to obtain the simultaneous equations 3 = 5a + 0b & 14 = 0a + 10b. Solution gives a = 0.6 and b = 1.4. The equation
y = a + bx then becomes y = 1.4x + 0.6.
LEAST SQUARES REGRESSION LINE OF X ON Y Find c & d for x = c + dy. Write the normal equations
∑x = cn + d∑y & ∑xy = c∑y +d∑y2. Values from the chart will give 0 = 5c + 3d & 14 = 3c + 23d. Simultaneous solution will yield x = c + dy as x = (35/53)y + (-21/53).