Undergrad Chi-squared fit with errors on both x and y

Click For Summary
SUMMARY

This discussion focuses on fitting a straight line to data points with errors in both x and y coordinates, specifically addressing the challenges of incorporating x errors into the fitting process. The participants highlight the importance of using orthogonal distance regression and total least squares methods, as simply combining variances from both axes is insufficient. A well-defined problem statement is crucial for obtaining statistically valid results, particularly when dealing with mixed units in the error calculations.

PREREQUISITES
  • Understanding of orthogonal distance regression
  • Familiarity with total least squares methodology
  • Knowledge of error propagation in statistical modeling
  • Basic principles of standardization in data analysis
NEXT STEPS
  • Research orthogonal distance regression techniques
  • Explore total least squares applications in data fitting
  • Learn about error propagation methods in statistics
  • Investigate standardization techniques for mixed unit data
USEFUL FOR

Statisticians, data analysts, researchers dealing with measurement errors, and anyone interested in advanced regression techniques for data fitting.

Malamala
Messages
348
Reaction score
28
Hello I have some data points which have errors on both x and y coordinates. I want to fit a straight line to them but I am not sure how to take the error on x into account. Normally, when I have just the error on y, I want to minimize $$\sum\frac{(y_{pred}(x)-y_{measured}(x))^2}{\sigma_y^2}$$
Can I just replace ##\sigma_y^2## with ##\sigma_x^2+\sigma_y^2##? The errors on x and y are not correlated. Thank you!
 
Physics news on Phys.org
  • Like
Likes WWGD
It is also called orthogonal distance regression.
 
Dale said:
It is also called orthogonal distance regression.

Yes. You start with the obvious thing - a line y = mx + b, and you try and do a least-squares fit using the perpendicular distances between the points and the candidate line instead of the y-distances. Problem is that doesn't always get you a unique unbiased solution.

That's why you need to specify what you are looking for very carefully.
 
  • Like
Likes WWGD and Dale
Even though this appears to be a drive-by posting, I'll make one more comment.

If you minimize a function of Δy only, it's clear what you are doing. If you minimize something like Δx2 + Δy2 it's not even guaranteed that you have a number with consistent dimensions: suppose y is temperature and x is time. What units would Δx2 + Δy2 even be in?

To get a well-defined answer, one needs to pose a much, much better defined question. And even then it may not exist.
 
  • Like
Likes WWGD
Vanadium 50 said:
Even though this appears to be a drive-by posting, I'll make one more comment.

If you minimize a function of Δy only, it's clear what you are doing. If you minimize something like Δx2 + Δy2 it's not even guaranteed that you have a number with consistent dimensions: suppose y is temperature and x is time. What units would Δx2 + Δy2 even be in?

To get a well-defined answer, one needs to pose a much, much better defined question. And even then it may not exist.
Maybe if you standardize your variables you can avoid the issue with units? I understand that is one if the reasons for standardization.
 
WWGD said:
Maybe if you standardize your variables you can avoid the issue with units? I understand that is one if the reasons for standardization.
What do you mean by this?
 
Malamala said:
What do you mean by this?
I was replying to @Vanadium 50 regarding his statement on mixed units in the expression ##\sqrt \delta x^2 + \ delta y^2 ##. If you standardize your expression ( assuming normality of data or other) the resulting variable is unitless , from algebra alone ( you're dividing two expressions with the same units ), so that you avoid at least this issue of having mixed units. Seems like something @Stephen Tashi may know about.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K