Docsity

Error Analysis for the Physics Labs, Lab Reports of Physics

Toggle sidebar
bg1
97
Appendix A: Error Analysis for the Physics Labs
One of the main goals of the Physics Lab is that you learn about error analysis and the
role it plays in experimental science. This appendix briefly reviews the topics you will need to
know about error analysis.
(1) The Different types of errors
When you measure something, there are different types of errors you can make:
Illegitimate errors involve making gross mistakes in the experimental setup, in taking or
recording data, or in calculating results. Examples of illegitimate errors include: measuring
time t when you were supposed to be measuring temperature T, misreading a measurement on
a scale so that you think it is 2.0 when it should be 12.0, typing 2.2 into your spreadsheet
when you meant to type 20.2, or using the formula "momentum = mv2" rather than
"momentum = mv".
Random errors involve errors in measurement due to random changes or fluctuations in the
process being measured or in the measuring instrument. Random measuring errors are very
common. For example, suppose you measure the length of an object using a ruler and cannot
decide whether the length is closer to 10 or 11 mm. If you simply cannot tell which it is
closer to, then you will tend to make a random error of about ±0.5 mm in your choice.
Another example of a random error is when you try to read a meter on which the reading is
fluctuating. We say that "noise" causes the reading to change with time, and this leads to a
random error in determining the true reading of the meter.
A sampling error is a special kind of random error that occurs when you make a finite number
of measurements of something which can take on a range of values. For example, the
students in the university have a range of ages. We could find the exact average age of a
student in the University by averaging together the ages of all of the students. Suppose
instead that we only took a sub-group, or random sample of students, and averaged together
their ages. This sample average would not in general be equal to the exact average age of all
of the students in the University. It would tend to be more or less close to the exact average
depending on how large or small the group was. The difference between the sample average
and the exact average is an example of a sampling error. In general, the larger the sample, the
closer the sample average will approach the true average.
A systematic error is a repeated and consistent error that occurs in all of your measurements
due to the design of the apparatus. Examples of systematic errors include: measuring length
with a ruler which is too short, measuring time with a stopwatch which runs too fast, or
measuring voltage with a voltmeter which is not properly calibrated. Systematic errors can be
very difficult to detect because your results will tend to be consistent, repeatable and precise.
The best way to find a systematic error is to compare your results with results from a
completely different apparatus.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Error Analysis for the Physics Labs and more Lab Reports Physics in PDF only on Docsity!

Appendix A: Error Analysis for the Physics Labs

One of the main goals of the Physics Lab is that you learn about error analysis and the role it plays in experimental science. This appendix briefly reviews the topics you will need to know about error analysis.

(1) The Different types of errors

When you measure something, there are different types of errors you can make:

Illegitimate errors involve making gross mistakes in the experimental setup, in taking or recording data, or in calculating results. Examples of illegitimate errors include: measuring time t when you were supposed to be measuring temperature T, misreading a measurement on a scale so that you think it is 2.0 when it should be 12.0, typing 2.2 into your spreadsheet when you meant to type 20.2, or using the formula "momentum = mv^2 " rather than "momentum = mv".

Random errors involve errors in measurement due to random changes or fluctuations in the process being measured or in the measuring instrument. Random measuring errors are very common. For example, suppose you measure the length of an object using a ruler and cannot decide whether the length is closer to 10 or 11 mm. If you simply cannot tell which it is closer to, then you will tend to make a random error of about ±0.5 mm in your choice. Another example of a random error is when you try to read a meter on which the reading is fluctuating. We say that "noise" causes the reading to change with time, and this leads to a random error in determining the true reading of the meter.

A sampling error is a special kind of random error that occurs when you make a finite number of measurements of something which can take on a range of values. For example, the students in the university have a range of ages. We could find the exact average age of a student in the University by averaging together the ages of all of the students. Suppose instead that we only took a sub-group, or random sample of students, and averaged together their ages. This sample average would not in general be equal to the exact average age of all of the students in the University. It would tend to be more or less close to the exact average depending on how large or small the group was. The difference between the sample average and the exact average is an example of a sampling error. In general, the larger the sample, the closer the sample average will approach the true average.

