How can I solve this Least Squares Regression problem?

In summary: Gauss elimination usually starts with the first equation subtracting 2x the second equation from the third. Then, if that still doesn't give you a result, you can try 3x the second equation from the third. But before doing that, try to get the equations into a form that is easier to solve. In summary, the student is trying to solve a system of equations and is having trouble getting the equations into a form that is easier to solve.
  • #1
themadhatter1
140
0

Homework Statement



[PLAIN]http://img683.imageshack.us/img683/4744/leastsquares.jpg
[PLAIN]http://img149.imageshack.us/img149/4793/graphwd.jpg

Homework Equations





The Attempt at a Solution



So would these be the points?
(-41,51),(-22,62),(23,63),(44,24)

I'm not too sure how to evaluate the sigmas because it shows n as being the subscript up above in the directions but in the problem it shows i as being the subscript, and I don't understand how i can equal 1. When clearly the subscript is not always 1.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Your xi's are x1=-4, x2=-2, x3= 2, x4= 4 and your yi's are the corresponding y values. i goes from 1 to 4.
 
  • #3
So I would have...

nc+0b+40a=19
0c+40b+144a=-12
40c+144b+544a=160

Is this correct for the system of equations? What would n be?
 
Last edited:
  • #4
themadhatter1 said:
So I would have...

nc+0b+40a=19
0c+40b+144a=-12
40c+144a+544b=160

Is this correct for the system of equations? What would n be?

They look correct. n is the number of points.
 
  • #5
The system of equations I have created is wrong. I started to solve the system of equations

4c+0b+40a=19
0c+40b+144a=-12
40c+144b+544a=160

I used linear combinations to start to solve it and I got -9\52 for b. The equation for the regression is suppose to be
y=(-5/14)x2-(3/10)x+(41/6) and since the b I got doesn't match up with the b in the answer if I solved for a and c those values would also be wrong. I know I'm solving the system correctly because I checked my solution with a matrix on my calculator and my solution matches the one calculated using matrices.

What's wrong with my system of equations?
 
Last edited:
  • #6
I got the same result as you. Try to plug in the x values into the equation given as solution. You will see, they do not match to the given curve. Try the same with your parameters.

ehild
 
  • #7
Check your term for "sum-of-x-cubes" again. Since the ordinates x_i are equally disposed about zero, this term should be zero as well. I have not check any other values.
 
  • #8
TheoMcCloskey said:
Check your term for "sum-of-x-cubes" again. Since the ordinates x_i are equally disposed about zero, this term should be zero as well. I have not check any other values.

Oops... That is right.

ehild
 
  • #9
ohhh... ok, thanks. haha that was a stupid mistake.

4c+0b+40a=19
0c+40b+0a=-12
40c+0b+544a=160
 
  • #10
I'm stuck on another one of these problems. This time I have the system of equations and I know It's right, but I'm not sure how I can solve it.

4c+9b+29a=20
9c+29b+99a=70
29c+99b+353a=254

I know that the solution is a=1 b=-1 c=0 but I'm not sure how to solve the equation to get those variables.

I'm trying to get it into row echelon form. The only thing that I can do to eliminate a vairable is subtract the third equation from 11 times the first equation. That yields:

-11c+0b+63a=254
9c+29b+99a=70
29c+99b+353a=254

I don't see how I can eliminate any other variables.
 
  • #11
You should do Gauss elimination systematically, but before it, try to make the equations a bit more "friendly". At start, subtract 2 times the first equation from the second, and 3 times the second equation from the third.

ehild
 

1. What is Least Squares Regression?

Least Squares Regression is a statistical method used to find the best fit line for a set of data points. It calculates the line that minimizes the sum of the squared distances between the actual data points and the predicted values on the line.

2. How is Least Squares Regression different from other regression methods?

Unlike other regression methods, Least Squares Regression specifically minimizes the sum of the squared errors between the actual data points and the predicted values. This results in a line that is the "best fit" for the data in terms of minimizing overall error.

3. What are the assumptions of Least Squares Regression?

The assumptions of Least Squares Regression include linearity (the relationship between the variables can be represented by a straight line), independence (the error terms are not related to each other), and homoscedasticity (the variability of the data points around the line is constant).

4. How is the "best fit" line determined in Least Squares Regression?

The "best fit" line in Least Squares Regression is determined by minimizing the sum of the squared errors between the actual data points and the predicted values. This is accomplished by finding the values of the slope and intercept that result in the smallest sum of squared errors.

5. What are the applications of Least Squares Regression?

Least Squares Regression is commonly used in many areas of science and research, including economics, psychology, and engineering. It can be used to analyze relationships between variables, make predictions, and identify trends in data. It is also often used in data analysis and machine learning algorithms.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
468
  • Precalculus Mathematics Homework Help
Replies
21
Views
760
  • Precalculus Mathematics Homework Help
Replies
12
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
Back
Top