Você está na página 1de 8

Introduction to Error Analysis

Physics 15b, 15c

February 2, 2005

REV0; February 2, 2005

1 Introduction: Errors are not Mistakes


All measurements, however careful are subject to some uncertainties. Error analysis is the study of these uncertainties,
its function being both to allow you to estimate how large they are and to help you to reduce it when possible. Often
error analysis is an abused and neglected part of an experimental course, thus becoming a meaningless ritual, in
which you have to add a few lines of calculation to the end of your lab report simply because the instructor has said
to do so. The present notes on error analysis were written with the conviction that any student, even one who has
never heard of the subject should be able to learn what error analysis is, why it is interesting and important, and
how to use the basic tools of the subject in laboratory reports.
From now on, when we refer to “errors” we mean the inevitable uncertainty that attends ALL measurements. As
such, errors are not mistakes; you cannot possibly avoid them by being careful.

1.1 Estimating uncertainties when reading scales

Let us see now how one can actually evaluate the magnitude of an uncertainty. You are going to perform some
simple measurements for which it is easy to make a reasonable estimate of the uncertainty, often using no more
than common sense. The first example is a measurement using a marked scale, such as the ruler in Figure 1 or the
voltmeter in Figure 2.

0 10 20 30 40 50 60 70

Figure 1. Measuring a length with a ruler

4
3 5

2 6

1 7

0 8

Figure 2. A reading on a voltmeter

1
Error Analysis 2