A systematic error is a repeated and consistent error that occurs in all of your measurements due to the design of the apparatus. Examples of systematic errors include: measuring length with a ruler which is too short, measuring time with a stopwatch which runs too fast, or measuring voltage with a voltmeter which is not properly calibrated. Systematic errors can be very difficult to detect because your results will tend to be consistent, repeatable and precise. The best way to find a systematic error is to compare your results with results from a completely different apparatus.

(2) What is error analysis good for?

If you're like most students who have worked on these labs, you may find yourself wondering why you have to go through all of the trouble of using error analysis. In science and engineering, if you don't understand why you are calculating something, then you really are wasting your time. The most important thing to understand about error analysis is what it can do for you in the lab. There are four main things that you should use error analysis for: (i) Finding silly mistakes, such as typing a wrong number into your spreadsheet, using the wrong units, entering a wrong formula, or reading a scale wrong. These illegitimate errors must be corrected before your data can be meaningfully interpreted. (ii) Finding a more accurate value for a quantity by making several measurements. (iii) Determining the precision of your experimental results. (iv) Finding whether your results agree with theory or other experimental results.

It is important to realize that all of the formulas which follow only work for random errors! Despite this, performing error analysis on the random errors in an experiment can often reveal the presence of illegitimate errors. In fact, in these labs you will probably find this to be the most useful thing you can do with error analysis. How to use error analysis to find illegitimate errors is discussed in section 8.

(3) How to Estimate Experimental Errors

Random experimental errors describe our limited ability to measure the true values of physical quantities. To estimate the error in a measurement, you need to consider the measuring equipment that you used and how you actually made the measurement. There are a few cases you will encounter in the labs:

Ruler: One of the most common cases you will encounter involves using a ruler to measure a length. A ruler has a series of marks that are separated by a fixed increment. Suppose that you can very carefully align one end of the object with one of the marks, then the uncertainty in measuring the length of the object comes from the difficulty of figuring out exactly where the other end of the object falls on the ruler. If you can measure to the nearest mark ( i.e. decide which mark is closer to the length), then the worst mistake you will make is one-half of the distance between the marks. For the rulers used in the lab, the smallest division is usually 1 mm, so you should be able to measure to a precision of about ±0.5 mm. Since you will not always make the worst mistake, this is actually an overestimate of the typical mistake you can expect to make. A better estimate is about 0.3 mm or about 1/3 of the distance between the marks. This is called the “1/3 rule”. If you have good eyesight, are careful reading the value, and carefully align the ruler with the object, then you might be able to measure to ±0.25 mm. To determine whether you should use one half, one-third or one quarter of a unit as the error, you need to consider how carefully you read the scale when you took the data.

Pointer and scale: The next most common case you will encounter is taking a reading off of a scale that has a pointer that indicates the value. Such scales are found on analog voltmeters, ammeters, pressure gauges, and thermometers. The rule for estimating the error in such a "pointer and scale" instrument is exactly the same as for using a ruler. Most people can figure out which mark the pointer is closest to and this implies a worst case error of one-half the

Notice that Δx = ±1.04 is quite reasonable since this is about how far each measurement is from the average; x 1 =0 is 1.3 below the average, x 2 =2 is 0.7 above the average, x 3 =1.5 is 0.2 above the

average, x 4 =2.5 is 1.2 above from the average, and x 5 =0.5 is 0.8 below the average.

Radioactive decay and counting random events : Some experiments involve counting how many random events happen in a certain period of time, for example, counting how many atoms decay in a second in a radioactive material. How can we assign an error to such a measurement? Assigning an error can seem puzzling because in each second there is a definite integer-number of counts. The idea is that if we repeated the measurements many times, we would tend to find a different number of counts in the same time interval, even if the sample and detector were prepared in exactly the same way. By repeating the measurements many times, we could find the average number of counts in each time interval. In general, the average number of decays in a given time interval will be different from the number of decays found in an individual measurement. The difference between the average number of decays in a given interval and the number of decays found in one measurement can be though of as the error in the measurement. For random decays, the rule is very simple; if you measure N events, then the error in the measurement is ± N 1/2^. Thus if you measure 100 counts, the error is ±100 1/2^ = ± counts.

