You are on page 1of 8

Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.

doc Page 1 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

Uncertainty Calculations: (See also appendix B8 in Serway.)

To be unambiguous in our notations of physical measurements we should write all


numbers in terms of powers of ten. We should always do this in final results.

We also must always indicate the dimensions involved, for example we write:

1.7 mm = 1.7x10-3 m.

In both cases we use 2 significant figures. The number 0.0017 m also has just two
significant figures, whereas the number 0.00170 m has three significant figures.
Whenever a number is given without indication of the relative or absolute error we assume
that the error lies in the next significant figure and is equal to 5 units of that figure.
1.7 mm means therefore 1.7mm +/- 0.05mm.
Whenever we measure a number we can find out what this absolute error is. It
depends on the accuracy of the measuring instrument and the accuracy of the
measuring procedure.
The number 0.05 mm is called the absolute error in x, for example. We write it with a
capital Greek Δ, so we get Δx=0.05mm.

We call the ratio between the absolute error Δx and its underlying value x, the relative
x
error in x, namely:  relative error in x
x
When we multiply or divide numbers, the term with the smallest number of
significant figures prevails. We wait until the final result to round our numbers up or
down.

x=1.334 y=3.45 z=2.6


V=π·x·y·z =3.759223x101 cm3 which we must round to 2 significant figures
or 3.8x101 cm3

As absolute errors in a measurement are usually given in terms of 1 significant figure,


the calculation of the relative and absolute uncertainties should also be rounded to 1
significant figure.

x=1.334cm+/- 0.0005cm; y=3.45cm+/- 0.005cm; z=2.6cm+/- 0.05cm

V 0.0005 0.005 0.05


    2.105486  102  2 102
V 1.334 3.45 2.6
V
(1.1) V  V  2.105486 102  3.759223  101 cm3  2.1 102  3.759  101 cm3
V
 0.79cm3  0.8cm3
We obtain the same result if we use the correct number of significant figures
immediately:
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 2 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

V
(1.2) V  V  2 102  3.8 101 cm3  0.8cm3
V

When measurements are added or subtracted we first express all numbers in the
same dimension. Then we apply the rule that the term with the smallest number of
decimal places must prevail in the result. (Note that here we are talking about decimal
places, not significant figures.)
The following terms in the sum have both 5 decimal places, the first number has also 5
significant figures, whereas the number 0.0004 has only one significant figure.
1.0001+0.0004=1.0005

1.04m+0.00007m=1.04m (three versus five decimal places)

2.6x103cm + 3.656x10-2km=2.6x101m+3.656x101m=6.3 x101m

(1.3) (2.6  0.05) 101  (3.656  0.0005) 101  (6.3  0.05) 101

∆x is called the absolute uncertainty in the measurement x, in contrast to the relative


uncertainty. The relative uncertainty is a ratio of two numbers with the same
dimension, therefore, the dimensions cancel out and the result is a fraction smaller
than 1. We therefore often express the ratio as a percent ratio: 0.05 = 5%
x
(1.4) x relative uncertainty in x.

As you all know from calculus the derivative of ln(x) is 1/x.


d 1 dx
(1.5) ln( x)  multiply by dx  dln(x)=
dx x x

Therefore, you can see that if f(x) is a function of x we have the following:
df ( x)
(1.6) d  ln f ( x) 
f ( x)

Multiplying by dx we define the logarithmic derivative of f(x) as

(1.7)
d ln f  df
f
This is the mathematical expression for the relative uncertainty in the function f.

This suggests that we can calculate the relative uncertainty of a function in several
variables f(x,y) by simply taking its natural log and then forming the total or perfect
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 3 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

derivative df and dividing by f. We interpret df as our absolute measuring error ∆f.


The meaning of the total derivative can be illustrated by considering the formula of a
rectangle whose area is given by the product xy. f(x,y)=xy
The total derivative df of this function is the increase of the area if we increase x by dx
and y by dy. df=y·dx+x·dy. We are neglecting the shaded area dx·dy which is a second
order derivative.

dy

x dx

(1.8)
f  f ( x  x, y  y )  f ( x, y )  f ( x  x, y )  f ( x, y )  f ( x, y  y)  f ( x, y ) 
change of f in x change of f in y

( x  y )   x  x    y  y   x  y   x  x   y  x  y  x   y  y   x  y  x  y 
change in area xy change in x change in y second order change

x  y  x  y  x  y  x  y  x  y  x  y  x  y 
change in x change in y

 x  y  x  y  x  y  x  y  x  y  second order changes


