NC Error Propagation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Chapter Three

Error Propagation in Calculations




3.1 Absolute and Relative Errors
When an uncertainty or an error estimate is expressed in the same units as the measured
quantity it is called an absolute uncertainty or error. For example, in m, the
uncertainty is expressed in absolute units.
05 . 0 13 . 5 =
The relative error is simply the ratio of absolute error to the measured quantity. In the
above example, the relative error is 0.05 m 5.13 m 0.01 = . Note that relative errors have no
units. They are often stated as percentages, e.g. ( ) 100% 1% = 0.05 m 5.13 m .
When quoting the results of an experiment, it is normal to express the associated uncer-
tainties in absolute units. Use the following example as a guide for quoting results in scientific
notation: N.
4
10 ) 003 . 0 624 . 7 ( =
G
F

3.2 Maximum Possible Errors
The rules used to propagate the errors through the calculations depend, in part, on the na-
ture of calculation being done whether the numbers with errors are added, subtracted, multi-
plied, divided, or raised to some power. The simplest approach in error analysis is to consider the
possible error in a calculated result, i.e., we use the uncertainties to estimate the maximum
range possible in the result.

3.2.1 Addition and Subtraction
Suppose the calculation involves addition, where the measured quantities with their asso-
ciated estimates of uncertainty are
x
x and
y
y , and we want to determine the error in the
result . The two extreme values for f are given by y x f + =

( ) ( )
( )
x y
Max f x y = + + +
and ( ) ( )
( )
x y
Min f x y = + + .


So the possible error in the sum is
f x

y
= + . (3.1)

A similar analysis applied to subtraction gives exactly the same result. The absolute uncertainties
and are expressed in terms of the measured units, as is the error
x

y f
in the result.
The basic rule for the propagation of errors in addition or subtraction is that the absolute error
in the result is the sum of the absolute uncertainties of the quantities used in the calculation.
9
Physics Laboratory Companion Error Propagation
3.2.2 Multiplication by a Constant Coefficient
Suppose the calculation is of the form f ax y = + , in which a is a given constant. Since
multiplication by a is the same as adding x to itself a times, the possible error in f is given by


f x
a
y
= + (3.2) (3.2)

More generally, if the calculation is of the form More generally, if the calculation is of the form f ax by cz = + , in which a, b, and c are con-
stants, then the possible error in f is given by


f x y
a b c
z
= + + . (3.3)

The basic rule when multiplication by a constant is involved is that the absolute error in the
result is the product of the constant and the absolute uncertainty in the quantity.


3.2.3 Multiplication and Division
Consider the product of two measured quantities, ( ) ( )
f x
f x y
y
= . To arrive at
an expression for
f
, consider the maximum and minimum values of f that can be obtained:

( ) ( ) ( )
x y y x
Max f x y xy x y = + + = + + +
x y

x
and ( ) ( ) ( ) .
x y y x x
Min f x y xy x y = = +

Since uncertainties are normally a small fraction of the measured quantity, the term is
much, much smaller than the other terms in these equations so, to a very good approximation, the
absolute error in f is given by
x y

f y
x y = + .

A more convenient and revealing equation for propagating the errors through multiplication can
be arrived at by dividing both sides of the equation by f itself. As the next few lines of algebra
will show, doing this results in the fractional error, more commonly referred to as the relative
error in the product. We get
,
f y y
x x
x x
y y
f f f xy xy


= + = +

or
f y
x
f y x


= + . (3.4)

Equation (3.4) shows that the relative error in the result is just the sum of the relative errors in
the measured quantities.
10
Physics Laboratory Companion Error Propagation
The derivation of the rule for division is a little more complex but, as you will see, it
leads to the same result. Consider the quotient ( ) ( )
f x
f x y
y
= . The maximum and
minimum values that can be obtained are


( ) ( ) ( )
( )
f x
Max f f x y = + = +
y

and and
( ) ( ) ( )
( )
f x y
Min f f x y = = + .

These two equations can be rewritten for the quantity x instead of f as

( ) ( )( )
x f y y f y f
x f y f y f y x f + = + = + = + y
and ( ) ( )( )
x f y y f y f
x f y f y f y x f = + = + = + y

where the terms in
f y
have been neglected in both equations. From either one of them, its
possible to deduce that , which can be rearranged to give
x f
y f =
y



y
x
f
f
y y

= +
or
f
x
y
f x y

= + . (3.5)

A comparison between equations (3.4) and (3.5) shows that the result for division is exactly the
same as for multiplication. In the more general case, where the calculation is of the
form f ax by cz = , the relative error in is given by f


z y x f
z
y
x
f

+ + = . (3.6)

The basic rule for the propagation of errors in multiplication or division is that the relative error
in the product or quotient is the sum of the relative uncertainties in the quantities used in the
calculation.
3.2.4 Powers
Raising a quantity to some power is the same as multiplying the quantity by itself as
many times as the power. Consequently, if then the relative error in y is just n-times the
relative uncertainty in x. For example, the area of a circle is given by , so the relative
error in the area is given by
n
x y =
2
r A =
r A
r A

2 = . (There is no uncertainty in .)
11
Physics Laboratory Companion Error Propagation
3.2.5 Trigonometric Functions
It is more complicated to derive the expressions for the error in calculations involving
trigonometric functions. The technique using trigonometric identities outlined in this section
works easily for sines and cosines, but a more general and elegant method suitable for any trigo-
nometric, exponential, or logarithmic function is presented in 3.6 on differential error analysis.
Consider as an example . The right hand side can be expanded using
the trigonometric identity for the sine of the sum of two angles:
sin ( )
y
y x =
x


. sin( ) sin cos cos sin
x x
x x x =

Normally the uncertainty is very small, so
x
cos 1
x
. Moreover, when a small angle is ex-
pressed in radians the sine of the angle is approximately equal to the angle itself, i.e., sin
x x
.
Substitution of these two facts into the expansion gives

sin( ) sin cos
x x
x x x = ,

from which we can deduce that the absolute error is cos
y x
x = , and that the relative error is


cos
cot
sin
y
x
x
x
x
y x


= = .

However, if the uncertainty is expressed in degrees of arc then the absolute error in is
given by
x
x
y
0.0175 cos
y
x = , where 0.0175 is the number of radians in one degree.

The derivation for the error in the cosine follows the same approach as that for the sine;
those for the error in the tangent and cotangent are rather more complicated. Rather than show
them here, the results are listed in Table 3.2.

Table 3.1 Errors in Trigonometric Functions
Function
Absolute Error
(radians)
Relative Error
(radians)
sine cos
x
x cot
x
x
cosine sin
x
x tan
x
x
tangent

2
sec
x
x sec csc
x
x x
cotangent

2
csc
x
x sec csc
x
x x
12
Physics Laboratory Companion Error Propagation
3.3 Examples Involving Maximum Possible Errors

3.3.1 Simple Addition and Subtraction
Calculate the sum of two masses, kg 02 . 0 63 . 41
1
= m and m . kg 03 . 0 13 . 2
2
=


41.63 kg 2.13 kg
43.76 kg
T
m = +
=

and the maximum possible error associated with m is
T

.
1 2
0.02 kg 0.03 kg
0.05 kg
T
= + = +
=

If, instead, we wanted to know the difference between the two masses, , the
error would still be 0.05 kg.
1 2
39.50 kg m m =

3.3.2 Multiplication by a Constant
Consider the total mass of a system, given by
2 1
3m m m
T
+ = . The error in is then
. If
T
m
1 2
3
T
= + kg 02 . 0 63 . 41
1
= m and kg 03 . 0 13 . 2
2
= m , then

kg 48.02 kg) 2.13 (3 kg 41.63 = + =
T
m ,
, 0.02 kg (3 0.03 kg) 0.11 kg,
T
= + =

and the result would be expressed as kg. 11 . 0 02 . 48 =
T
m If the calculation had involved sub-
traction, then the result would have been
2 1
3m m m
T
= kg 11 . 0 24 . 35 =
T
m .

3.3.3 Simple Multiplication and Division
Division
If, instead, the car travels 100 km 5 in
1 . 0 2 . 3 hours, the average speed is

100 km 3.2 h 31 km/h = = .

The relative error in the calculated result
is 0.08, the same as in the first example.
However, the absolute error is quite dif-
ferent:
0.08 31 km/h 2.5 km/h.

= =
Multiplication
A car travels at a speed
for hours. The distance trav-
eled by the car is given by
100 5 km/h =
1 . 0 2 . 3 = t

100 km/h 3.2 h
320 km.
d t = =
=


The relative error in the distance is

5 0.1
0.05 0.03 0.08
100 3.2
d
d

= + = + = .

In percentage terms, this amounts to 8%,
while absolute error is

0.08 320 km 26 km.
d
= =
13
Physics Laboratory Companion Error Propagation
3.3.4 Compound Calculations
More often than not, the equations that you use in the analysis of an experiment are more
complicated, involving combinations of addition, subtraction, multiplication, division, etc. The
following examples are typical of the kinds of error calculations you may encounter in the first
year physics labs, and they illustrate the strategies one should employ in error calculations in
general.

Example 1: Suppose the equation is , and you know from experiment that
, , and . The quantity required from the calculation is
the acceleration, so the equation can be rearranged to give either
2
0
d t a = +
9.5 0.5 s =
t
75 1 cm d =
0
28 1 cm/s = t
( )
2
0
a d t t = or
2
0
a d t = t . Either one of these forms will give the same answer for a, but only the second
form is appropriate for working out the error calculation.
An important feature to notice about the second form is that each term has been rational-
ized, so that no variable appears both in the numerator and the denominator of that particular
term. This is important to do because otherwise the error estimate would be inflated artificially.
(For example,
2 2 3
t t t t t = = = 1 : the result of each quotient is the same, and the error esti-
mate in 1 should be exactly the same as for t
2
t t , etc.) So, proceed with the error calculation
using
2
0
t t = a d as the basic equation.

1. Evaluate the first term:
2 2
0.831 cm/s d t =
2. The relative uncertainty in the first term is
1 2 0.5
2 0.119
75 9.5
d t
d t

+ = + = .

3. The absolute uncertainty in the first term is .
2 2
0.119 0.831 cm/s 0.0986 cm/s =

4. Evaluate the second term:
2 0
2.947 cm/s
t

= .
5. The relative uncertainty in the second term is
0
0
1 0.5
0.0883
28 9.5
t
t

+ = + =

6. The absolute uncertainty in the second term is 0.0883 2.947 0.2604 = . (Ignore the sign
because we only want the magnitude of the error.)

7. Evaluate the result: ( )
2 2
0.831 2.947 cm/s 2.116 cm/s a = =

8. The absolute uncertainty in the result is ( )
2 2
0.0986 0.2604 cm/s 0.3590 cm/s + =

You can use the uncertainty estimate to determine the number of significant digits to re-
tain for the answer. With reference to the guidelines given in 1.3, would
be acceptable, but would be better.
2
2.12 0.36 m/s a =
2
2.1 0.4 m/s a =

14
Physics Laboratory Companion Error Propagation
Sometimes an elegant and easy-to-use error equation can be derived from the equation
used to calculate the result. If you can see a way to do this, you should. The previous example
doesnt really lend itself to this approach, but it can be used to illustrate the technique.

1. Let
2
A d t = and
0
B t = .

2. Then
2
2
2
1
2
d t
A
t
d
d
t d t
d
t t

| |
= +
|
\ .
| |
= +
|
\ .
and
( )
0
0
0
0
0 2
1
t
B
t
t t
t
t


| |
= +
|
\ .
= +


3. Since a A , B = +


0
0 2
1
2
a A B
d t
d
t
t t



= +
( | |
= + + +
| (
\ .



4. Now plug in all the values and do the arithmetic!


( )
( ) ( )(
2
2
1 2 75 cm
1 cm 28 cm/s 0.5 s 9.5 s 1 cm/s
9.5 s
9.5 s
0.36 cm/s
a

| |
= + + +
| (
\ .
=
)
(


Example 2:
1 1 1
z x y
= + can be solved for z as
xy
z
x y
=
+
, but this form wouldnt be appropriate
for the error calculation, since both x and y appear in both the numerator and the denominator.
The uncertainty in each term of the first form of the equation is the same, since they are all recip-
rocals. Simply apply the rule for calculating the error in a power, i.e.,
1
1
x
r x x

= = , and ignore
the negative sign since only the magnitude of the error is important.

1. The relative error in is
x
r
x
r x x
r x = , equal to the relative error in x.
2. Do the same for .
y
r
3. The absolute error in is
x
r
2
x
r x
x . =
4. Do the same for .
y
r
5. Calculate the absolute error in ,
z
r
z x y
r r

r
= + .
6. Calculate the absolute error in z,
2
z
z r
z = , or
2
2 2
y
x
z
z
x y

| |
= +
|
\ .
.

The significant result of this example is that the absolute error in the reciprocal is just the abso-
lute error in the quantity itself divided by the square of the quantity, as given in step 3.
15
Physics Laboratory Companion Error Propagation
Example 3: An equation that you might encounter in an experiment to determine the specific
heat of a substance is
w w g
s
s l c
c m T
c
m T m T

g
, in which is a known constant and all the other
quantities on the RHS of the equation are measured. Obviously, in this form the equation cannot
be used to work out the error because
w
c
g
T appears in both the numerator and the denominator.
Instead, rewrite the equation as
( )
w w
s
s l g
c m
m T T m
=
c
c

and proceed from here. Start with
( )
s l g
D m T T m =
c
and work out the relative error
D
D. Then
s w
c m
s w
D
c m D


= + , etc.

3.4 Probable Errors
The most elementary methods for propagating errors through calculations were presented
in 3.1, where rules for computing the maximum possible error were deduced. Such computa-
tions tend to inflate the error estimates because they assume that the measurement of each quan-
tity is correlated with every other one involved in the computation a worst case scenario.
However, it is often more reasonable to treat the measurement of the different quantities as being
completely independent (like orthogonal vectors), and under such an assumption we compute the
probable error in a quantity by adding the uncertainties in quadrature.

3.4.1 Addition and Subtraction
The rule for both is that the absolute errors are added in quadrature, weighted by the
square of their coefficients. Consider the case where the calculation is of the form

( , , ) f x y z ax by cz = + + , (3.7)

where the measured quantities with their associated uncertainties are
x
x , , and
y
y
z
z .
The probable error is given by

2 2 2 2 2 2
f x y
a b c = + +
z
. (3.8)

Equation (3.8) also applies when the calculation involves subtraction.

3.4.2 Multiplication and Division
The rule for both is that the relative errors are added in quadrature. Consider the case
where the calculation is of the form

cz by ax z y x f = ) , , ( . (3.9)

Regardless of whether multiplication or division are involved, the relative error in is given by f


2
2 2
f y
x z
f x y z

| |
| | | |
= + +
| | |
\ . \ .
\ .
. (3.10)
16
Physics Laboratory Companion Error Propagation
3.4.3 Powers
When a quantity is raised to some power, the error in the result is found by multiplying the rela-
tive (or percent) error in the quantity by the power. This is the same rule that was presented in
3.2.4 in the context of maximum possible error calculations. It may seem to contradict the rule
for propagating probable errors through multiplication, but the reasoning applied here is slightly
different. When we compute the probable error in a product of independently measured quanti-
ties, we assume that the uncertainties are not correlated. This isnt the case when a quantity is
raised to a power. For example, in
3
f x x x x = = , each occurrence of x simultaneously has the
same error. If the value of x increases in one term, it does so in all three terms.

3.5 Example Calculations Involving Probable Error

3.5.1 Addition and Subtraction
Consider the total mass of a system, given by
2 1
3m m m
T
+ = . The error in is then
T
m
2 2
1 2
9
T
= + . If m and kg 02 . 0 63 . 41
1
= kg 03 . 0 13 . 2
2
= m , then


2 2
(0.02 kg) 9(0.03 kg) 0.09 kg,
T
= + =

an the result would be expressed as kg. 09 . 0 76 . 43 =
T
m If the calculation had involved sub-
traction, i.e. , then the result would have been
2 1
3m m m
T
= kg 09 . 0 50 . 39 =
T
m .

3.5.2 Multiplication and Division
Multiplication
Consider a car travelling at a speed
for 100 5 km/h = 1 . 0 2 . 3 = t hours.
The distance traveled by the car is given by

100 km/h 3.2 h
320 km.
d t =
=
=

The relative error in the calculated distance
is

2 2
5 0.1
0.06
100 3.2
d
d

| | | |
= + =
| |
\ . \ .
.

In percentage terms, the uncertainty in the
distance traveled is 6%. The absolute error
in the distance traveled is

0.06 320 km 19 km.
d
= =


Division
Calculate the speed of a vehicle that trav-
els km 5 100 in 3 hours. The
speed of the vehicle is given by
1 . 0 2 .

100 km 3.2 h
31 km/h .
d t =
=
=


The relative error in the result is 0.06, ex-
actly the same as in the example for multi-
plication because the calculation involves
exactly the same numbers in exactly the
same way. However, the absolute error is
quite different:

0.06 31 km/h 2 km/h.

= =

17
Physics Laboratory Companion Error Propagation
3.5.3 Powers
In , . Then , or . How-
ever the calculation of errors involving powers can be a little tricky when the equation through
which the errors are being propagated is a bit more complex. For example, consider an equation
of the form . The absolute error in the first term is just
2
y x =
z x =
5.1 0.1 m 5.1 m 2% x = =
2 3
y +
2
26 m 4% y =
2
x
2
26 1 m y =
x and in the second
term. These two terms are then added in quadrature to give
2
3
y
y

( ) ( )
2
2
2
2 3
z x
x y = +
y
.


3.6 Differential Error Analysis
The basic rules for determining the uncertainty in a computed quantity when the compu-
tation involves addition, subtraction, multiplication, or division are relatively easy to apply. Its
also quite easy to derive expressions for the uncertainties propagated through the calculation of
trigonometric functions simply by using the identities for the sums and differences of angles. But
there are situations where the computations are more complex, so we need a more general way of
deriving expressions for the propagation of experimental errors.

The methods of differential calculus provide some insight as to what is needed. For ex-
ample, consider the Taylor expansion of the function ( )
x
f x :


2 3
( ) ( )
( ) ( ) ( ) ( ) ( )
2 ! 3!
x x
x x
f x f x f x f x f x

= + + (3.11)

The first term on the RHS of equation (3.11) is just the function itself, evaluated at the point x, so
all of the remaining terms taken together give the expression for the uncertainty in the function
. That is,
f


2 3
( ) ( )
( ) ( ) ( )
2 ! 3!
x x
f x
f x f x f x

= + + (3.12)

When the uncertainties are much smaller than the measured quantities themselves (something
that we always try to achieve in designing an experiment) then only the linear term on the RHS
of equation (3.12) contributes significantly to the uncertainty calculation. So, to a first order ap-
proximation, the uncertainty in the function f is given by

( )
f x
f x = (3.13)

The technique of differential error analysis is generalized for the computation of probable errors
in the following way. For a function of several variables, , the uncertainties in each
measured quantity propagate in quadrature as follows:
) , , , ( c b a f
) , , , ( c b a


2 2 2
2 2 2
( ) ( ) ( ) ( )
f a b c
f f f
a b c

| | | | | |
= + +
| | |

\ . \ . \ .

2
+ (3.14)

18
Physics Laboratory Companion Error Propagation
Example 1: An object experiencing a constant acceleration a, travels a distance
2
1
2
d a = t in
the time t. Simple differentiation gives
2
1
2
d a t = and d t at = . After applying equation
(3.14) and doing a little algebra we get


2 2
2
d a t
d a t
| | | |
= +
| |
\ . \ .

.

Note that the error in propagates the same way as presented earlier in the discussion of powers.
If the acceleration were a known constant with no error, then
2
t
2
d t
d t = .

Example 2: The focal length of a thin lens, expressed in terms of the image and object dis-
tances, is given by1 1 1 f a = + b . Its relatively easy to show, after differentiation and a little
algebra, that

2 2
2 2 2
f
a b
f a b

| | | |
= +
| |
\ . \ .


Example 3: The tension in a cord wrapped around a cylinder can be expressed as
) exp(
0
= T T
0
exp dT T
, where is the angle of contact. Differentiation with respect to gives
( ) d = . In this case, the (somewhat) surprising result is
T
T

= ; that is,
the relative error in the tension is proportional to the absolute error in the angle of contact.


Example 4: The index of refraction of an equilateral prism is given by ( ) ( )
2 2
sin sin
A D A+
= ,
where A is the apex angle, and D is the angle of minimum deviation. Its quite easy to show that


1 A
cot cot
2 2
A
A D
A

2
+ ( | | | |
=
| | (

\ . \ .
,

and that
1
cot
2 2
D
A D
D

+ | |
=
|

\ .
.

When these are put together in the form suggested by equation (3.14), the result is


2 2
2 2
1
cot cot ( ) cot ( )
2 2 2 2
A D
A D A A D

+ ( + ( | | | | | |
= +
| | | (
\ . \ . \ .
(

.
19
Physics Laboratory Companion Error Propagation
20

You might also like