Error in Y-intercept, Least-square+Excel=True?

  • Thread starter Thread starter PhysJs
  • Start date Start date
  • Tags Tags
    Error
AI Thread Summary
The discussion centers on the perceived inadequacy of the error estimates for the y-intercept and gradient obtained from the Excel LINEST function when fitting a linear equation to data points. Users express confusion over why the calculated errors do not seem to reflect the known errors in the data points, particularly in the y-direction. It is noted that Excel's method assumes x-values are exact and computes regression based solely on y-values, which may lead to misleading error estimates. Suggestions include using alternative methods to incorporate error bars or simulating additional data points to better represent uncertainty. The conversation highlights a gap in Excel's handling of data point errors in linear regression analysis.
PhysJs
Messages
6
Reaction score
1

Homework Statement


What is the error of the y-intercept and gradient of a fitted line? The line is fitted to some number of data points each with a known error in the x and y values.

More specifically, I have fitted a linear equation to some data points using Microsoft Excel LINEST, and the error given does not seem satisfactory.


Homework Equations


As far as I know Excel uses the method of least squares.
The specific procedure used in Excel is:
1) Select 4 cells
2) Use =LINEST([],[],1,1)
3)Press shift+ctrl+enter, 4 values pop out, 1 for y-intercept, 1 for x -intercept, and a cell for an error of each the y-intercept and x-intercept


The Attempt at a Solution


I have fitted a linear equation to some data points using Microsoft Excel LINEST function according to specified procedure. Only the values of x,y have to be given, Exccel doesn't seem to need to know the error in the data points.

Excel gives an 'error', but it seems to me that the given error does not depend on the errors of the data points, which seems counter intuitive. Surely if the errors on my data points were greater, the error in my gradient could be more. Thinking in pictures, if my data points had wider error bars in the y-direction, the linear line would be able to angle up and down with freedom, showing potential value the gradient can take.

This is confusing, not sure if I can trust Excel entirely. Is it somekind of mathematical reasoning that eliminates the dependence of the calculated gradient and y-intercept from the errors in the data points?
 
Physics news on Phys.org
You mention uncertainty in the x values. Most stats methods assume the x values are exact, so compute regression of y wrt x.
From the residual error in the y values, the package can estimate an error in the slope and y-intercept. (Are you sure it's giving you an x-intercept error, and not a slope error?)
I don't know whether there's a fancier function that will allow you to specify error bars for the data. You could fudge it by turning each data point into several scattered around the actual datapoint. You would scatter the extra datapoints according to the known error range for the data.
 
Ok, it appears I given an incorrect description:
The package returns an error in slope and y-intercept in addition to the values of the slope and y-intercept. It does not give an x-intercept. Will edit the original post.

All resources I found so far, just seem to take the error of the slope given by the package regardless of the errors in the y-values.
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top