227k views
2 votes
find the least squares straight line y = mx b to fit the data points: (1, 9),(2, 7),(3, 3),(4, 2). compute the minimum square error.

User Aladdin
by
8.2k points

1 Answer

5 votes
Answer: 67.315

We start by using the formula for the slope of the least squares regression line:

m = (nΣ(xy) - ΣxΣy) / (nΣ(x^2) - (Σx)^2)

where n is the number of data points, and Σ denotes the sum of the indicated quantities.

Substituting the given values, we get:

m = (4(1x9 + 2x7 + 3x3 + 4x2) - (1+2+3+4)(9+7+3+2)) / (4(1^2 + 2^2 + 3^2 + 4^2) - (1+2+3+4)^2)
= (-39) / 20
= -1.95

Next, we use the formula for the y-intercept:

b = (Σy - mΣx) / n

Substituting again, we get:

b = (9+7+3+2 - (-1.95)(1+2+3+4)) / 4
= 6.425

So the equation of the least squares regression line is:

y = -1.95x + 6.425

To compute the minimum square error, we use the formula:

SSE = Σ(y - yhat)^2

where SSE stands for sum of squared errors, y is the actual y-value of each data point, and yhat is the predicted y-value on the regression line.

Substituting the given values, we get:

SSE = (9 - (-1.95)(1) + 6.425)^2 + (7 - (-1.95)(2) + 6.425)^2 + (3 - (-1.95)(3) + 6.425)^2 + (2 - (-1.95)(4) + 6.425)^2
= 67.315

Therefore, the minimum square error is approximately 67.315.
User Houshalter
by
8.3k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories