Least squares regression line (I'm very lost)

Click For Summary
SUMMARY

The discussion focuses on calculating the least squares regression line for a dataset with given covariance and variance values. The covariance of x and y is -12, and the variance of x is 6.5. The least squares line is represented by the equation y = ax + b, where the total square error is minimized by taking the sum of squared differences between predicted and actual y values. To find the optimal values of a and b, one must compute the partial derivatives of the total square error function and set them to zero.

PREREQUISITES
  • Understanding of least squares regression methodology
  • Knowledge of covariance and variance concepts
  • Familiarity with calculus, specifically partial derivatives
  • Ability to manipulate algebraic expressions and equations
NEXT STEPS
  • Learn how to derive the least squares regression coefficients using matrix algebra
  • Explore the implications of covariance and variance in statistical analysis
  • Study the application of partial derivatives in optimization problems
  • Investigate the use of statistical software tools like R or Python for regression analysis
USEFUL FOR

Students, data analysts, and statisticians who are learning about regression analysis and optimization techniques in statistics.

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,
 

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