Calculating Uncertainty in Gradient & Intercept of Line of Best Fit

  • Thread starter Thread starter Identity
  • Start date Start date
  • Tags Tags
    Graph Uncertainty
Click For Summary
To calculate the uncertainty in the gradient and intercept of a line of best fit with several data points, regression analysis is essential, even for a simple two-point case. The equation for the line incorporates uncertainties in the y-values, leading to separate uncertainty components for both the gradient and intercept. For two data points, the best fit line is indeed the line connecting those points, and the gradient can be derived directly from their coordinates. The discussion also references the general least squares fitting algorithm for more complex datasets. Understanding these principles is crucial for accurate data analysis in statistical modeling.
Identity
Messages
151
Reaction score
0
If you have several data points, each with a small uncertainty in the y-direction, and you want to find the uncertainty in the gradient and the uncertainty in the intercepts of the line of best fit, how would you go about doing that?


*I know with many points you would have to do something with regression, but could the simple, 2-data point case also be explained?

Here's what I'm thinking so far for the 2-data point case, can someone please tell me if I'm right:

Equation of the line, including uncertainties:

y -(y_0 \pm U(y_0)) = \frac{y_1 \pm U(y_1) - (y_0 \pm U(y_0))}{x_1 - x_0}(x - x_0)

So you would eventually get two separate "uncertainty" bits, one in the gradient and the other in the constant term.

y = (m \pm U(m))x + C \pm U(C)

Now do you just let 'y' or 'x' equal 0 and solve?


Thanks so much
 
Last edited:
Physics news on Phys.org
Wouldn't the best fit line for just two data points points, regardless of the uncertainties in the two points' y values, be a line through the two points themselves since their y values would necessarily be centered in the y error range? Therefore, wouldn't the gradient just be the slope of the line through the two points?
 
I do not have a good working knowledge of physics yet. I tried to piece this together but after researching this, I couldn’t figure out the correct laws of physics to combine to develop a formula to answer this question. Ex. 1 - A moving object impacts a static object at a constant velocity. Ex. 2 - A moving object impacts a static object at the same velocity but is accelerating at the moment of impact. Assuming the mass of the objects is the same and the velocity at the moment of impact...

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 0 ·
Replies
0
Views
416
  • · Replies 7 ·
Replies
7
Views
25K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
10
Views
7K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
5K