1
$\begingroup$

Suppose I have several datapoints and each datapoint has an error $E_i$. I then perform a fit on the data to a model (say, $y=mx+c$ for example) using a computer program. The program gives me a covariance with the fit and from this covariance I can calculate an overall error $E$ with the program (it takes the square root of the diagonalization of the covariance matrix - not that I understand what that means!). My question is, do the individial errors of the datapoints $E_i$ need to be considered in turn and combined with $E$ to give the total overall error? Or, does the covariance represent these small errors in the form of the extent to which the errors deviate from the fitted model.

$\endgroup$
1

2 Answers 2

0
$\begingroup$

If you fit the model $\hat y_i = m x_i + c$ to your dataset $\{y_i\}$, the error of the model is given by $$ \epsilon_i = y_i - \hat y_i $$ Hence, if our dataset contains $n$ data points the errors are given by a $n$-dimensional vector, $\vec \epsilon = (\epsilon_1, \epsilon_2, \ldots, \epsilon_n)$.

In contrast, the variance of a model is a scalar quantity, which quantifies the (square of the) average standard deviation. It is given by $\frac{1}{n-1}\sum_i \epsilon_i^2 = \frac{1}{n-1} \sum_i (y_i - \hat y_i)^2$. Most fits determine the "best fit coefficients" by minimising the variance of the model. If you check how the covariance matrix of the fit looks like, you will see that the diagonal elements are the terms of the variance expression -- except the constant prefactor.

Hence, the error of the fit and the variance of the model are related to each another, but they are two different things.

$\endgroup$
0
$\begingroup$

The covariance matrix is already calculated using the errors in the individual datapoints.

The square root of the diagonal elements of the covariance matrix gives approximate errors for the parameters of the model - in this case, the gradient and intercept of the straight line.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.