We see that the change of the area, or in general any function f, can be obtained by
the sum of the changes in x or y separately, if we make the changes very small, so that
the second order changes can be ignored. We define the new concept of partial
derivatives and total derivatives. The partial derivative of any function with more
than one variable is obtained by forming the regular derivative of that function with
respect to a particular variable, while treating all the other variables as constants.

 f ( x  x, y )  f ( x, y )   f ( x, y  y )  f ( x, y ) 
df   lim  dx   lim  dy
 x 0 x   y  0 y 
(1.9) f f
x y
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 4 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

f
is called the partial derivative of f(x,y) with respect to x.
x
f
(1.10) is called the partial derivative of f(x,y) with respect to y.
y

f f
(1.11) We call df the total or perfect derivative: df  dx  dy
x y
If we go back to the last line of formulas (1.8) and divide the final result by the area
function xy, we get the relative change of the area, that is a dimensionless ratio,
smaller than 1, which can be expressed in terms of percent. The advantage of the
relative error over the absolute error is that it gives a much better immediate sense of
the change in the function in question. In addition, all constants drop out.

( x  y ) x  y  x  y x y
  
x y x y x y
(1.12)
df f

f f
The last expression is called the logarithmic derivative, which in most cases can be
calculated very easily.

The total logarithmic derivative represents the total fractional increase of the function
f when we increase x by dx and y by dy.
df xdy  ydx dy dx
(1.13)   
f xy y x

This result can be obtained easier by first calculation ln(f) = ln(x) +ln(y). When we
take the total derivative of this function we easily get
dx dy
(1.14) d ln f  d (ln x  ln y)  
x y
We have used the definition of the total derivative as follows:
(1.15)
f f f
df  dx  dy  dz
x y z
The partial derivatives herein have been defined through:
f ( x, y, z ) f ( x  x, y, z )  f ( x, y , z ) f ( x, y , z ) f ( x, y  y , z )  f ( x, y , z )
 lim and  lim
x x 0 x y y 0 y

Example: f(x,y) = 4x ∙ 5y2, where x = 5.34 cm +/- 0.004 cm and


y has been measured to be 33.68 cm +/- 0.008 cm. f = 1.21147768∙ 105 cm3
We would use 3 significant figures (sig figs), if we wouldn’t know anything else.
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 5 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

But we know the absolute errors in x and y, namely:


∆x = 0.004 cm and ∆y = 0.008cm. These are the absolute errors in x and y. Note that
the absolute error in y is twice the absolute error in x, but that the relative error in y,
∆y/y = 0.008/33.68 is much smaller than the relative error in x, ∆x/x = 0.004/5.34.

Now, ln[f] = ln(x) + ln(4) + ln(5) +2ln(y). The total derivative of this function is dlnf =
dx/x + 2 dy/y.

where ∂f/∂x is the partial derivative of f with respect to x. Remember that you form the
partial derivative of a function of several variables x, y, z with respect to x by treating
the variables y and z temporarily as constants and by forming the regular derivative
with respect to x. So, the partial derivative of our function f with respect to x is
f f
(1.16) f ( x, y)  20 xy 2   20 y 2 ;  40 xy
x y
We can see the meaning of the total derivative again nicely in the following example
(1.17)
f 
2

f ( x  x, y  y )  20  x  x  y  y   20  x  x  y 2  2 yy   y 
2

 2
 
20 x y 2  2 yy   y   20x y 2  2 yy   y 
2
  20xy 2
 40 xy y  20 y 2 x  negligible
f f
y x

terms containing higher powers of  terms


f f
f ( x  x, y  y )  f ( x, y )  df ; with df= dx  dy
x y
f f
 20 y 2 ;  40 xy
x y

These are the partial derivatives of f, not of lnf. So, the total derivative of f is
(1.18) df  20 y 2 dx  40 xydy . We interpret the total derivative as the absolute error or
increase Δf. In order to get the relative error Δf/f we now just divide Δf by f and
obtain Δx/x + 2 Δy/y.
This is quite cumbersome, and it is much easier to calculate df/f directly by taking the
total derivative of ln(f) rather than the total derivative of f. This is what we are going
to do in all our labs. Whenever we need to evaluate the measuring errors we simply
calculate the relative error first, by calculating the total derivative of ln[f(x,y,z)].

(1.19)
df  ln f  ln f  ln f x y 0.004 0.008
 d ln f  dx  dy  dz  +2 = + 2· = 1.114123·10 -3.