(4) How to Propagate Errors

Suppose you measure x and t and use these values to calculate a velocity v = x/t. If you have errors in x and t , what is the error in v? This is a problem involving the "propagation of errors". Such problems arise whenever you need to find the error in a quantity which is itself found by combining together measurements which have errors in them. To proceed let us first consider the simple case where v = x/t and the only error is Δx in x; i.e. Δt = 0. Now in general, we do not know the true value of x, but if the error in x were really Δx, then the true value of x would be xtrue = x+Δx. In this case, the true value of the velocity is not v=x/t but rather

.

t

x x vtrue

The difference between the true value of the velocity and our calculated value v=x/t would then be:

t

x t

x t

x x v vtrue v

. [A.2]

This is the correct expression for the error in v. Now notice that

t t

x x x

v 1 ^ = 

. [A.3]

If you are not familiar with the "∂/∂x" symbol you need to talk with your TA or professor. It is a partial derivative and means that you take the ordinary derivative of v with respect to x while keeping all other variables fixed. You need to use a partial derivative here because v is a function of more than one variable, and we want to find the change in v produced just when x is changed. Using Equations A.3 and A.2, we can write the error in v as

x. x

v v ∆ ∂

∆ = [A.4]

You should recognize this as just the ordinary result from calculus for finding the change in a function v when its argument x changes by a small amount Δx. Now suppose that there are random errors in both x and t, of magnitude Δx and Δt respectively, and we are trying to find the error in v = x/t. A derivation of this result is beyond the scope of this class, and we will simply quote the answer; viz.,

2 21 /^2

∆ = t t

v x x

v v [A.5]

There are three things to notice about this expression. First, if Δt = 0 then it reduces to Equation A.4. Second, this expression does not correspond to the usual rule from calculus for finding the change in a function v when x and t change by small amounts. This is because we are assuming that the errors in x and t are random and uncorrelated, so that they can work together or oppose each other in producing changes in v. Finally notice that this expression can be simplified by evaluating the derivatives. We can use A.3 to replace ∂v/∂x and also use:

t

x t

v =− ∂

[A.6]

We can then rewrite Equation A.5 as

t

t x

x v t

t v x

x v

t

t t

x t

x x t t

x x t

v

2 2 1 /^2221 /^2

2 2 1 /^2 x

2 1 /^2 2

2

+^ ∆
= ^ ∆
[A.7]

The above ideas can be generalized to include functions with errors in an arbitrary number of arguments. For example, if f is a function of x, y, z, t, r, and B, and these have random errors Δx, Δy, Δz, Δt, Δr, and ΔB respectively, then the error in f is just

B.
B

f r r

f t t

f z z

f y y

f x x

f f

2 2 2 2 2 2 1 /^2

∆ = [A.8]

The following examples illustrate some special cases that you will encounter in the labs.

(i) Suppose f = ax+b , where a and b are constants and x has an uncertainty Δx. The uncertainty in f can be found from Equation A.8 by noting that x is the only variable and ∂f/∂x = a. Thus,

[ ( )].

21 /^2

21 /^2 x a x a x x

f f = ∆ = ∆ 

(ii) Suppose f = x+y , where x has error Δ x and y has error Δ y. Then ∂f/∂x = 1 and ∂f/∂y = 1 and

(^12)

1

2 1

=

N

i

σ x N xi x. [A.11]

Excel Tip : In Excel you can use the command "=STDEV(..)" to automatically calculate the standard deviation of a set of data. For example, suppose you wanted to find the standard deviation of some data which was in cells D13 to D27. You would enter the command =STDEV(D13..D27) in the cell where you want the standard deviation to appear.

