Deriving The Quad. Eq. Using least squares.

In summary, the conversation is about deriving the quadratic equation from the least squares method. The method used is called "completing the square" and it is not the same as the least squares method, which is a method of fitting a best line or equation to data. The conversation then focuses on deriving the parameters of a least squares fit to a quadratic function and the speaker asks for help in defining expressions for the three coefficients in terms of sums Sx, Sy, Sxx, etc. Redbelly98 provides guidance on how to solve the system of equations and clarifies the definitions of Sx, Sxx, and Sxy.
  • #1
juice34
Could someone show me exactly how to derive the quadratic equation from the least squares method? I have no idea where to start. I will appreciate it very much. Thankyou.
 
Physics news on Phys.org
  • #2
The method is called "completing the square" (not least squares). Google it!
 
  • #3
Really, my professor said that its the least squares method. Is it the same thing i assume then. I appreciate it very much doc.
 
  • #4
No, they are different. "Least squares" is a method of fitting a best line or other equation to data.

Are you looking for a quadratic equation that fits some data, or are you trying to solve for x in

a x2 + b x + c = 0
 
  • #5
Im tryin to derive the least squares method for a quadratic equation. I also want to find expressions for the three coefficients in terms of sums Sx, Sy, Sxx, etc.
 
  • #6
Okay, so you are fitting a quadratic equation to some data.

You must make some attempt at a solution before we can help you (PF rules). You might look at how fitting a linear equation using least squares works, and go from there.
 
  • #7
Here is what i have Y=ax^2+bx+c. Then the residual is d(i)=y(xi) so di=yi-(ax^2i+bxi+c). Then i take the sum of the square of the residuals. &(a,b,c)=E di^2=E((ax^2i+bxi+c))^2 and then I am lost after that!
 
  • #8
So far so good.

Next step is to take partial derivatives of & with respect to a, b, and c.
 
  • #9
juice34 said:
Really, my professor said that its the least squares method. Is it the same thing i assume then. I appreciate it very much doc.
Oops. I thought you were looking for a derivation of the quadratic formula itself (which happens to be done via "completing the square"). But you are looking to derive the parameters of a least squares fit to a quadratic function. My bad!

Redbelly98's got you covered. (I'll move this back to Calc & Beyond.)
 
  • #10
juice34 said:
Here is what i have Y=ax^2+bx+c. Then the residual is d(i)=y(xi) so di=yi-(ax^2i+bxi+c). Then i take the sum of the square of the residuals. &(a,b,c)=E di^2=E((ax^2i+bxi+c))^2 and then I am lost after that!

Wait, I just spotted an error here. Might be just a typo on your part, but since

di = yi-(axi^2+bxi+c)

then

di^2 = ( yi - (axi^2+bxi+c))^2

not ((axi^2+bxi+c))^2
 
  • #11
Yes you are correct Redbelly98. Ok so i differentiated with respect to a, b, and c then rearranged to get 3 equations.
1.aEx^4+bEx^3+cEx^2=Eyx^2
2.aEx^3+bEx^2+cEx=Exy
3.aEx^2+bEx+cn=Ey Where E is a summation. Now my problem is how do i define these into expressions for the three coefficients in terms of sums Sx, Sy, Sxx, etc. And how do i know how many of these S terms i will need and how do i define them. Defining them being where do i get the x,y, xx, xy, yy, etc from? Thank you all for who contributed.
 
  • #12
You have 3 equations in the 3 unknowns (a, b, and c are the unknowns), so use standard techniques for solving linear systems of equations.

Sx is Ex, Sxx is Ex^2, and Sxy is Exy, aren't they?
 
  • #13
Redbelly 98, Thank you for your help your amazing!
 

Related to Deriving The Quad. Eq. Using least squares.

1. What is the purpose of deriving the quadratic equation using least squares?

The purpose of deriving the quadratic equation using least squares is to find the best fitting quadratic curve for a set of data points. This technique is commonly used in statistics and data analysis to determine the relationship between two variables.

2. How does the least squares method work for deriving the quadratic equation?

The least squares method works by minimizing the sum of the squared differences between the actual data points and the predicted values on the quadratic curve. This is achieved by finding the values for the coefficients of the quadratic equation that result in the smallest sum of squared errors.

3. What are the advantages of using least squares to derive the quadratic equation?

One advantage of using least squares is that it is a relatively simple and straightforward method for finding the best fitting quadratic curve. It also allows for a quantitative measure of how well the curve fits the data, as the sum of squared errors can be calculated. Additionally, least squares can be used with any number of data points, making it applicable to a wide range of data sets.

4. Are there any limitations to using least squares for deriving the quadratic equation?

One limitation of using least squares is that it assumes that the relationship between the variables is linear. This means that it may not be suitable for data sets with non-linear relationships. Additionally, the least squares method can be sensitive to outliers in the data, which can skew the results of the analysis.

5. How can the results of deriving the quadratic equation using least squares be interpreted?

The results of deriving the quadratic equation using least squares can be interpreted as the best fitting curve for the given data set. The coefficients of the quadratic equation can also provide information about the direction and strength of the relationship between the variables. Additionally, the sum of squared errors can be used as a measure of the accuracy of the curve in representing the data.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
736
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Replies
19
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
320
  • Programming and Computer Science
Replies
4
Views
860
Back
Top