Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Uncertainty on best fit gradient

  1. Feb 21, 2013 #1
    Hi everyone,

    I have a plot of some data points that have error bars on the y axis.

    A bit of software I am using gives me the best fit gradient and a "Standard Error", but it doesn't take the size of error bars into consideration. I'm assuming that it just looks at how well the gradient fits the data points to give the standard error on the gradient.

    But doesn't one need to take into consideration the size of the error bars on the data points??

    Thank you.
     
  2. jcsd
  3. Feb 21, 2013 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    It does help to know how your software arrives at it's conclusions.

    Perhaps the program just uses the statistics from the data points to figure an uncertainty in it's estimations. You can imagine if you had inaccurate measurements which just happened to fall close to a line, then the program would provide a very small error. You can test by giving it made-up data.

    http://www.learningmeasure.com/articles/mathematics/LeastSquaresLineFits.shtml

    Example including error-bars, using mathematica:
    http://mathematica.stackexchange.co...egression-given-data-with-associated-uncertai
     
    Last edited: Feb 21, 2013
  4. Feb 21, 2013 #3
    Thanks Simon.

    Yes it seems that the software (within Python) just does a least squares fit, compares the data points to the best fit gradient and lets you know how well they fit. I wanted something that took into account the error bars on the data too - for the reason that you mentioned above.

    Statistically speaking, a gradient uncertainty that took into account the error bars on the data points would be better right?

    I'll check out both the links - thank you!
     
    Last edited: Feb 21, 2013
  5. Feb 21, 2013 #4

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I'm not actually sure ... the assumption behind the least-squares is that the data comes from a normal distribution so the uncertainty estimate will be based on a distribution of means.

    Sze Meng Tan's Inverse Problems lecture notes provide in in-depth into regression in one of the chapters... the notes are available here:
    http://home.comcast.net/~szemengtan/ [Broken]
     
    Last edited by a moderator: May 6, 2017
  6. Feb 21, 2013 #5
    Thank you for your help!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Uncertainty on best fit gradient
  1. Best model to fit data (Replies: 13)

Loading...