Least-Squares Fit: Find Value of B for (-1,2), (0,1), (3,-4)

  • Thread starter JT73
  • Start date
  • Tags
    Fit
In summary: But .691 is very close. In summary, the task is to find the value of b that minimizes the error E when fitting a straight line to the given data points, with a slope of -20/13. After taking the derivative of the function with respect to B and doing three iterations using the data points, the value of b is found to be approximately .691.
  • #1
JT73
49
0
Given the data points (-1,2) (0,1) and (3,-4), you want to fit the best straight line, y=mx + b, through these points. given that m = -20/13, find the value of b that minimizes the error E = Ʃ ("N" on top, "i=1" on bottom) (MXi + B - Yi)^2.

This was on a test I just took for calc 1. I did the work there, I am not going to put it all on here via computer. Basically I took the derivative of the function with respect to B. Then did three iterations of it using the data points. Then solved for B. I got b = .691. Can anyone confirm/refute this?


Thanks
 
Physics news on Phys.org
  • #2
You're asking a lot for helpers to work the whole problem for you and compare what they get to your answer. Forum requirements are that you show what you've done.
 
Last edited:
  • #3
JT73 said:
Given the data points (-1,2) (0,1) and (3,-4), you want to fit the best straight line, y=mx + b, through these points. given that m = -20/13, find the value of b that minimizes the error E = Ʃ ("N" on top, "i=1" on bottom) (MXi + B - Yi)^2.

This was on a test I just took for calc 1. I did the work there, I am not going to put it all on here via computer. Basically I took the derivative of the function with respect to B. Then did three iterations of it using the data points. Then solved for B. I got b = .691. Can anyone confirm/refute this?Thanks

Yes, it's pretty close. If you work a little harder you can get an exact fractional answer for B like the -20/13 for the slope.
 
Last edited:

FAQ: Least-Squares Fit: Find Value of B for (-1,2), (0,1), (3,-4)

1. What is the purpose of "Least-Squares Fit"?

The purpose of Least-Squares Fit is to find the best fitting line or curve for a set of data points. It minimizes the sum of squared errors between the actual data points and the predicted values from the fitted line or curve.

2. How is the value of B determined in Least-Squares Fit?

The value of B is determined by using the formula B = sum((x-x̄)(y-ȳ))/sum((x-x̄)^2), where x and y are the coordinates of the data points, x̄ is the mean of the x values, and ȳ is the mean of the y values.

3. What do the data points (-1,2), (0,1), and (3,-4) represent in Least-Squares Fit?

The data points represent the known values of x and y in the equation y = mx + b, where m is the slope and b is the y-intercept. These points are used to calculate the value of B, which is the y-intercept in the best fitting line for the data set.

4. How accurate is the value of B in Least-Squares Fit?

The value of B in Least-Squares Fit is chosen to minimize the sum of squared errors, so it is the most accurate estimate for the y-intercept in the best fitting line or curve. However, it is still an estimate and may not perfectly fit all the data points.

5. Can Least-Squares Fit be used for data sets with more than two variables?

Yes, Least-Squares Fit can be used for data sets with multiple variables. The formula for calculating the value of B becomes more complex, but the principle of minimizing the sum of squared errors remains the same.

Similar threads

Back
Top