Linear fitting in physics experiments with errors

Click For Summary

Discussion Overview

The discussion revolves around the topic of linear fitting in experimental physics, particularly focusing on how to account for errors in the data points when applying the method of least squares. Participants explore the implications of having errors associated with both x and y measurements and seek formulas for the linear fit parameters and their uncertainties in this context.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about the formulas for the linear fit parameters a and b, along with their associated errors da and db, when considering errors dxi and dyi for each data point.
  • Another participant suggests that what is being sought is a Maximum Likelihood Estimator, though details on its application are not provided.
  • It is noted by a participant that error bars are often ignored in least squares fitting, assuming that with a sufficient number of data points, the estimates for slope and intercept will converge to the "correct" values if the errors are not systematic.
  • A later reply mentions a method called Total Least Squares as a potential solution to the original question, providing a link to further information.

Areas of Agreement / Disagreement

Participants express differing views on how to handle errors in the fitting process. While some suggest using Maximum Likelihood Estimators or Total Least Squares, there is no consensus on the best approach or the specific formulas to use in the presence of errors.

Contextual Notes

Participants do not fully resolve the mathematical steps or assumptions involved in applying these methods, leaving some aspects of the discussion open to interpretation.

kvothe18
Messages
2
Reaction score
0
Hello!

I have a question that maybe has to do more with Mathematics, but if you do experimental physics you find it quite often.

Let's assume that we want to measure two quantities x and y that we know that they relate to each other linearly. So we have a set of data points xi and yi, i=1,...,n, and we want to make a linear fit. According to the method of least squeares there exist formulas for a, b, where y=a+bx, and their errors da and db. These formulas, if I'm not wrong, are these in the following link: http://prntscr.com/iz15tk ( [ ] means sum)

But in the most common case, for each xi and yi value we have an error dxi and dyi, i =1,...,n respectively. In this case which are the formulas about a, b, da, db? Of course these values shoud be different from the first case. I've searched on the internet but I couldn't find anything in this general case.

Do you have any ideas?
Thank you.
 
Physics news on Phys.org
kvothe18 said:
Hello!

I have a question that maybe has to do more with Mathematics, but if you do experimental physics you find it quite often.

Let's assume that we want to measure two quantities x and y that we know that they relate to each other linearly. So we have a set of data points xi and yi, i=1,...,n, and we want to make a linear fit. According to the method of least squeares there exist formulas for a, b, where y=a+bx, and their errors da and db. These formulas, if I'm not wrong, are these in the following link: http://prntscr.com/iz15tk ( [ ] means sum)

But in the most common case, for each xi and yi value we have an error dxi and dyi, i =1,...,n respectively. In this case which are the formulas about a, b, da, db? Of course these values shoud be different from the first case. I've searched on the internet but I couldn't find anything in this general case.

Do you have any ideas?
Thank you.
What you are looking for is called a Maximum Likelihood Estimator.
 
Usually the error bars of data points are ignored when doing a least squares fit, as the slope and intercept should approach the "correct" value if there's a large enough number of data points and the error is not systematic.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
7K
Replies
28
Views
4K