1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Straight line equation that accounts for known error in X&Y?

  1. Apr 15, 2015 #1
    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!!
  2. jcsd
  3. Apr 15, 2015 #2


    User Avatar
    2017 Award

    Staff: Mentor

    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook