[SciPy-user] Error estimates with leastsq?

Joseph Smidt josephsmidt@gmail....
Wed Jun 3 21:12:08 CDT 2009


    I am trying to best fit data with theory using leastsq.  It works,
in that the best fit curve fits the data fairly well.  I was wondering
how I could find the error bars on the parameters.

    Is this what cov_x is for that leastsq returns?  (See
 What is meant by "estimate of the jacobian around the solution"?  Is
this related to the error bars?  It says "see curve_fit", but I
couldn't find that page.

For example, for output I get the best fit parameters are: [
10.8138327 ,  25.18203823] with cov_x = [[  773.42733539,
       [-1791.83769517,  5203.77670479]]

  Is this saying the best fit for parameter 1 is 10.81 +/- sqrt(773)
and for parameter 2 = 25.18 +/- sqrt(5203)?   Thanks.


                              Joseph Smidt

Joseph Smidt <josephsmidt@gmail.com>

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

More information about the SciPy-user mailing list