The standard deviation tells you how far a typical data point is from the average. If your data has a lot of scatter in it, then you will find a large standard deviation. If all of your measurements are practically identical, then the standard deviation will be quite small. Typically you would expect that a given measured value of x might be different from the true value by about Δx, the uncertainty in the measurement. Thus if the average value is a good estimate of the true value, you expect xi - ≈ Δ x Substituting this into Equation A.8, one finds that for large N

1 / 2 1 / 2 2

1 / 2

1

(^2) x N

N

x x N

N

x N

N

i

x (^)  ≈∆ 

=

Which is where Equation A.1 came from. There are some things about σx which can be confusing:

(i) Why is there a factor of (N-1) in the denominator instead of N? To understand why there is an N-1, suppose we make just one measurement; call it x 1. In this case the average is simply = x 1. Notice however that Equation C.8 says that the standard deviation is undefined because N=1. The reason it is undefined is because with only one measurement, it is not possible to say how much spread there is in the data. That requires at least two measurements.

(ii) Why do we take the square each of the terms? If we did not take the square, but just added together all of the terms x (^) i - , we would get zero. To see this, just look at the definition of ! The point is that data which falls below the average is balanced by data which falls above that average. Roughly speaking, by taking the square, we make all the terms positive and end up finding the (root mean square) distance of a typical data point from the average, independent of whether it is above or below the average.

(iii) Does σx get bigger if we measure more data points? No. The standard deviation does not tend to get bigger (or smaller) as you take more data points. Physically speaking, σx is just the typical distance a data point is from the average. As you take more data, you tend to get a more accurate value for the true value of σx, not a bigger value.

(7) The weighted mean and the error in the weighted mean Δ

In some of the labs, you will need to find the best estimate for a measured parameter by combining together measurements which have different sizes of errors. For example, in 261 Lab 2, some of your measurements will be made with a ruler and some with vernier calipers. The measurements made with the calipers will be much more accurate than those taken with the ruler. If we want to combine together data from measurements with different errors, we need to use the weighted average, which is defined by

∑

∑

=

=

N

i (^) i

N

i (^) i

i

x

x

x

x

1

2

1

2

. [A.12]

Notice that in this expression, each measurement gets multiplied by 1/ Δ xi^2 before it is

added to the other measurements. The factor 1/Δxi^2 can be thought of as the importance or "weight" of the measurement. Thus if Δx 1 = 1 mm and Δx 2 = 0.1 mm, then the second

measurement is 100 times more important that the first. From this you can see that it really pays to make more accurate measurements, they carry a lot of weight! If we want to simplify Equation A.12, we can define the weight of the i-th measurement as wi, where

wi = 1/Δxi^2 , [A.13] and rewrite Equation A.12 as

=

N

i

i

N

i

i i

w

wx x

1

1. [A.14]

Notice that the denominator is just the sum of all of the weights, so that it acts to normalize out the total weight of all the measurements. The error in the weighted mean is given by

( )

(^12)

1

(^12)

1

2

= =

N

i

i

N

i (^) i

w x

x. [A.15]

Notice that the error in the weighted mean is just the square root of the same term which appears in the denominator of the weighted average. If you want to remember this result, notice that it is just says that the error in the average is one over the square root of the total weight. Squaring an rearranging would give you an equation which says that the total weight is one over the square of the error in the mean. This is the same relationship as Equation A.13, except now it is for the mean rather than an individual measurement.

Excel Tip : Excel does not have a command for calculating the weighted mean or the error in the weighted mean. The easiest way to calculate the weighted mean is to set up three columns, the first with the data in it, the second with 1 over the square of the error in each measurement, and the third

The degrees of freedom ν In order to use χ^2 you also need to know ν, the "degrees of freedom" in your experiment. In these labs there are only two cases of practical importance:

(i) You did not use any fitting parameters or averages to compute the theoretical values used in χ^2. If the theory is given and you did not use any of your data to fit the theory to the data, then the degrees of freedom is equal to the number N of data points, i.e. ν=N.

