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?