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

What to do with variances in a covariance matrix?

  1. May 21, 2012 #1
    How to get a covariance matrix is well defined, but I don't really know how to use it once obtained.

    I'm trying to find the best parameters for a data set with a given function. I'm having four parameters a1,a2,a3,a4 and from these parameters I have the covariance matrix. I'm supposed to get the 'errors' of the parameters from the matrix. I know that the covariance between the same element gives the variance so the elements on the diagonal of the matrix (when i=j) give the variances. I can't really figure out what the variance means, is it an absolute error in the parameters or maybe a relative error? Or maybe it's something quite different, can anyone explain me what the variance means?
     
  2. jcsd
  3. May 21, 2012 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    Let's clarify what you are doing. You have some data. What is the format of the data?

    You say you have 4 parameters. Does this mean that you have determined the numerical values of thse parameters? If so, did you do this with a curve fitting method? What method?

    You say that you have the covariance matrix. Is the covariance matrix for the parameters? Or is it for the components of the data? Do you know how this matrix was computed or is it merely an output of some curve fitting software?
     
  4. May 21, 2012 #3
    The data I have is the time differences of a measured pulse from a pulsar due to the radial velocity caused by a planet, the times at which this is measured and the errors of the measurement.

    From theory follows this formula ΔT=a1+a2*sin(a3*t+a4) (note: ΔT and t are independent). I use the Levenberg-Marquardt method to find the best fitting parameter values. This numerical method uses a covariance matrix, which is returned once you stop the 'routine'. So what I have now is the best parameter values, but I somehow need to get the 'errors' in these values from the covariance matrix of these parameters.

    I hope it's a bit more clear now.
     
  5. May 21, 2012 #4
    Hi snipertje!

    Yeah, much more clear now! When fitting several parameters into a model, typically pseudo-Newtonian methods like the one you mention are used which means Jacobian and Hessian matrices are going to be involved in the process.

    Now, fortunately, it turns out that the inverse of the Hessian matrix approximates the variance/covariance matrix of the parameters involved in the model.

    I'm explaining all this because you must make sure if the matrix you have is the Hessian returned by the algorithm or the approximation given by the Hessian (the actual variance/covariance matrix you won't have it).

    If it is the approximation of the variance/covariance matrix simply square root the diagonal (that is the variance of each parameter) and that will be the standard error you're looking for.

    If it is the Hessian, then invert the matrix and treat it like if it was the variance/covariance matrix to calculate the standard error.

    I hope this helps! :smile:
     
    Last edited: May 21, 2012
  6. May 21, 2012 #5
    This is exactly what I wanted to know, thanks a lot. I'm pretty sure that it indeed is the Hessian which the method uses, but the subroutine I use inverts it when you tell it to stop, so I get precisely what you say here. Cheers
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: What to do with variances in a covariance matrix?
  1. Covariance matrix (Replies: 2)

  2. Covariance matrix (Replies: 4)

Loading...