(ii) Fitting parameters or averages were used to find the theory. If you computed your theoretical values (used in χ^2 ) by averaging your N data points or by using a fitting routine, then ν = N-α, where α is the number of fitting parameters you used. For example, if x (^) theory = then you computed one parameter, the average, from your data, so that α = 1 and ν = N-1. If you used Excel to fit your data to a straight line, and used the slope and intercept of the line to compute theoretical values, then you used two fitting parameters (slope and intercept), so that ν = N-2.

χ^2 /ν and what it tells you about your experiment Once you have found χ^2 and ν, it is a simple matter to divide the two and find χ^2 /ν the "reduced value of χ^2 ". What makes χ^2 /ν so important is what it can tell you about your experiment. There are three cases:

(i) χ^2 /ν ≈ 1. This means that your results and theory are consistent to within your experimental errors.

(ii) χ^2 /ν >> 1. This means that something is wrong! There are three possibilities: (a) You have made an illegitimate error in measuring the data, calculating the theory, recording your data or errors, or analyzing your data. To determine if this is what happened, you need to go back and look at your data and theory and see if the numbers are reasonable. Be especially careful of units. (b) You have underestimated the size of the errors you are making in your measurements, or, the quantity you are trying to measure has a distribution of possible values. To determine if this is what happened, look at the scatter in your data and see if it is much larger than your estimated error. (c) If you can rule out (a) and (b) above, then having χ^2 /ν much bigger than 1 means that the theory is wrong.

(iii) χ^2 /ν << 1. This also means that something is wrong! There are only two possibilities: (a) You have overestimated the size of your errors, that is, you have actually measured things much better than your claimed errors. You need to go back and get a more accurate, and less conservative, estimate of your errors. (b) You have made an illegitimate error in calculating χ^2 /ν. Most likely you have neglected units or made a simple computational error.

What is P(χ^2 , ν) and how do you find it You may be wondering how much bigger or smaller than 1 that χ^2 /ν has to be for something to be clearly wrong, or how close to 1 does χ^2 /ν have to be for you to say that the theory and experiment agree. This can only be answered by considering the quantity P(χ^2 /ν). Suppose you have found a value for χ^2 and that you have ν degrees of freedom. Then P(χ^2 ,ν) is the probability that random errors will cause χ^2 to be larger than you found.

Excel Tip: The easiest way to get P(χ^2 , ν) is directly from Excel by typing in the command =CHIDIST(χ^2 , ν). For example, if your value of χ^2 is 3 and you have five degrees of freedom, then you would type in =CHIDIST (3,5). See the help manual in Excel for more information.

Values does P(χ^2 , ν) can also be obtained from the following table.

To find P(χ^2 , ν) from the table by using the following procedure: (i) The left hand column lists ν, the degrees of freedom. Find the row which has the degrees of freedom for your experiment. (ii) Next, proceed from left to right along this row until you reach the cell which has your value of χ^2 /ν. Notice that the values increase as you go along a row from left to right. If your value of χ^2 /ν isn’t listed in the table, just choose the cell in your row which has the value which is closest to your value of χ^2 /ν. (iii)Once you have found the cell with your value of χ^2 /ν, look at the cell at the very top of this column. This is the value of P(χ^2 , ν) for your χ^2 and ν.

For example, suppose that you have N =9 measurements, you used one fitting parameter, and you computed χ^2 =12. The degrees of freedom is thus ν =N –1 =9 –1 =8 and the reduced χ^2 is χ^2 /ν =12/8 =1.5. Since ν=8, we first find the ν=8 row. Looking along this row, we see the values 0.206, 0.342, 0.436, 0.691, 0.918, 1.191, 1.670, etc. Since our value of χ^2 /ν is 1.5, the closest value listed in the row is 1.670. Looking at the top of this column we find the number 0.10. Thus P(χ^2 =12, ν =8) is equal to about 0.1. This means that there is about a 10% chance that random errors would produce a value of χ^2 which is larger than 12.

