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,
 
There is a nice little variation of the problem. The host says, after you have chosen the door, that you can change your guess, but to sweeten the deal, he says you can choose the two other doors, if you wish. This proposition is a no brainer, however before you are quick enough to accept it, the host opens one of the two doors and it is empty. In this version you really want to change your pick, but at the same time ask yourself is the host impartial and does that change anything. The host...

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
6
Views
2K
  • · 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