# How do I calculate the experimental uncertainty in a function of two measured quantities

I am performing an experiment where I'm measuring two variables, say $x$ and $y$, but I'm actually interested in a third variable which I calculate from those two, $$z=f(x,y).$$ In my experiment, of course, both $x$ and $y$ have experimental uncertainties, which are given by the resolution of my measurement apparatus among other considerations. I am also considering doing multiple runs of measurement to obtain good statistics on my measurement of $x$ and $y$, and therefore on $z$. I don't really know how the statistical spread will compare to my calculated (resolution-induced) uncertainty, though.

I would like to know what the final uncertainty for $z$ should be, and I am not very familiar with the error propagation procedures for this.

• What are the usual ways to combine the experimental uncertainties in measured quantities?
• When should I use the different approaches?
• How do I include statistical uncertainties when they are present?
• What happens if the statistical spread of a variable is comparable to the instrument's resolution, so that I can't neglect either contribution?

I would also appreciate answers to cite their sources - and particularly to use 'official' ones - where possible.

• For an in-depth look at the combination of experimental and statistical uncertainties, see How to combine measurement error with statistic error. Commented Jan 13, 2014 at 18:09
• I had a good look and it seems we don't really have a good, canonical question to point people to when they ask how to combine experimental uncertainties. I'm therefore proposing we take this as a place for that. Feel free to improve the question if you have good ideas. Commented Jan 13, 2014 at 18:11
• Hi Emilio, I suggest to split this in different questions, since a comprensive answer should be very long, I fear. I've tried to address to what seems to me the main question “What is the common procedure...“, considering the case where the two variables can be correlated. Commented Jan 13, 2014 at 19:09
• Any version of the "error analysis" books by Bevington. Commented Jan 13, 2014 at 19:46

In my experimental courses, all uncertainties are calculated with the so called “sum in quadrature“: $$\delta z = \sqrt {\Biggl(\dfrac{\partial f}{\partial x} \delta x\Biggr)^2+\Biggl(\dfrac{\partial f}{\partial y} \delta y\Biggr)^2+2\Biggl(\dfrac{\partial f}{\partial x}\cdot \dfrac{\partial f}{\partial y}\Biggr)\text{cov}(x,y)},$$ where the partial derivatives are calculated in the expected value.
The motivation of the formula is roughly as follows: for a linear function of two random variables $X,Y$, $$Z=aX+bY+c$$ the variance is exactly: $$\text{Var} (Z)=a^2\text {Var}(X)+b^2\text {Var} (Y)+2ab\text {cov}(X,Y).$$ For a general function $Z=f(X,Y)$, we reconduct to the linear case by taking it's Taylor expansion around $(E(X),E(Y))$. Turns out that $$E(Z)\approx f(E(X),E(Y))$$ (the calculation is not at all difficult, tell me if you need it for a more precise statement). In the same way: $$\text {Var} (Z)\approx a^2\text {Var}(X)+b^2 \text {Var} (Y)+2ab\text {cov}(X,Y),$$ where the “weights” $a^2$ and $b^2$ are the squares of the derivatives as I wrote in my first formula.
• Correct. Could be retrieved by a Taylor serie (around $\langle X\rangle, \langle Y\rangle$) of $V(f(X, Y)) = \langle f^2(X,Y)\rangle - \langle f(X,Y)\rangle^2$, at second order in $X - \langle X\rangle, Y - \langle Y\rangle$. Commented Jan 13, 2014 at 19:52
• How do you take into account that for each time you vary the pair $(x,y)$ the value $z$ will change. Wouldn't that increase dispersion? Commented Dec 12, 2014 at 18:20
• You mean if you have a set of $(x_i,y_i)$ couples? Here I assumed that the experimenter has previously made two estimation of $x_{\text {best}}$ and $y_{\text {best}}$, with uncertainties $\sigma _x, \sigma _y$ and has to estimate $z$ from these two. If the two uncertainties are little (for example if $(\partial f / \partial x)\cdot \sigma _x + (\partial f / \partial y )\sigma _y << f$ at that point $(x,y)$) it is reasonable to make a Taylor expansion. Commented Dec 12, 2014 at 21:46