# How do I do error calculus right using gnuplot as an example?

Given is a set of measurements with their respective errors for example an energy spectrum. In gnuplot one is to fit a function $f(x;\{p_i\})$ depending on a variable $x$ and on fit parameters $p_i$. When the fit is done one gets values for the $p_i$ with errors and a correlation matrix with values $c_{ij}$. Now one has to calculate a value $v(\{\text{some of the }p_i\})$ that depends on some of the the $p_i$ and find its error $\Delta p_i$.

How will a calculate the error $e$? Do I have to take correlations into account? Can I do it the way I attempted it in my solution attempt.

Solution Attempt: $e^2=\sum_{i}\left(\frac{\partial v}{\partial p_i}\cdot \Delta p_i\right)^2+\sum_{ij}\frac{\partial v}{\partial p_i}\frac{\partial v}{\partial p_j}c_{ij}\Delta p_i \Delta p_j$

If this is right what happens if one of the $c_{ij}$ is negative?

-
Does this really have anything to do with gnuplot? It seems like you're just asking how to interpret the results of a regression with uncertainties given on the coefficients. – David Z Oct 5 '12 at 0:46
@David I agree this is more general than gnuplot, and people here (myself included) can probably give some feedback. But I'm wondering if there's a stackexchange more appropriate for error analysis. – Chris White Oct 5 '12 at 7:26
I think questions on error analysis in general are fine here, and in fact this is probably the best site on the network to put them on. If not here, I could see them perhaps going on Mathematics. However, questions about gnuplot usage would go on Super User or Computational Science. I suspect this question is basically fine, it just needs to be retitled/edited to show that it is asking about error analysis in general, not the usage of gnuplot to do error analysis, and I wanted to confirm that suspicion with the OP. – David Z Oct 5 '12 at 8:00
I changed the title. Is this title maybe more ok? Please is there anybody who can answer it? – A badbad student Oct 5 '12 at 10:05
Questions about the meaning of sums of residuals in a regression would be fine on Stats.SE, as well. – dmckee Oct 5 '12 at 14:50