Calculating with constants with tolerance

76 Views Asked by At

I have a formula. LogC= (LogA - 0.80 * LogB - 8.40)/0.50

However, all these constants 0.80, 8.40 and 0.50 have +/- tolerances which are not equal. Respectively, +0.13/-0.15, +4.55/-4.20, +0.12/-0.20. So I want to calculate LogC value with error depending on these tolerances. But im stuck how to calculate it. First i thought that i should take the greatest values of these constants on numerator and the smallest value on deminator for the max value and vice versa for min value. Then, max+min/2 would be my value and max-min/2 would be my error. However, in this way errors go crazy. Probably i need to use a different method to calculate errors. Any suggestions here?

2

There are 2 best solutions below

10
On BEST ANSWER

Write $\log C$ as a function of the constants and call the latter $x,y,z\,:$ $$ \log C=f(x,y,z)=\frac{\log A-x\log B-y}{z}\,. $$ Then use \begin{align} df&=\partial_x f\,dx+\partial_y f\,dy+\partial_z f\,dz =-\frac{\log B}{z}\,dx-\frac{1}{z}\,dy-\frac{f}{z}\,dz\,. \end{align} Plug in $dx=0.13+0.15=0.28$ and so on. This should give a reasonable error $df\,.$

Since $f$ is not linear in $z$ we only get an approximation of its error. This can be improved by using higher order terms in a Taylor expansion.

0
On

Here there is a better way i found: $$df=\sqrt{(\frac{\partial f}{\partial x} dx)^2+(\frac{\partial f}{\partial y} dy)^2+(\frac{\partial f}{\partial z} dz)^2}$$ or $$\Delta f=\sqrt{(\frac{\partial f}{\partial x} \Delta x)^2+(\frac{\partial f}{\partial y} \Delta y)^2+(\frac{\partial f}{\partial z} \Delta z)^2}$$

Where dx, dy and dz are errors of x, y, z, respectively.