MHB Least squares regression line (I'm very lost)

Click For Summary
The discussion revolves around calculating the least squares regression line to estimate the value of x when y equals 15, given specific covariance and variance values. The least squares method aims to minimize the total squared error between observed and predicted values, represented by the equation y = ax + b. Participants explain how to derive the total squared error from the provided data points and emphasize the importance of minimizing this error through partial derivatives. The conversation highlights the mathematical process involved in finding the optimal values for a and b. Understanding these concepts is crucial for successfully applying the least squares regression method.
Melody55
Messages
1
Reaction score
0
Hi! Basically this is the exercise:

Given the covariance of x and y is -12 and the variance of x is 6,5, using the least squares line of best fit connecting x and y yo estimate the value of x when y=15

x25979107
y251711108713
any help would mean everything, I'm desperate :(
 
Physics news on Phys.org
Do you know what "least squares best fit" means?
It is the line y= ax+ b that "best fits" in very specific way. When x= 2, that equation gives y= 2a+ b while the correct value is 25. The "error", if any, is 2a+ b- 25. If we want to find a "total error" by adding those, some might be negative and cancel positive errors giving too small a total error. We could fix that by taking the absolute value but the absolute value function is not differentiable at 0. So instead we fix the sign problem by squaring. The "square error" at x= 2 is $(2a+ b- 25)^2$.

Using all of the given data,

$(2a+ b- 25)^2$

$(5a+ b- 17)^2$

$(9a+ b- 11)^2$

$(7a+ b- 10)^2$

$(9a+ b- 8)^2$

$(10a+ b- 7)^2$

$(7a+ b- 13)^2$
The total square error is

$(2a+ b- 25)^2+(5a+ b- 17)^2+ (9a+ b- 11)^2+ (7a+ b- 10)^2+ (9a+ b- 8)^2+ (10a+ b- 7)^2+ (7a+ b- 13)^2$.
That's a function of the two variables, a and b. Find the minimum by taking the partial derivatives with respect to a and b and setting them equal to 0,
 
First trick I learned this one a long time ago and have used it to entertain and amuse young kids. Ask your friend to write down a three-digit number without showing it to you. Then ask him or her to rearrange the digits to form a new three-digit number. After that, write whichever is the larger number above the other number, and then subtract the smaller from the larger, making sure that you don't see any of the numbers. Then ask the young "victim" to tell you any two of the digits of the...

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
24
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
10
Views
2K
  • · Replies 68 ·
3
Replies
68
Views
11K