There are a few other things that may be useful to understand about P(χ^2 , ν). First, it provides the same information as χ^2 /ν, but it does a better job. In particular, it tells you precisely how much bigger or smaller χ^2 /ν has to be compared to 1 to decide something is wrong. Second, P(χ^2 , ν) must be understood statistically. If you find P(χ^2 =8, ν =8)=0.5, this does not mean that the theory is definitely correct. Rather, it means that the theory is statistically consistent with the data. Similarly, P(χ^2 , ν)=0.01 does not mean that your theory is definitely wrong or that you have necessarily done anything wrong; in fact, 1% of the time you should expect to find P(χ^2 , ν)=0.01. It just says that you wouldn't expect this to happen more than 1% of the times you tried the experiment, so you better check things to see if something else isn't wrong.

The 5% to 95% confidence limits Finally, the standard or conventional choice is to say that if P(χ^2 , ν) is smaller than 0. or larger than 0.95, then this signifies a significant disagreement between theory, data and errors. That is why we chose the specific values of 0.05 and 0.95 in the above discussion of the meaning of P(χ^2 , ν). In other words, if you find 0.05<P(χ^2 , ν) <0.95 then there is not a statistically significant disagreement between your data and the theory and you can say that your data and theory are in agreement, given the size of your error bars. On the other hand, if you find P(χ^2 , ν)

0.95 or P(χ^2 , ν) <0.05 then there is a significant disagreement between your data and the theory or accepted value.

χ^2 and the two-sigma rule Suppose you have measured a value for a parameter x to an uncertainty σx and need to figure out if it agrees with an accepted value x (^) theory. From these three values you can calculate χ^2 using: 2 2  

x

x xtheory

In this case there is just one degree of freedom so that v = 1. For the data and the theory to be in agreement means you would need to have P(χ^2 , ν) > 0.05. Examining the table above for v = 1, we see that P(χ^2 , ν) > 0.05 means that χ^2 < 3.841. Plugging this into the above expression for χ^2 gives:

[ ( x − xtheory ) σ x ] 2 < 3. 841

which gives:

x − xtheory < 1. 96 σ x ≈ 2 σ x

This is the “ two-sigma rule ”. It says that a measured value and the accepted value are in agreement provided they differ by no more than about twice the uncertainty in the measured value. Another way to say this is that if your data point is no more than two error bars from the accepted value then the disagreement is not significant.

(9) Summary of Some Error Analysis Results

In the following formulas, x (^) i denotes the i-th measurement of the quantity x, Δxi denotes the estimated random experimental error in x (^) i, and a total of N measurements were made.

Propagation of Errors; suppose f is a function of the variables x 1 , x 2 ,..., xN.

The error in f due to errors in x 1 , x2 ,..., x (^) N is 2

1

=

i i

N

i

x x

f f

Standard Deviation , in Excel use STDEV(..),

( ). 1

1 / 2 2 1

=

x x N i

N

i

σ x

Note : For most experiments, one expects that σx ≈ Δxi, i.e. the standard deviation is about equal to the estimated experimental error in one measurement of x.

Mean , in Excel use AVERAGE(..), Error in the Mean (use if each measurement has the (each measurement same experimental error) has experimental error Δx):

i

N

i

x N ∑ x

=

1

1 N

x x

Weighted Mean : Error in Weighted Mean:

[ ]

[ ]

=

=

N

i (^) i

N

i (^) i

i

x

x

x

x

1 2

1

2

1 [ ]

1 / 2 2 1

= (^) i

N

i x

x

χ^2 (chi-squared): reduced χ^2 :

2

1

2  

= (^) i

N i theory

i x

x x

v

... should equal about 1 for a good fit

Degrees of freedom in χ^2 ......... ν = N-α (where N is the number of measurements and α is the number of fitting parameters used to find the theoretical value from the data)

Data and theory are in agreement if 0.05 < P(χ^2 , ν) <0.

“ two-sigma rule ”: a measurement and accepted value are in agreement if they differ by less than two error bars.