In: Statistics and Probability
(a) Suppose you are given the following (x, y) data pairs. x 1 2 5 y 4 3 6 Find the least-squares equation for these data (rounded to three digits after the decimal). ŷ = + x (b) Now suppose you are given these (x, y) data pairs. x 4 3 6 y 1 2 5 Find the least-squares equation for these data (rounded to three digits after the decimal). ŷ = + x (c) In the data for parts (a) and (b), did we simply exchange the x and y values of each data pair? Yes No Correct: Your answer is correct. (d) Solve your answer from part (a) for x (rounded to three digits after the decimal). x = + y Do you get the least-squares equation of part (b) with the symbols x and y exchanged? Yes No Correct: Your answer is correct. (e) In general, suppose we have the least-squares equation y = a + bx for a set of data pairs (x, y). If we solve this equation for x, will we necessarily get the least-squares equation for the set of data pairs (y, x), (with x and y exchanged)? Explain using parts (a) through (d). In general, switching x and y values produces a different least-squares equation. In general, switching x and y values produces the same least-squares equation. Switching x and y values sometimes produces the same least-squares equation and sometimes it is different. Correct: Your answer is correct.
a.
Line of Regression Y on X i.e Y = bo + b1 X | ||||
X | Y | (Xi - Mean)^2 | (Yi - Mean)^2 | (Xi-Mean)*(Yi-Mean) |
1 | 4 | 2.778 | 0.111 | 0.556 |
2 | 3 | 0.444 | 1.778 | 0.889 |
5 | 6 | 5.444 | 2.778 | 3.889 |
calculation procedure for regression
mean of X = sum ( X / n ) = 2.6667
mean of Y = sum ( Y / n ) = 4.3333
sum ( (Xi - Mean)^2 ) = 8.666
sum ( (Yi - Mean)^2 ) = 4.67
sum ( (Xi-Mean)*(Yi-Mean) ) = 5.334
b1 = sum ( (Xi-Mean)*(Yi-Mean) ) / sum ( (Xi - Mean)^2 )
= 5.334 / 8.666
= 0.616
bo = sum ( Y / n ) - b1 * sum ( X / n )
bo = 4.3333 - 0.616*2.6667 = 2.692
value of regression equation is, Y = bo + b1 X
Y'=2.692+0.616* X
b.
Line of Regression Y on X i.e Y = bo + b1 X | ||||
X | Y | (Xi - Mean)^2 | (Yi - Mean)^2 | (Xi-Mean)*(Yi-Mean) |
4 | 1 | 0.111 | 2.778 | 0.556 |
3 | 2 | 1.778 | 0.444 | 0.889 |
6 | 5 | 2.778 | 5.444 | 3.889 |
calculation procedure for regression
mean of X = sum ( X / n ) = 4.3333
mean of Y = sum ( Y / n ) = 2.6667
sum ( (Xi - Mean)^2 ) = 4.667
sum ( (Yi - Mean)^2 ) = 8.67
sum ( (Xi-Mean)*(Yi-Mean) ) = 5.334
b1 = sum ( (Xi-Mean)*(Yi-Mean) ) / sum ( (Xi - Mean)^2 )
= 5.334 / 4.667
= 1.143
bo = sum ( Y / n ) - b1 * sum ( X / n )
bo = 2.6667 - 1.143*4.3333 = -2.286
value of regression equation is, Y = bo + b1 X
Y'=-2.286+1.143* X
c.
yes,
we simply exchange the x and y values of each data pair But we get least square method equation is not get same equation from (a).
d.
yes,
we simply exchange the x and y values of each data pair But we get least square method equation is not get same equation from (b).
e.
from (a),
value of regression equation is, Y = bo + b1 X
Y'=2.692+0.616* X
from (b),
value of regression equation is, Y = bo + b1 X
Y'=-2.286+1.143* X
conclusion:
if we exchange values of X and Y then we get regression equation but not same as before we get that equation.