# Propogation of Coefficient Standard Deviations using Derivatives

Hi all,

This is my first post here. As a bit of background I have a keen interest in mathematics, but I'm not necessarily strong in it...

Today I was working with a dataset that models difference in elevation values (dH) over time (x). I have approximately 20 samples, of which each dH value has a different uncertainty (time is considered error free). The model is quite clearly non-linear, so I performed a quadratic regression using a weighted ordinary Least Squares routine to solve for the highlighted coefficients below, weighting the observations to account for their uncertainty.

dH = ax2+bx+c

The coefficients were derived successfully and the model fits well, as confirmed through statistical tests. Check.

As part of the Least Squares routine, I also calculated the standard deviation for each of the parameters (i.e. quadratic coefficients), as this is important to my analysis. This was done by calculating the variance factor (VF), then quality matrix (Qx), then taking √(diagonal(Qx)) = standard deviation. So the net result is three coefficients, a, b and c, each with their own standard deviation. Check.

Here comes the part where I'm stuck (and the basis for my question). I need to calculate the derivative of the resulting quadratic function, i.e. the rate of change of dH, and evaluate it at a particular point in time. Calculating the derivative itself is straightforward:

Derivative(dH) = 2ax + b

What I'm confused about is how I calculate the standard deviation of the derivative solution at a particular point in time? I'm assuming this requires some form of propagation of variances from the quadratic coefficent standard deviations, but I'm unsure how that works when a derivative is involved...

To clarify, let's say that coefficient a = 3 (std dev = 0.3), b = 7 (std dev = 0.45) and c = 2 (std dev = 0.15), and I want to evaluate the rate of change of dH (i.e. Derivative(dH)) at x = 4.

2*3*4 + 7 = 31

But how do I calculate the standard deviation of the answer? Is it as simple as substituting the respective coefficient standard deviations into the equation? I.e.:

2*0.3*4 + 0.45 = 2.85

I have tried searching for an explanation across the web without success. Can someone please shed some light on this, or point me in the right direction?

Many thanks,
Jack

Last edited:

mfb
Mentor
No, that does not work.
Propagation of uncertainty

If your coefficients are uncorrelated, you have to add the variances (the squared standard deviations) that come from the individual uncertainty contributions:

##2^2\cdot 0.3^2 \cdot 4^2 + 0.45^2 = 5.96##, the standard deviation is then the square root of this value, 2.44.
This is a way to use the formula given in the link above.

However, your coefficients are not uncorrelated - you will have to consider the correlation between them, as shown in the example there (and you have to calculate that correlation first). There are fitting procedures that can do everything for you, there is no need to calculate that manually.

hi,
first of all, your problem is actually a linear fitting problem as linearity is defined in data fitting with respect to the model parameters (a, b, c in your case) and is not related to the condition under which the experiment was performed (x in your model).
Please have a look at the textbook 'Data Fitting and Uncertainty (A practical introduction to weighted least squares and beyond)'. In Chapter 4 there is a nice explanation of what you like to know. The key word is 'error propagation'.