Fitting a straight line with known errors in both X and Y

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
AlanKirby
Messages
20
Reaction score
0
I'm looking for how to mathematically relate X and Y, in such a way that the Chi-Squared per degree of freedom is minimised. However I can't understand how this would work, given that I'm trying to use known X,Y dX and dY (errors) values, to get the related gradient and intercept for the line of best fit.

nb: I'm currently trying to program a straight line in java that accounts for known errors in both X and Y, however everything I find either obtains errors, or is way over complicated.

Please help!
 
Physics news on Phys.org
Fit programs can certainly do that, and I guess somewhere hidden in this or at least one of those articles is the right formula.

Alternatively, write down the equation for ##\chi^2## yourself, calculate the derivatives and see how the expression can get minimized. I'm not sure if that gives a single nice formula.