f x y z x y 5.34 33.68

The smallest number of significant figures in this calculation is 1, Therefore, we must


round the result to 1 significant figure to get:
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 6 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

∆f/f = 1∙10 -3 = 0.1%. The relative error in this measurement is 0.1%

We obtain the absolute error ∆f by multiplying the value for


f = 1.21147768∙ 105 cm3 by 0.001 to obtain 121 cm3 for ∆f. To use one sig fig only
reduces this number to 100 cm3

Our final result should therefore be written as:


f =1.211∙ 105 cm3 +/- 100 cm3 or ∆f/f = 1∙10 -3 = 0.1%
Our result warrants four significant figures because our error is at the fourth
significant figure. The uncertainty calculations override the rule about significant
figures.
If f is an arbitrary function in terms of powers of x, y, and z we can write:
(1.20)

f ( x, y, z )  kx a y b z c
df
 d ln f  d (ln k  a ln x  b ln y  c ln z ) 
f
(if interpreted as a relative uncertainty all terms are positive)
df dx dy dz
a b c
f x y z
Here is another important example for derivatives of a trig function:
g ( x, y )  5 y  sin  3 x  ; ln g  ln 5  ln y  ln sin(3 x)
dg dy 1 dy
 d (ln g )  0    3  cos(3x)  dx   3cot(3 x)  dx
g y sin 3 x y

(1.21)
This total derivative is the relative change of the function f under the change of x to
x+dx, of y to y+dy, and of z to z+dz. Assume we have a function f with a=2, b=-1, c=-1,
k=1.We can ask by how much this function would change if we increase x by 6%, y by
4% and decrease z by 2%.
f ( x, y, z )  x 2 y 1 z 1 ; x  3.67, y  6.98, z  25.6; f  7.54 10 2
x y z
 6%;  4%;  2%
x y z
(1.22)
df 2x y z 2x y z
       2  6%  4%  2%  10% increase of 10%
f x y z x y z
df  0.1 f  8 103
If we want to interpret df/f as the relative error Δf/f we must use the absolute values
of a, b, and c, because the powers a, b, and c can also be negative, as we have just seen
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 7 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

in the previous example. In such an error calculation situation all terms of df/f must
be positive, because errors are all assumed to add, never subtract.

f
  ln f  (ln k  a ln x  b ln y  c ln z ) 
f
(1.23)
f x y z
a b c
f x y z

If our function contains terms which are not powers, we have to use calculus:
f ( x, y )  x 2 sin 2 y
(1.24) df dx  cos 2 y   2 dx
d ln f   d (2 ln x  ln  sin 2 y )  2  dy  2  2 cot  2 y   dy
f x sin 2 y x

Homework:
The mass density is defined as the ratio between mass and volume.
m 4 3
Memorize these formulas: density   ; V= r for a sphere
(1.25) V 3
m= V

Calculate the following quantities with relative (in %) and absolute uncertainties:
a) The density of a neutron: in kg per cubic meter.
(1.26) m  1.67  0.005 1027 kg; r= 1.0  0.05 1015 m
Result: ρ=4.0E17 kg/m3 Δρ/ρ=0.15=15%; Δρ=0.6E17 kg/m3

b) Calculate the density of earth and sun with the radius and mass given in the book.
earth: result: 5.53 x103 kg/m3 sun: 1.41x103 kg/m3

c) Calculate the mass of the universe; assume a uniform spherical distribution of mass
with a mass density of
kg
  6.0 1027 3
m
and a radius of 1.5 1010 light years.
1 lightyear is the distance light travels in one year= c 1year in s=9.461 1015 m  1016 m
m
(1.27) Memorize: speed of light c=3.000 108
s

d)
3 x 2 sin 3 y 
f ( x, y, z )  ; x= 3.65  0.02  cm; y  0.100  0.0005 ; z= 3.96 0.02  cm
z
Find f and its uncertainties (absolute and relative).
Solution: f   9.4  0.2  cm
Physics 130 C:\physics\130 lecture\ch 0 Uncertainty Calculations.doc Page 8 of 8
1/26/2011; 4:37 PM Last printed 1/26/2011 4:37:00 PM

The calculations of uncertainties using derivatives make only sense as long as the
relative errors do not exceed 20%. For larger relative errors it is best to use
maximum and minimum values.

f max  f min
(1.28) f  ; f  Max( f max  f , f  f min )
2

You might also like