# Reg linear solution

Páginas: 6 (1489 palavras) Publicado: 6 de fevereiro de 2013
Multiple-Choice Test Linear Regression Regression COMPLETE SOLUTION SET

1. Given (x1 , y1 ), ( x2 , y 2 ),............, ( xn , y n ), best fitting data to y = f ( x ) by least squares requires minimization of (A) ∑ [ y i − f ( xi )]
i =1 n n

(B) (C)

∑y
i =1

i

− f ( xi )
2

∑ [yi − f (xi )]
i =1
n 2

n

(D) ∑ [ yi − y ] , y =
i =1

∑y
i =1

n

i

n

Solution The correct answer is (C).

Ameasure of goodness of fit, that is, how f (x ) predicts the response variable y is the magnitude of the residual Ei at each of the n data points. Ei = yi − f ( xi ), i = 1,2,....., n − 1, n Ideally, if all the residuals Ei are zero, one may have found an equation in which all the points lie on the model. Thus, minimization of the residual is an objective of obtaining regression coefficients. The mostpopular method to minimize the residual is the least squares method, where the estimates of the constants of the models are chosen such that the sum of the squared residuals is minimized, that is minimize ∑ E i .
2 n i =1

Thus, best fitting data to y = f ( x ) by least squares requires minimization of

∑ [y
i =1

n

i

− f (xi )]

2

2. The following data
x 1 20 30 40 y 1 400 800 1300 isregressed with least squares regression to y = a0 + a1 x . The value of a1 most nearly is A) 27.480 B) 28.956 C) 32.625 D) 40.000

Solution The correct answer is (C).
a1 = n∑ xi yi −∑ xi ∑ yi
i =1 i =1 i =1 n n n

⎛ ⎞ n ∑ x − ⎜ ∑ xi ⎟ i =1 ⎝ i =1 ⎠
n 2 i n n n n i =1 i =1 n i =1

2

a0 =

∑ xi2 ∑ yi − ∑ xi ∑ xi yi
⎛ ⎞ n∑ xi2 − ⎜ ∑ xi ⎟ i =1 ⎝ i =1 ⎠
n i =1 2

n

Since

n=4

∑x
i =1 4

4

i

yi = 1×1 +20 × 400 + 30 × 800 + 40 ×1300 = 84001 = 1 + 20 + 30 + 40 = 91 = 1 + 400 + 800 + 1300 = 2501 = 12 + 20 2 + 30 2 + 40 2 = 2901

∑x
i =1 4 i =1 4

i

∑y ∑x
i =1

i

2 i

then
a1 = = 4 × 84001 − 91× 2501 2 4 × 2901 − (91)

108413 3323 = 32.625

3. The following data
x 1 20 30 40 y 1 400 800 1300 is regressed with least squares regression to y = a1 x . The value of a1 most nearly is A) 27.480 B)28.956 C) 32.625 D) 40.000

Solution The correct answer is (B). Using the least squares criterion, we minimize

S r = ∑ Ei = ∑ ( y i − a1 xi )
2 i =1 i =1

n

n

2

To find a1 we minimize S r with respect to a1 .
n ∂S r = 2∑ ( yi − a1 xi )(− xi ) = 0 ∂a1 i =1

giving
− ∑ y i xi + ∑ a1 xi2 = 0
i =1 n i =1 n n

− ∑ y i xi + a1 ∑ xi2 = 0
i =1 i =1

n

Solving the above equation for a1 gives
a1 =

∑y x
i=1 n i

n

i

∑x
i =1

2 i

Since

n=4

∑x
i =1 4

4

i

yi = 1×1 + 20 × 400 + 30 × 800 + 40 ×1300 = 84001 = 12 + 20 2 + 30 2 + 40 2 = 2901

∑x
i =1

2 i

then
a1 = 84001 2901 = 28.956

4. An instructor gives the same y vs. x data as given below to four students and asks them to regress the data with least squares regression to y = a 0 + a1 x . x 1 10 20 30 40 y 1 100 400 600 1200 They each comeup with four different answers for the straight-line regression model. Only one is correct. The correct model is A) y = 60 x − 1200 B) y = 30 x − 200 C) y = −139 .43 + 29 .684 x D) y = 1 + 22 .782 x Solution The correct answer is (C). We know for the straight line regression model y = a 0 + a1 x the values of a0 and a1 are
a1 = n∑ xi yi −∑ xi ∑ yi
i =1 i =1 i =1 n n n

⎛ n ⎞ n ∑ x − ⎜ ∑ xi ⎟ i =1 ⎝i =1 ⎠
n 2 i n n n i =1 i =1 n i =1

2

a0 =

∑ xi2 ∑ yi − ∑ xi ∑ xi yi
⎛ ⎞ n∑ xi2 − ⎜ ∑ xi ⎟ i =1 ⎝ i =1 ⎠
n i =1 2

n

Since

n=5

∑x
i =1 5

5

i

yi = 1×1 + 10 ×100 + 20 × 400 + 30 × 600 + 40 ×1200 = 75001 = 1 + 10 + 20 + 30 + 40 = 101 = 1 + 100 + 400 + 600 + 1200 = 2301 = 12 + 10 2 + 20 2 + 30 2 + 40 2 = 3001

∑x
i =1 5 i =1 5

i

∑y ∑x
i =1

i

2 i

then

a1 = =

5 × 75001 − 101× 2301 2 5× 3001 − (101)

142604 4804 = 29.684 3001× 2301 − 101× 75001 a0 = 2 5 × 3001 − (101) − 669800 4804 = −139.43 Hence, the linear regression model is y = 29.684 x − 139.43 =

5. A torsion spring of a mousetrap is twisted through an angle of 180°. The torque vs. angle data is given below. Torsion, T (N-m) 0.110 0.189 0.230 0.250 0.10 0.50 1.1 1.5 Angle, θ (rad) The relationship between the torque...

Por favor, assinar para o acesso.