Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) Suppose you are given the following ( x , y ) data pairs. YesNo (d) Solve yo

ID: 3235803 • Letter: #

Question

(a) Suppose you are given the following (x, y) data pairs.

YesNo    


(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?

YesNo    


(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).

Switching x and y values sometimes produces the same least-squares equation and sometimes it is different.In general, switching x and y values produces the same least-squares equation.    In general, switching x and y values produces a different least-squares equation.

x 2 3 6 y 4 3 9

Explanation / Answer

(a) Suppose you are given the following (x, y) data pairs.

Find the least-squares equation for these data

Here n = 3

so lets say line equation is y = a +bx

and a and b = line constants.

so by formulas

a = [(y) (x2 ) - (x) (xy)]/ [ n (x2 ) - (x)2 ]

all the values are given above and putting all these values from the table, we get

a = (16 *49 - 11* 71)/ (3 *49- 112 )

= 3/26 = 0.1154

b = [ n(xy) - (x)((y)]/ [ n (x2 ) - (x)2 ]

= [ (3* 71- 11 * 16)]/ [(3 * 49 - 112 ) ]

= 37/26 = 1.423

so y = 0.115 + 1.423 x

(b) Here againwe can use the same table

Here n = 3

so lets say line equation is y = a +bx

and a and b = line constants.

so by formulas

a = [(y) (x2 ) - (x) (xy)]/ [ n (x2 ) - (x)2 ]

all the values are given above and putting all these values from the table, we get

a = (11 *106 - 16* 71)/ (3 *106- 162 )

= 30/62 = 0.483

b = [ n(xy) - (x)((y)]/ [ n (x2 ) - (x)2 ]

= [ (3* 71- 11 * 16)]/ [(3 *106- 162  ) ]

= 37/62 = 0.597

so y = 0.483 + 0.597 x

(c) Yes, we just excahnged the data for X and Y

(d) y = 0.115 + 1.423 x

x = ( y - 0.115)/ 1.423 = 0.7027 y - 0.0808

x= 0.7027 y - 0.0808

No, we dont get the he least-squares equation of part (b) with the symbols x and y exchanged.

(e) No, in general, we don;t get 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),

In general, switching x and y values produces a different least-squares equation. in rare cases it produces the same least square equation.

x 2 3 6 y 4 3 9