To measure the length of the pencil you must place the end of the pencil opposite the zero of the ruler and then
decide where the tip comes to on the ruler’s scale. To measure the voltage you have to decide where the needle points
on the voltmeter’s scale. Assuming that the voltmeter and the ruler are reliable, in each case the main problem is to
decide where a certain point lies in relation to the scale markings. You can reasonably decide that the length of the
pencil is undoubtedly closer to 36 mm than it is to 35 or 37 mm, but that no more precise reading is possible. You
would therefore state your conclusion as
best estimate of length = 36 mm (1)
probable range, 35.5 to 36.5 mm
and you would say that you measured the length to the nearest millimeter.
This type of conclusion–that the quantity lies closer to one given mark than to either of its neighboring marks–is
quite common. For this reason we can introduce the convention that the statement ` =36 mm without any other
qualification is presumed to mean that ` is closer to 36 than to 35 or 37, i.e. 35.5 mm ≤ ` ≤ 36.5 mm. In the
same way a measurement of x giving x=1.27 without any stated uncertainty would be presumed to mean that x lies
between 1.265 and 1.275. On the voltmeter the spacing of the marking is larger and you can realistically estimate
that the voltage shown might be
best estimate of voltage = 5.3 volts (2)
probable range, 5.2 to 5.4 volts
The process of estimating positions between the scale markings is called interpolation.

1.2 How to report uncertainties

Best estimate ± Uncertainty

The measurement of Voltage recorded in (2) is usually stated as follows:


measured value of voltage = 5.3 ± 0.1 volts (3)

This equation is exactly equivalent to the two statements in (2). In general the result of any measurement of a
quantity x is stated as
(measured value of x) = x ± δx. (4)

According to the statement (4) you are reasonably confident that the value of the quality you measured lies somewhere
between xbest − δx and xbest + δx. The number δx is called the uncertainty, or error in the measurement of x. It is
convenient to define the uncertainty dx to be positive, so that xbest + δx is always the highest probable value and
xbest = δx the lowest.

Significant figures

Since δx is an estimate of an uncertainty , it should not be stated with too much precision. Do not ever report:
(measured value of x) = 9.82 ± 0.02385 . This would be absurd because it is inconceivable that the uncertainty in
the measurement can be known to four significant figures. It makes sense to write (measured value of x) = 9.82 ±
0.02 . There is an exception to this rule. When for example a calculation yields a δx = 0.14 you must not round it
to δx = 0.1; this would be a substantial proportionate reduction. Also a statement like
measured speed = 6051.78 ± 30 m/sec
is not acceptable . The uncertainty of 30 means that the digit 5 in the third place of 6051.78 might really be as small
as 2 or as large as 8. Clearly the trailing digits 1,7 and 8 have no significance at all and should be rounded off. The
correct statement would therefore be
measured speed = 6050 ± 30 m/sec
So you reach a general rule that the last significant figure in any stated answer should usually be of the same order
of magnitude (in the same decimal position) as the uncertainty.
Error Analysis 3

Again you should be careful in a case where for instance you report
measured length = 27.6 ± 1 cm
This IS acceptable since one could argue that to round it to 28 1 cm would be to waste information. Notice that
here the leading digit of the uncertainty is small, where small is 1 or perhaps 2 (but not any larger than 2).

Units

Make sure that you report your measurement putting the answer and uncertainty in the same form, followed by the
dimension i.e.
measured charge = (1.61 ± 0.05) × 10−19 coulombs
instead of
measured charge = 1.61 × 10−19coulombs ±5 × 10−21 coulombs

Discrepancy

If two measurements of the same quality disagree, then we say that there is a discrepancy. Numerically we define
the discrepancy between the two measurements as their difference. It is important to recognize that a discrepancy
may or may not be significant. If two students measure the same resistance and get the answers
40 ± 5 ohms
and
42 ± 8 ohms
the discrepancy of 2 ohms is less than their uncertainties; the two measurements are consistent and the discrepancy
is insignificant. If the two answers had been
35 ± 2 ohms
and
45 ± 1 ohms
the two measurements would be clearly inconsistent and the 10 ohms discrepancy would be significant.

Fractional Uncertainties

The quality of a measurement is indicated not just by the uncertainty δx, but also by the ratio δx to xbest. We need
to consider the fractional uncertainty,
fractional uncertainty= |xδx
best |
(5)
The fractional uncertainty is often called the relative uncertainty or the precision. |xbest| is the absolute value of
xbest. Notice that the fractional uncertainty is a dimensionless quantity and by multiplying it by 100 it can be
reported as a percentage uncertainty. For example the measurement
length ` = 50 ± 1 cm (6)
δ` 1
has a fractional uncertainty `best
= 50
= 0.02 and can be reported as
length ` = 50 cm ± 2%
Fractional uncertainties of 1% or 2% characterize fairly accurate measurements.

1.3 Propagation of uncertainties-The rules

Uncertainty in sums and differences

Suppose that x,. . . ,w are measured with uncertainties δx,...,δw, and the measured values are used to compute
Error Analysis 4

q = x + ... + z − (u + ... + w) (7)


If the uncertainties in x,...,w are known to be independent and random, then the uncertainty in q is the quadratic
sum p
δx = (δx)2 + . . . (δz)2 + . . . (δu)2 + . . . (δw)2 (8)
of the original uncertainties. In any case δq is never larger than their ordinary sum,
δq ≤ δx + .. + δz + δu + ... + δw (9)

Uncertainties in products and quotients

Suppose that x,...,w are measured with uncertainties δx,...,deltaw, and the measured values are used to compute
x×...×z
q= u×...×w (10)

If the uncertainties in x,...,w are independent and random, then the fractional uncertainty in q is the sum in quadrature
of the original fractional uncertainties,
q
δq
|q|
= ( δx
x
)2 + . . . + ( δz
z
)2 + ( δu
u
)2 + . . . + ( δw
w
)2 (11)
In any case, it is never larger than their ordinary sum,
δq δx δz δu δw
|q| ≤ |x| +...+ |z| + |u| + ...+ |w| (12)

You would notice that the addition in quadrature for independent random uncertainties is not presently justified.
We only argue that when the various uncertainties are independent and random, there is a good chance of partial
cancellations of errors, and that the resulting uncertainty (or fractional uncertainty) should be smaller than the
simple sum of the original uncertainties (or fractional ones); the sum in quadrature does have this property.

Arbitrary functions of one variable

Suppose you have measured a quantity x in the standard form xbest ± δx and wish to calculate some known function
q(x), such as q(x)=1/sin x. One simple way is to draw a graph of q(x) as in figure 5. The best estimate for q(x) is
of course qbest = q(xbest). You see that to decide on the uncertainty dq you need to find qmax = q(xbest + δx). This
you can do using the graph. Similarly you can find qmin = q(xbest − δx). If the uncertainty δx is small, as we always
suppose it is, then the section of graph involved in the construction of δq is approximately straight and it is easily
seen that qmax and qmin are equally spaced on either side of qbest.

q
q(x)
δx
δx

qbest-δx xbest xbest+δx


Error Analysis 5

Figure 3. Graph of q(x) versus x.


If x is measured as xbest ± δx, then the best estimate for q(x) is qbest = q(xbest). The largest and smallest probable
values of q(x) correspond to the values xbest ± δx of x.

Usually, however the function q(x) is known explicitly i.e. q(x)=sin x; the uncertainty δq can be calculated analyti-
cally. From figure 5 you can see that
δq = q(xbest + δx) − q(xbest) (13)
From calculus you know that for any function q(x) and any sufficiently small increment u,
dq
q(x + u) − q(x) = dx u (14)
Thus, provided the uncertainty δx is small, we rewrite (13) to give
dq
δq = | dx |δx (15)
Therefore to find the uncertainty δq, you just calculate the derivative dq/dx and multiply by the uncertainty δx.
In general if x is measured with uncertainty δx and is used to calculate the function q(x), then the uncertainty δq is
dq
δq = | dx |δx, (16)
where using the absolute value you include the case dq/dx being negative. A simple application is the following:
suppose you have measured an angle θ as θ = 20±3 deg, and you wish to find cos θ. Your best estimate of course is
cos 20◦ = 0.94, and the uncertainty is
δ(cosθ) = | dcosθ

|δθ = |sinθ|δθ(in rad) (17)
δθ must be expressed in radians, because the derivative of cos θ is sin θ , only if θ is expressed in radians. You
therefore rewrite δθ = 3◦ as δθ=0.05 rad; then (17) gives
δ(cosθ) = (sin20◦ ) × 0.05 = 0.02 (18)

Your final answer should be


cosθ = 0.94 ± 0.02 (19)
In much the same way one can derive the uncertainty in a function of several variables; suppose that x,...,z are
measured with uncertainties δx,...,δz, and the measured values are used to compute the function q(x,...,z). If the
uncertainties in x,...,z are independent and random,
q then the uncertainty in q is
∂q 2
δq = ( ∂x ) + . . . + ( ∂q
∂z )
2 (20)
In any case, it is never larger than the ordinary sum
∂q ∂q
δq ≤ | ∂x |δx + . . . + | ∂z |δz (21)

Random and Systematic Errors

Experimental uncertainties that can be revealed by repeating the measurements are called random errors; those that
cannot be revealed in this way are called systematic errors.
Suppose that you have eliminate all systematic errors. By repeating your measurement several times you can detect
all the remaining random sources of uncertainty. Your best estimate would be the average or mean x̄. Therefore

P P
x1 + x2 + . . . + xn i xi xi
xbest = x̄ = = =
N N N
(22)
where i=1,...N and N is the number of measurements.

The standard deviation of the measurements x1, x2, ...,xN is an estimate of the average uncertainty of the mea-
surements. The difference x-x=d is called the deviation or residual of x from x and it tells you how much the ith
measurement x differs from the average x. The average of the deviations, dav , is not a useful way to characterize
Error Analysis 6

the reliability of your measurements since di is sometimes positive and sometimes negative, so there is chance that
dav becomes zero. The best way to avoid such case is to square all the deviations, which will create a set of positive
numbers, and then average them. If you take the square root of the result you obtain a quantity with the same unit
as x itself. This number is called the standard deviation of x1, x2, ..., xN = and is denoted by σx:
qP qP
(xi−x)−2 (di)2
σx = N = N (23)

With this definition the standard deviation can be described as the root mean square (or R.M.S.) deviation of the
measurements and it is the average uncertainty of the N measurements. However, although this
√ is not proved here,
the uncertainty in the final answer, x=x turns out to be the standard deviation divided by N. This quantity is
called the standard deviation of the mean and is denoted σxav .
δx = σz̄ = √σ (24)
N

There is another class of errors which is not easy to detect and for which statistical analysis is not generally useful.
This is the class of systematic errors, such as those which result reproducibly form faulty calibration of equipment or
from bias on the part of the observer. These errors must be estimated from analysis of the experimental conditions
and techniques. In some cases corrections can be applied to the data to compensate for systematic errors where the
type and extent of the error is known. In other cases, the uncertainties resulting from these errors must be estimated
and combined with uncertainties from statistical fluctuations. For the experiments you are going to perform you
must take it for granted that in the absence of more specific information, meters should be considered to introduce
some definite systematic error.

Plotting graphs with error bars

Assume a physical quantity y being proportional to the quantity x with c being the constant of proportionality; thus
y=cx. You can test whether y is proportional to x by plotting the measured values of y versus those of x and seeing
whether the resulting points do lie on a straight line through the origin. If you measure y for a variety of different
values of x and plot your measured values of y and x, it is most unlikely that the resulting points will lie exactly on a
straight line. The question is whether this is just due to experimental uncertainties (as you would hope), or because
you have made mistakes, or even because the quantity y is not proportional to x. To decide which the case is, you
must consider your errors.
For simplicity suppose first that x is known so accurately that it has only negligibly small uncertainty and that all
measurements of y have an uncertainty of δy. Write down your measurements and the uncertainties on a table and
plot y versus x. Your first experimental point (x1, y1 ) on the graph lies on the vertical line x = x1 , somewhere
between y = y1 − δy and y = y1 + δy. This is indicated in figure 4(a) where a vertical error bar is drawn through
each point, to indicate the range in which it most probably lies. Obviously you should expect to find a straight line
that goes through the origin and passes through or close to all the error bars. Then you would conclude that the
data on which figure 4(a) is based are consistent with y being proportional to x. By measuring the slope of the line
you can find the constant of proportionality. By drawing the steepest and least steep lines that seem to fit the data
reasonably well, you can also find the uncertainty in this value for c. Check now the situation illustrated in figure
4(b). With the results shown there you would have to recheck your measurements and calculations (including the
calculation of the uncertainties) and to consider whether there is some reason that y is not proportional to x.
If both y and x are subject to appreciable errors then you can display them by drawing both vertical and horizontal
error bars through each point, the length of each arm being equal to the corresponding uncertainty as shown in figure
5.
Error Analysis 7

y
y

y1 δy
x
δy

x1 (a) x (b) x

Figure 4(a). Plot of y versus x with error bars to show the uncertainties in y.
(b) In this case y is not proportional to x.

Figure 5. Measurements with uncertainties in y and x can be shown by crosses made of one error bar for y and one
for m.
When a physical quantity y is proportional to the square of x , plotting y versus x should yield a parabola. A
procedure to observe that y = cx2 is to plot y against x2 and then you have a straight line through the origin.
Similarly if y is proportional to an exponential function exp[Ax] then a graph of ln y versus x should be a straight
line.
Data that should fit a straight line

If you were to measure N different values x1 , x2, . . . , xN and the corresponding values y1 , y2 , ..., yN and if your
measurements were subject to no uncertainties then each of the points (xi,yi) would lie exactly on the line y=A+Bx.
In practice there are uncertainties and the most you can expect is that the distance of each point (xi,yi) from the line
will be reasonable compared to the uncertainties. The fitting procedure is to find the best estimates for the constants
A,B based on the data (xi,yi). The analytical method of finding the best line to fit a series of experimental points
is called linear regression, or the least-squares fit for a line, and is the main subject of this unit. The following two
equations, known as normal equations are easily solved to give the least-squares estimates for the constants A and
B. They are derived if you assume that the measurement of each yi is governed by the Gaussian distribution and
take the probability of obtaining your complete set of measurements.
Error Analysis 8

P P P P
( x2i )( yi )−( xi )( xi yi )
A= ∆ (26)
P P P
N( xi yi )−( xi )( yi )
B= ∆ (27)
P P
where ∆ = N (( xi ) 2 − ( xi ) 2 )
The uncertainty in the measurements y1 , y2, ...yN is
rP
(yi −A−Bxi )2
σy = N −2 (28)

You notice the factor N-2. An attempt to justify this is the following: First, as long as N is moderately large,
the difference between N and (N-2) is unimportant anyway. Second, the factor N-2 is reasonable if we consider
measuring just two data points. With only two point you can always find a line that passes exactly through these
points and the least-squares fit will give you this line. Since both points lie exactly on the best line, the two terms
of the sum in (28) are zero. If (28) had the denominator being equal with N you would get an absurd answer of
σy = 0; with N-2=0 in the denominator you get σy = 0/0, indicating correctly that σy is undetermined after only
two measurements. (A more sophisticated statistical analysis involves the concept of the degrees of freedom ,not the
number of measurements appearing in the denominator). The uncertainties in A and B are given by simple error
propagation in terms of those in y1 , y2 , . . ., yN . It is
qP
(xi )2
σA = σy ∆ (29)
q
σB = σy N ∆
(30)

Many advanced calculators nowadays have least square fitting capabilities which greatly simplifies the process of
multiplying sums of numbers.
(End of Document); error jan04.tex; February 2, 2005

Você também pode gostar