What to do with variances in a covariance matrix?

snipertje
Messages
11
Reaction score
0
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?
 
Physics news on Phys.org
snipertje said:
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.

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?
 
Stephen Tashi said:
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?
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.
 
snipertje said:
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.

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:
viraltux said:
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/or 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 help! :smile:

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
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Back
Top