KEMBAR78
Physics Lab Error Analysis Guide | PDF | Significant Figures | Observational Error
0% found this document useful (0 votes)
60 views72 pages

Physics Lab Error Analysis Guide

This document provides an introduction to data analysis and error analysis for a physics laboratory course. It discusses the importance of error analysis, sources of error in experiments, different types of errors, and how errors propagate when quantities are dependent on measurement results. The document is intended for exclusive use by the Department of Physics at the University of Groningen.

Uploaded by

fltelperion
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views72 pages

Physics Lab Error Analysis Guide

This document provides an introduction to data analysis and error analysis for a physics laboratory course. It discusses the importance of error analysis, sources of error in experiments, different types of errors, and how errors propagate when quantities are dependent on measurement results. The document is intended for exclusive use by the Department of Physics at the University of Groningen.

Uploaded by

fltelperion
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

Physics Laboratory 1

Data and error analysis


2020 - 2021

0.24

0.23

0.22
c/ν − λair (nm) = (nair − 1) λair

0.21

0.2

0.19

0.18

0.17 nair − 1 = 0.000275

0.16
600 650 700 750 800 850 900
λair (nm)

Dr. J.S. Blijleven


Physics Laboratory 1
Data and error analysis
Dr. R.J.H. Klein-Douwel, Dr. J.S. Blijleven
September 2020

Adapted from the 2019 edition (the section on χ2 testing is adapted from the book by
prof. dr. H.J.C. Berendsen [4], the section on the Poisson distribution contains material
from Ref. [2]). Cover graph based on data given in Ref. [17].

For exclusive use within the Department of Physics of the University of Groningen.
Contents

1 Introduction 5

1.1 Why error analysis? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2 Sources of error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3 Error classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.4 Internal and external error estimates . . . . . . . . . . . . . . . . . . . . . 7

1.5 Rounding off and notation of measurement results . . . . . . . . . . . . . . 8

1.6 Accuracy versus precision . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.7 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 Propagation of errors 11

2.1 Quantities dependent on a single variable . . . . . . . . . . . . . . . . . . . 11

2.2 Quantities dependent on more than one variable . . . . . . . . . . . . . . . 13

2.3 Dependent errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3 Stochastics 19

3.1 Limit distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.2 Some statistical quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.3 Gaussian distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.3.1 Meaning of standard deviation . . . . . . . . . . . . . . . . . . . . . 26

3.4 Poisson distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3
4

3.4.1 Standard deviation of the Poisson distribution . . . . . . . . . . . . 29

4 Statistical error 31

4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.2 Best estimates for average and standard deviation of a Gaussian distribution 32

4.3 Standard error in the mean . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.4 Accuracy of the error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5 Further topics in statistical analysis 37

5.1 Weighted average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.2 Parameter estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.2.1 Graphical error analysis, estimation by eye . . . . . . . . . . . . . . 39

5.2.2 Method of least squares . . . . . . . . . . . . . . . . . . . . . . . . 42

5.2.3 Chi-square test for goodness of fit . . . . . . . . . . . . . . . . . . . 44

6 Exercises 49

A Dimensional analysis 63

B List of symbols 65

Bibliography 69
Chapter 1

Introduction

1.1 Why error analysis?

In general it is not possible to indicate the true (exact) value of a physical quantity when
it is determined experimentally. The causes for this are to be sought in the experiment
itself, the equipment used and in the person(s) doing the experiment.

The difference between the measurement result and the true value of the quantity sought
is called the error in the measurement result. It is not an error in the sense that it is
a mistake, something which can be avoided or infinitely improved, but rather something
inevitable. A better term may be measurement inaccuracy, but the word error has become
so commonplace in physics that it will also be used here.

In many instances measurement results are used to calculate some other quantity. The
presence of errors in the measurement results therefore implies that there is also an error in
the final calculated quantity. Error analysis describes how errors in separate measurements
propagate and influence the final result.

The presence of errors implies that an experimenter should not only give a single number
as a result, but also the error in this number. This error indicates in which interval the
result lies, either with certainty of with a certain probability.

Error analysis is necessary when comparing the results from different observers for the
same experiment, or when comparing different methods to obtain a specific quantity.
A theoretical result can only be compared to an experimental one if the errors in the
results are known. Error analysis is important to determine which apparatus is best
used to obtain a certain accuracy. It is also important for establishing which part of the
experiment should receive the most attention, if the error in a specific intermediate result
will have a large influence on the final result.

5
6 CHAPTER 1. INTRODUCTION

1.2 Sources of error

Possible errors during an experiment are among others reading errors, adjustment errors,
methodical errors, instrumentation errors and errors in the experimental setup. Some
examples are given of each category.

• reading error: when reading a value from a scale (for instance of a volt meter), a
reading error always occurs. This may be caused by the need to interpolate between
two indicated scale values or because parallax occurs. Parallax originates from the
fact that the indicating needle is not in the same plane as the scale with indicated
values, but slightly above it. The value read from the scale therefore depends on
the direction from which the needle and scale are viewed. Often a mirror is present
on the scale to aid in minimizing parallax. The magnitude of the error depends on
the instrument. If the scale markers are relatively far apart (e.g. a volt meter with
not too many scale divisions), then it may be possible to achieve a reading error of
1/10 of the smallest scale division. If the scale markers are much closer, for instance
mm marks on a common 30 cm ruler, then it may be possible to achieve a reading
error of only 1/2 or 1/4 of the smallest scale division. Note that the reading error
occurs twice, if the value for a zero measurement has to be read as well.

• adjustment error: when adjusting a certain quantity in an experiment (the in-


dependent variable), an error is made as well. Examples are adjustment of the
frequency of a frequency generator or the temperature of a thermostat. An adjust-
ment error can also be present in a dependent variable, for instance when adjusting
a screen to obtain a sharp image made by a lens. The magnitude of the error can
be estimated by varying the adjustment (frequency, screen distance) and noticing
when the result starts to deviate significantly.

• methodical error: this arises if a measurement instrument influences the quantity


to be measured. For example a vernier caliper compresses the object it measures, a
thermometer influences the temperature because of its own heat capacity or a volt
meter disturbs the electrical circuit to which it is connected.

• instrumentation error: due to the calibration accuracy of an apparatus (which


is not infinite) or to an apparatus not meeting its specifications (any longer).

• errors in the experimental setup: these can occur if a theory describing the
experiment is not perfect, if some effects are neglected or not accounted for or
if some assumptions are invalid. Think for instance of the effects of friction or
the assumption that a wire carrying a current has a circular cross section. If an
experiment is not reproducible, its results will vary from one observation to another.
This may be caused by for instance fluctuating conditions during the experiment,
noise in measurement apparatus or mechanical vibrations.
1.3. ERROR CLASSIFICATION 7

1.3 Error classification

Errors can be divided into two different classes, depending on their nature.

• random errors: a measurement error is random if its sign and magnitude vary
unpredictably when the measurement is repeated. The results of repeated measure-
ments are all different. Random errors can be found by repeating the measurement
and applying statistical analysis techniques. Reading and adjustment errors are
often random errors.

• systematic errors: a measurement error is systematic if its sign and magnitude


remain the same upon repetition of the measurement. Repeating a measurement
will clearly not reveal a systematic error. A measurement can only be corrected for
a systematic error, if the sign and magnitude of the error are known by other means
(unrelated, independent measurement). Methodical and instrumentation errors are
often systematic.

1.4 Internal and external error estimates

There are two ways in which a random error can be represented, the assigned error and
the statistical error.

• assigned error: if one single measurement (or just a few) of a quantity with true
but unknown value X is performed, resulting in a measured value x, an estimate has
to be made of the uncertainty in the result. The error ∆x is then assigned in such
a way, that the interval x − ∆x to x + ∆x is expected to encompass approximately
68% of the distribution of values that could reasonably be attributed to the value
of the quantity X, of which x is an estimate.
The assigned error can of course only be a crude estimate. Notation for the assigned
error: symbol ∆ followed by the symbol of the quantity, for instance ∆I, ∆T, ∆x.
Since in these cases the error does not originate from the measurement itself but is
estimated by the person doing the experiment, it is called an external error estimate.

• statistical error: an error is a statistical error if it is derived from the spread in


the results of a large number of repeated measurements of a single quantity with
true but unknown value X, of which x is an estimate. The statistical error sx is
then defined such that it is believed with an approximate level of confidence of 68%
that x − sx ≤ X ≤ x + sx .
Since the statistical error is derived from the measurements themselves, it is called
an internal error estimate. The statistical error is often indicated with the letter s
with the measured quantity added as a subscript, for instance sx , sλ , sV .
8 CHAPTER 1. INTRODUCTION

The value of a quantity X is commonly written as X = x ± ∆x, where x is the best


estimate for X, based on measurement results, and ∆x the error as defined above. All
errors can be given as either an absolute error or a relative error. The absolute error has
the same dimension as the quantity it belongs to. The relative error is a fraction and
is dimensionless, it can also be given as a percentage. The table gives examples of the
notation.

assigned error statistical error

absolute error ∆x sx

∆x sx
relative error (fraction)
|x| |x|

∆x sx
relative error (%) 100 100
|x| |x|

1.5 Rounding off and notation of measurement re-


sults

Calculating a quantity usually yields a number consisting of many digits. Since the
accuracy of the experiment is limited, not all digits of the calculated result are meaningful.
Digits which are meaningful are called significant digits. The number 0.0314 has three
significant digits: ’3’ is the most significant digit and ’4’ the least significant one. Leading
zeroes (the ’0.0’ in 0.0314) are not significant digits, because the number 0.0314 can also
be written as 3.14 · 10−2 .

Because the error itself also has a limited accuracy, it is rounded off first. The general rule
is that an error is always rounded off to 1 significant digit and that it is always rounded
off upwards. In literature an error may sometimes be given in 2 significant digits, but this
is only allowed if the error itself has been determined very accurately. This is not the case
in the Physics Laboratory courses. Rounding off the error is always upwards, because
otherwise the error would appear to be smaller than the value actually determined.

A measurement result is rounded off according to the general mathematical rules in such
a way that its last digit is at the same decimal place as the least significant digit of the
error. Some examples:

• Results of a length measurement are calculated as x = 15.329 m and ∆x = 0.963


m. First the error is rounded off to one significant digit: ∆x = 1 m. Therefore x
has to be rounded off to 15 m, so the measurement result is written as: x = 15 ± 1
m.
1.6. ACCURACY VERSUS PRECISION 9

• If x = 15.329 m and ∆x = 0.613 m is the calculated result, the measurement result


is written as: x = 15.3 ± 0.7 m.

• Note the difference between x = 1500 m and x = 1.5 · 103 m, which might appear
to be the same. Writing x = 1500 m implies four significant digits and an error of
1 ≤ ∆x ≤ 9 m. But writing x = 1.5 · 103 m implies only two significant digits and
an error of 1 · 102 ≤ ∆x ≤ 9 · 102 m.

Worked example

Exercise
Rewrite the following results, using the correct notation (proper accuracy and number of
significant digits):

a) v = 2.71828 m/s ± 2 mm/s

b) L = 3.14 km ± 1.5 cm

c) C = 4722 µF ± 0.42 mF

d) R = 68 MΩ ± 22 kΩ

Solution

a) v = 2718 ± 2 mm/s = 2.718 ± 0.002 m/s

b) L = 3.14000 ± 0.00002 km = 3140.00 ± 0.02 m = 314000 ± 2 cm (the relatively


small error of ∆L = 2 cm warrants more significant digits in L than originally
given.)

c) C = 4.7 ± 0.5 mF = (4.7 ± 0.5) · 103 µF

d) R = 68.00 ± 0.03 MΩ (similar to case b) above)

1.6 Accuracy versus precision

In everyday speech, the words accuracy and precision are often used as synonyms. In
measurement theory, however, these two words have different meanings. An accurate
measurement is one which has a small error, which means that the final result is very close
to the true value of the quantity. A precise measurement is one with many significant
digits. But a precise measurement can be inaccurate, if for instance a systematic error is
involved.
10 CHAPTER 1. INTRODUCTION

Common sense should be used throughout. For example, if x = 1.9 and y = 2.1, then
calculating z = xy on a calculator yields z = 3.99. Suppose x and y are measurement
results, then their number of significant digits indicates that their error is at least ∆x =
∆y = 0.1. The product z will then also have an error of at least ∆z = 0.1 (more about
this later), but the notation of z = 3.99 would wrongly imply a much smaller error ∆z,
based on the number of significant digits given. For intermediate steps in calculations it
is useful to keep more digits (higher precision), in order to prevent rounding errors. The
final result, however, should be given in the correct number of significant digits, according
to the rules discussed above.

1.7 Literature

For future reference, references [1, 2] are useful starting points for further study of the
subject of data and error analysis and contain more detailed explanations than can be
given here, because of the limited scope of this syllabus. References [3, 4, 5, 6, 7] also
provide more information on the topics discussed in this reader.
Chapter 2

Propagation of errors

2.1 Quantities dependent on a single variable

As mentioned in the previous chapter, measurement results are often used to calculate
some other quantity. Errors in the measurement lead to an error in the final quantity:
this is called propagation of errors. As an example, suppose the volume V of a sphere
with radius R (diameter D = 2R) needs to be determined. The well known formula for
calculating the volume is

4 1
V = πR3 = πD3 . (2.1)
3 6

Assume the diameter is measured to be D = 2.43 ± 0.05 cm. A calculator will then show
V = 7.51307013637 . . . cm3 . But what is the error ∆V in the volume?

Clearly the volume V is a function of the diameter D, so V = V (D). Now if D changes


by a small amount ∆D, then

∆V = V (D + ∆D) − V (D). (2.2)

This is reminiscent of the derivate of a function y = y(x), which is defined as

dy ∆y y(x + ∆x) − y(x)


y0 = ≈ = , (2.3)
dx ∆x ∆x

where the approximation (denoted by the symbol ≈) holds if ∆x and ∆y are small enough.
Rearranging this equation yields

11
12 CHAPTER 2. PROPAGATION OF ERRORS

dy
∆y ≈ ∆x. (2.4)
dx

Returning to the volume V (D) of the sphere, the error ∆V can therefore be estimated as

dV
∆V = ∆D
dD  
d 1 3
= πD ∆D
dD 6
1
= πD2 ∆D
2

with ∆D the error in D. So ∆V = 0.46376976 . . . ≈ 0.5 cm3 . The final result for the
volume of the sphere is thus V = 7.5 ± 0.5 cm3 .

So if in general y is a function of x,

y = y(x), (2.5)

the error ∆y is given by

dy
∆y = ∆x. (2.6)
dx

Applying the above formula for error propagation to the important special case of

y = xn (2.7)

yields

∆y ∆x
=n (2.8)
y x

(for all n, not just integers).


2.2. QUANTITIES DEPENDENT ON MORE THAN ONE VARIABLE 13

2.2 Quantities dependent on more than one variable

Often the final quantity to be determined depends on more than one variable. Consider
for instance the determination of the volume of a cylinder, which is given by

1
V = πR2 H = πD2 H, (2.9)
4

where R is the radius, D the diameter and H the height of the cylinder. Measurements
are performed and D = 1.72±0.05 cm and H = 5.17±0.05 cm, yielding V = 12.012608 . . .
cm3 .

The problem is to determine how the errors ∆D and ∆H propagate into the error ∆V
in the volume V of the cylinder. Since the height measurement has nothing to do with
the measurement of the diameter, these two measurements are said to be independent.
In that case the contributions of ∆D and ∆H to ∆V can be separated.

Let ∆VH be the part of ∆V which is contributed by ∆H, then

∆VH = V (H + ∆H) − V (H)


 
1 2
= πD [(H + ∆H) − H]
4
 
1 2
= πD ∆H,
4

meaning that D is kept constant in the calculation of ∆VH . Putting in the numbers gives
∆VH = 0.116176 . . . cm3 . The part of ∆V which is contributed by ∆D is called ∆VD and
is determined by keeping H constant in the following calculation:

∆VD = V (D + ∆D) − V (D)


1
= π[(D + ∆D)2 − D2 ]H
4
1
= π[2D∆D + (∆D)2 ]H
4
1
≈ π(2D∆D)H
4
1
= πDH∆D,
2
14 CHAPTER 2. PROPAGATION OF ERRORS

where the approximation consists of neglecting the term (∆D)2 . This is allowed if ∆D
is small relative to D, whence (∆D)2 is even smaller relative to D and can therefore be
safely neglected. Putting in the numbers gives ∆VD = 0.69841 . . . cm3 .

Because the measurements of D and H are independent, their errors can be somehow
combined to obtain an error for the result. But just calculating ∆VH + ∆VD is not a
good idea, since for some functions (not this example) the calculated errors could also be
negative1 . And it does not make sense that the error in the result of a calculation would
be less than any of the errors in the constituent parts.

Therefore the squares of the individual errors are added to give the square of the resulting
error: Pythagorean or quadratic addition of errors. This method is also called Gaussian
error propagation and is related to the Gaussian probability distribution (discussed in
chapter 3).

Returning to the example, this gives:

(∆V )2 = (∆VD )2 + (∆VH )2 , (2.10)

which yields ∆V = 0.7080 . . . cm3 . The proper notation is therefore V = 12.0 ± 0.8 cm3 .

The method described above can be generalized to any function of any number of variables.
The rule is that the independent and small individual errors, which contribute to the
quantity to be calculated, have to be added quadratically:

(∆Q)2 = (∆Qx )2 + (∆Qy )2 + (∆Qz )2 + . . . (2.11)

so

q
∆Q = (∆Qx )2 + (∆Qy )2 + (∆Qz )2 + . . . . (2.12)

The method explained above for the cylinder can become quite cumbersome for more
complicated functions. But when partial derivatives are used (see appendix B), ∆Qx ,
∆Qy , ∆Qz , . . . can be calculated for any general function

Q = f (x, y, z, . . .). (2.13)

The formula
1
Consider z = sin x + cos y, this gives ∆zx = cos x∆x and ∆zy = − sin y∆y. Simple addition would
give ∆z = ∆zx + ∆zy , which can even be zero for some values of x and y.
2.2. QUANTITIES DEPENDENT ON MORE THAN ONE VARIABLE 15

Relation between Z and A, B Relation between standard errors

Z =A+c (c = const.) ∆Z = ∆A

Z = cA (c = const.) ∆Z = c∆A

Z =A±B (∆Z)2 = (∆A)2 + (∆B)2


 2  2  2
∆Z ∆A ∆B
Z = AB or Z = A/B = +
Z A B

∆Z ∆A
Z = An =n
Z A
∆A
Z = ln A ∆Z =
A
∆Z
Z = eA = ∆A
Z

Table 2.1: Error propagation for some standard mathematical relations. Since ∆Z < 0 is
not physically meaningful, use |∆Z| if necessary.

dy
∆y = ∆x (2.14)
dx

(see page 12) then has to be replaced by

∂f
∆Q = ∆x (2.15)
∂x

and similarly for the other variables y, z, . . .. This results in

s 2  2  2
∂f ∂f ∂f
∆Q = ∆x + ∆y + ∆z + ... (2.16)
∂x ∂y ∂z

Table 2.1 gives the results when this method is applied to functions often encountered.
These formulae can be used as intermediate steps when working with more complicated
functions. This is shown in the worked example further below.

The formulae given in this chapter are only valid in case of small and independent errors.
In the example of the cylinder, given above, independence means that the error in the
16 CHAPTER 2. PROPAGATION OF ERRORS

height measurement has nothing to do with the error in the diameter measurement.

Example

Often a final quantity Q depends on measured quantities a, b, c through the product of


some powers of a, b, c:

ap b q
Q= r . (2.17)
c

For this case it is possible to derive a formula for the relative error ∆Q/Q which is often
easier in use than starting from the basic formulae:

 2  2  2  2
∆Q 2 ∆a 2 ∆b 2 ∆c
=p +q +r . (2.18)
Q a b c

Worked example

Exercise
A resistor with resistance R carries a current I. The power P dissipated as heat by the
resistor is given by P = I 2 R. A resistor with R = 330 Ω is used, the accuracy of R is
listed by the factory as 5%. The current is measured: I = 0.28 ± 0.01 A.

Calculate the relative and absolute error in the power P and write the final result P =
... ± ... in the correct notation.

Solution
Note: more decimals are used for intermediate results than in the final result (which has
to have the proper number of significant digits), otherwise rounding errors would occur
at every step in the calculation.

R = 330 Ω and I = 0.28 A, so P = I 2 R = 25.872 W; ∆R/R = 5% = 0.05, ∆I/I =


0.01/0.28 = 0.0357.

To use table 2.1, it is convenient to substitute Z = I 2 and use two results of the table.
Writing

P = I 2 R = ZR (2.19)

and using
2.3. DEPENDENT ERRORS 17

∆Z ∆I
=2 (2.20)
Z I

gives

 2  2 2

∆P ∆Z ∆R
= +
P Z R
 2  2
∆I ∆R
= 2 +
I R
 2  2
∆I ∆R
= 4 + = 0.00760204.
I R

The method of partial derivatives yields:

 2  2
2 ∂P ∂P
(∆P ) = ∆I + ∆R
∂I ∂R
= (2IR∆I)2 + (I 2 ∆R)2

These methods are equivalent2 and lead to the intermediate results ∆P/P = 0.0872 and
∆P = 2.2558 W. With the proper number of significant digits the desired results are:
∆P/P = 0.09 = 9%, ∆P = 3 W. Therefore the final result is P = 26 ± 3 W.

2.3 Dependent errors

If a quantity depends on more than one measured results and these results are not inde-
pendent, the errors cannot be summed quadratically. The exact procedure to calculate
the final error depends on how the measured results interact with each other.

Example: suppose a well known distance x is divided into two separate pieces x1 and x2 ,
which are measured separately. Then x = x1 + x2 , but x1 and x2 are not independent
quantities. This is easy to see: if x1 increases by an amount ∆x1 , then x2 has to decrease
by the same amount. Working with errors ∆x1 and ∆x2 separately therefore makes no
sense and for instance x2 should be eliminated from all expressions using x2 = x − x1 .
Further calculations should then only use ∆x1 . The quantity x may also have an error
∆x, which must be taken into account.
2
dividing this last equation by P 2 on the left and by (I 2 R)2 on the right yields the equation above
this last one
18 CHAPTER 2. PROPAGATION OF ERRORS
Chapter 3

Stochastics

The magnitude of a random error in a measurement can be determined by repeating


the measurement and applying statistical methods to the results. The necessary basic
techniques are briefly described in this chapter.

3.1 Limit distribution

Suppose the width x of a lecture room is measured. The measurement is repeated to get
a better accuracy. The results of N = 18 measurements are presented in the table.

x (m) x (m)
8.43 8.42
8.45 8.44
8.43 8.44
8.50 8.46
8.44 8.45
8.42 8.41
8.44 8.46
8.46 8.45
8.44 8.47

The true width of the lecture room is the desired quantity. By taking the average value

N
1 X
x= xi (3.1)
N i=1

all measurements are taken into account. This yields x = 8.445 m.

19
20 CHAPTER 3. STOCHASTICS

F
0.25

0.2

0.15

0.1

0.05

0
8.41 8.42 8.43 8.44 8.45 8.46 8.47 8.48 8.49 8.5 x (m)

Figure 3.1: Histogram of x.

The measurement results can also be represented in a different manner by giving each
unique value xk and the number of times nk it occurs, see the table below.

k xk (m) nk Fk
1 8.41 1 0.056
2 8.42 2 0.111
3 8.43 2 0.111
4 8.44 5 0.278
5 8.45 3 0.167
6 8.46 3 0.167
7 8.47 1 0.056
8 8.50 1 0.056

The fraction Fk of the measurements which have a certain value is defined as

nk
Fk = . (3.2)
N

Fk is sometimes also called relative frequency and is shown in the table. Since

X
nk = N (3.3)
k

also
3.1. LIMIT DISTRIBUTION 21

X
Fk = 1. (3.4)
k

The data (xk , Fk ) are shown in a histogram (figure 3.1). Using nk or Fk as weights, the
average x can be calculated from xk as well:

1 X X
x= xk nk = xk F k . (3.5)
N k k

If the measurements are more accurate (to 1 mm instead of 1 cm, for instance), there
will be more unique values. In case of a small number of measurements, each value xk
might occur only once (nk = 1), but then all measurements in an interval ∆x should be
taken together (for instance all results in the interval 8.415 ≤ x ≤ 8.425 m). At least
several measurements have to be in each interval to make the histogram meaningful. The
intervals can be narrowed if more measurements are available.

For the vertical axis of the histogram a new quantity f is used, which is chosen such that

Fk = fk ∆xk , (3.6)

or in words: the fraction Fk of the measurement results in a specific interval with width
∆xk is given by the area of the corresponding bar in the histogram. This bar therefore
has to have a height fk .

For most types of experiment, the histogram will get a very specific shape if the number
of measurements is large enough. Figure 3.2 shows what the histogram may look like, if
the number of measurements is increased from 10 to 100 to 1000. For the hypothetical
case of an infinite number of measurements, the histogram will become a so-called limit
distribution f (x). It is then assumed that a measurement result can have any value,
not just discrete values determined by the measurement error. The probability of a
measurement having a result in the interval (x, x + dx) is then given by the area f (x)dx
of the infinitesimally narrow bar at position x in the distribution. The exact shape of
f (x) depends on the nature of the measurement, but in many cases it is bell shaped as
shown in figure 3.2. The true value of the quantity to be determined is then the value of x
where the distribution has its maximum. Therefore an infinite number of measurements
would in fact be needed to determine this maximum, but in practice this is of course not
possible. This also means that the average of just 18 measurements of the lecture room
width does not correspond to the true value of the width. It is just the best possible
estimate, given the available results.

The limit distribution f (x) is an example of a probability distribution. A probability


distribution is always normalized:
22 CHAPTER 3. STOCHASTICS

50 30

25
40

20
30
15
20
10

10
5

0 0
8.4 8.42 8.44 8.46 8.48 8.5 8.4 8.42 8.44 8.46 8.48 8.5

30 30

25 25

20 20

15 15

10 10

5 5
0 0
8.4 8.42 8.44 8.46 8.48 8.5 8.4 8.42 8.44 8.46 8.48 8.5

Figure 3.2: Possible distributions of x for increasing N (horizontal axis: x, vertical axis:
fk ).

Z ∞
f (x)dx = 1, (3.7)
−∞

meaning that there is a probability of 1 (or 100%) to find some value as a measurement
result.

3.2 Some statistical quantities

In this section some quantities related to a probability distribution are presented. They
all relate to a quantity x with a normalised probability distribution f (x).

• average: the average µ of quantity x is defined as


Z ∞
µ=x= xf (x)dx. (3.8)
−∞
3.2. SOME STATISTICAL QUANTITIES 23

For a discrete probability distribution, in which quantity x can only have discrete
values xi , the average is

N
X
µ=x= xi f (xi ). (3.9)
i=1

The average of x2 is determined similarly1 :


Z ∞
x2 = x2 f (x)dx (3.10)
−∞

for a continuous probability distribution or

N
X
x2 = x2i f (xi ) (3.11)
i=1

for a discrete one.


• deviation: the deviation di of measurement result xi from the average µ is:

di = xi − µ. (3.12)

It is often useful to have a measure (a single number) for the width of a distribution
(”how widely scattered are all data points around the average?”) and one might
be tempted to use the sum of all deviations (weighted with their corresponding
probabilities) for that. But since

N
X N
X
di = (xi − µ) = 0, (3.13)
i=1 i=1
PN
this is not useful. Therefore i=1 d2i is used to calculate a measure for the width of
the distribution.
• variance: the variance var(x) is the average of the sum of the deviations squared:
Z ∞
var(x) = (x − µ)2 f (x)dx (3.14)
−∞

for a continuous probability distribution or

N
X
var(x) = (xi − µ)2 f (xi ) (3.15)
i=1

for a discrete one.


1
R∞ PN
In general, the average of a quantity g(x) is: g(x) = −∞
g(x)f (x)dx = i=1 g(xi )f (xi ).
24 CHAPTER 3. STOCHASTICS

• standard deviation: the standard deviation σ is the square root of the variance
and is a measure for the width of the distribution of all values of x. It also has the
same dimension as x. It is given by:
sZ

σ= (x − µ)2 f (x)dx (3.16)
−∞

(continuous probability distribution) or


v
u N
uX
σ = t (xi − µ)2 f (xi ) (3.17)
i=1

(discrete probability distribution). Using the above definitions it can be shown that
σ can be written2 as well as3 :
p
σ= x2 − x2 . (3.18)

Note that the statistical quantities described here (average, deviation, variance, standard
deviation) concern a probability distribution. In case of physical measurements, this is
the limit distribution. The averages µ used in the formulae above therefore need to be
calculated using the limit distribution. Often only a limited number of measurement
results is available instead of the limit distribution. Then these results can be used to
calculate a so-called best estimate of the standard deviation. How this is done, is described
in chapter 4.

3.3 Gaussian distribution

Which limit distribution applies to a certain measurement, depends on the type of mea-
surement. A distribution often encountered is the Gaussian distribution. The Gaussian
distribution (also sometimes called normal distribution) is shown in figure 3.3 and is given
by

(x − µ)2
 
1
N (x) = √ exp − . (3.19)
σ 2π 2σ 2

The Gaussian distribution can be shown to be applicable if:


note the difference between x2 and x2 , in meaning, notation and also in numerical value.
2
3
this can be shown by writing out the quadratic term and taking constants outside the inte-
gral/summation.
3.3. GAUSSIAN DISTRIBUTION 25

Figure 3.3: Gaussian distribution function.

1. measurement errors are small relative to the true value of the quantity measured
and

2. the probability of finding a measurement result greater than the true value is equal
to that of finding a result less than the true value.

The Gaussian distribution has its maximum at x = µ : N (µ) = A = σ√12π . This value of
A is determined by the requirement that the distribution be normalized.4

The Gaussian distribution is constructed in such a way that the constants µ and σ corre-
spond to the average and the standard deviation of this distribution. This can be checked
by calculating the (non-trivial) integrals:

Z ∞
average : xN (x)dx = µ (3.20)
−∞

and

Z ∞
variance : (x − µ)2 N (x)dx = σ 2 . (3.21)
−∞

Using a coordinate transformation y = (x−µ)/σ, the Gaussian distribution is transformed


into the so-called standard normal distribution:
R∞ 2
x2

4
Use −∞
e−α dx = π/α.
26 CHAPTER 3. STOCHASTICS

 2
1 y
N (y) = √ exp − . (3.22)
2π 2

The average of the standard normal distribution is µy = 0 and its standard deviation
σy = 1. The standard normal distribution is symmetric around y = 0 and has inflection
points at y = ±1.

3.3.1 Meaning of standard deviation

If the distribution of all possible values of measurement results x is a Gaussian distribution,


then the probability of a measurement result x lying in the interval [µ − σ, µ + σ] is given
by:

Z µ+σ
P (|x − µ| ≤ σ) = N (x)dx
µ−σ
Z 1
= N (y)dy
−1
Z 1
= 2 N (y)dy
0

Figure 3.4: Standard normal distribution: P (0 ≤ x ≤ z) is given by the hatched area.

These integrals, represented graphically in figure 3.4, cannot be calculated analytically,


but have to be computed numerically. The results for various values of

z = (x − µ)/σ (3.23)

of the integral
3.3. GAUSSIAN DISTRIBUTION 27

z F (z) z F (z) z F (z) z F (z)


0.0 0.0000 1.0 0.3413 2.0 0.4772 3.0 0.4987
0.1 0.0398 1.1 0.3643 2.1 0.4821 3.1 0.4990
0.2 0.0793 1.2 0.3849 2.2 0.4861 3.2 0.4993
0.3 0.1179 1.3 0.4032 2.3 0.4893 3.3 0.4995
0.4 0.1554 1.4 0.4192 2.4 0.4918 3.4 0.4997
0.5 0.1915 1.5 0.4332 2.5 0.4938 3.5 0.4998
0.6 0.2258 1.6 0.4452 2.6 0.4953 3.6 0.4998
0.7 0.2580 1.7 0.4554 2.7 0.4965 3.7 0.4999
0.8 0.2881 1.8 0.4641 2.8 0.4974 3.8 0.4999
0.9 0.3159 1.9 0.4713 2.9 0.4981 3.9 0.5000

Table 3.1: Numerical values of the Gaussian integral function F (z).

Z z
F (z) = N (y)dy (3.24)
0

are presented in table 3.1. Using this table, the probabilities of finding a measurement
result x lying within 1, 2 or 3 standard deviations from the average can be deduced, see
table 3.2 for the overview.

P (|x − µ| ≤ σ) ≈ 68%
P (|x − µ| ≤ 2σ) ≈ 95%
P (|x − µ| ≤ 3σ) ≈ 100%

Table 3.2: Probability of finding a value within 1, 2 or 3 σ from the average.

Or in words, for example: there is only an ≈ 5% probability to find a measurement result


x deviating more than ±2σ from the average µ for a Gaussian distribution. This also
shows the reason why a probability of 68% (and not some other value) has been used in
the definition of the assigned error (section 1.4).

Worked example

Exercise

The density ρ of diamond has been determined from measurements on a very large number
of individual diamonds. The measurement results follow a Gaussian distribution, with
ρ = 3.515 ± 0.015 g/cm3 . Interpret the given error as the standard deviation.
28 CHAPTER 3. STOCHASTICS

a) Calculate the probability of finding an individual diamond for which the density is
in the range 3.503 ≤ ρ ≤ 3.536 g/cm3 .
b) Calculate the probability of finding an individual diamond for which ρ ≤ 3.497
g/cm3 .

Solution

a) z1 = (ρ1 − ρav )/σ = (3.503 − 3.515)/0.015 = −0.012/0.015 = −0.8 and z2 =


R z22 − ρav )/σ =
(ρ R 1.4(3.536 − 3.515)/0.015
R 0.8 = 0.021/0.015
R 1.4 = 1.4 so probability P =
z1
N (y)dy = −0.8 N (y)dy = 0 N (y)dy + 0 N (y)dy ≈ 0.2881 + 0.4192 = 0.7073
so P ≈ 71%.
b) z3 = R(ρ3 − ρav )/σ =R (3.497 − 3.515)/0.015 = −0.018/0.015
R 1.2 = −1.2 so1 probability
z3 −1.2 R∞ 1
P = −∞ N (y)dy = −∞ N (y)dy = 1.2 N (y)dy = 2 − 0 N (y)dy ≈ 2 − 0.3849 =
0.1151 so P ≈ 12%.

3.4 Poisson distribution

The Poisson distribution applies when events are counted which are independent of each
other in time and which occur randomly, but these counted events do have a constant
average rate of occurring. This applies to for instance the number of photons counted by
a single photon counter in a specified time interval ∆t or the number of radioactive atoms
decaying within a given time interval ∆t. If the counter is reliable, there is no uncertainty
in the number of events counted5 . When the experiment is repeated, however, almost
certainly a different value will be obtained for the number of events counted. This is
not due to uncertainty in the process of counting, but rather to the events being counted
occurring randomly in time.

Consider a sample of radioactive material with a very long half-life, for instance 14 C with
a half-life of 5730 years, and suppose that at some point in time 10 atoms per minute
decay on average. Then the number of decays actually counted within one minute is not
always necessarily 10, because radioactive decay of a single atom is a random event.

Let λ be the average number of events expected in a time interval ∆t, then λ can be
determined by repeating the counting experiment many times. Now the probability of
actually observing k events in a single experiment (with the same time interval ∆t) is
given by the Poisson distribution:

λk −λ
f (k) = e , (3.25)
k!
5
This is no longer true if there are so many events to be counted in rapid succession that the counter
cannot keep up: then the counter will start missing events (in the so-called dead time of the counter).
3.4. POISSON DISTRIBUTION 29

where k = 0, 1, 2, 3, . . . , but any value λ > 0 is allowed. The Poisson distribution is


normalized and its average is λ. For very large λ, the Poisson distribution approaches the
Gaussian distribution.

Returning to the example above, the probability of observing exactly √ 10 decays in one
10 −10
minute is f (10) = 10 e /10! ≈ 0.125. The standard deviation is σ = 10 ≈ 3.16. The
probability of observing for instance 16 decays in one minute is f (16) = 1016 e−10 /16! ≈
0.0217.

3.4.1 Standard deviation of the Poisson distribution

An important property of the Poisson distribution is that its standard deviation is


σP oisson = λ. (3.26)

This has an important implication. When a counting experiment is repeated several times,
the number of counts obtained will vary from one experiment to the other, as discussed in
the previous section. But the number of counts per time interval can be quite low and then
it takes a long time to perform only just one experiment. Repeating such an experiment
many times to improve the accuracy of the result would be rather uneconomical.

But if Nc is the number of counts obtained in a single experiment, then the best estimate
for the expected average count λbest is

λbest = Nc . (3.27)
√ √
The best estimate for the standard deviation is then σbest = λbest = Nc .

Therefore if only one counting experiment is performed in a specified time interval, re-
sulting in Nc counts, then the expected average count λbest in this time interval is

p
λbest = Nc ± Nc . (3.28)

This is an important result and it is illustrated in the following. In a real counting ex-
periment there is often a background signal which must be taken into account. When
counting decay events from a radioactive source, for instance, there may be counts caused
by cosmic rays or by other radioactive materials surrounding the source under investiga-
tion. The counter itself cannot discriminate between the different origins of the events,
therefore two separate measurements are necessary: one with the source of interest and
one without (but with all else being equal). Each of these two counting experiments has
its own error, which must be combined according to error propagation rules to obtain the
error in the net signal of only the source under investigation.
30 CHAPTER 3. STOCHASTICS
Chapter 4

Statistical error

4.1 Introduction

The statistical error has been described in section 1.4 as a measure for the random error.
It can be determined by applying statistical analysis on a limited number of measurement
results of a single quantity. The statistical error is then determined based on the scatter
in the measurement results.

Given N measurement results x1 , x2 , . . . , xN of some quantity, the problem is to derive


the best estimate for the true value of this quantity, together with an estimate for the
error in this estimate. This problem can be approached as follows.

Figure 4.1: Histogram of x, the width of a lecture room (grey bars, cf. figure 3.1), and
three limit distributions (solid lines).

As an example, reconsider the measurements of the width of a lecture room (section 3.1).
The histogram of the measurement results, figure 3.1, is repeated in figure 4.1. The mea-
surement results xi can have all possible values, which will be scattered according to a
limit distribution around the true value of the quantity to be measured. The distribution

31
32 CHAPTER 4. STATISTICAL ERROR

function describing the scattering of the measurement results therefore has to be a contin-
uous probability distribution. Figure 4.1 shows three possible distributions, attempting
to represent the measurement results. Two of the distributions shown are clearly incor-
rect, but the third distribution might be a reasonable approximation of the measurement
results.

The average µ and standard deviation σ of this distribution cannot be calculated, however,
because for this the distribution itself is needed, which would require an infinite number
of measurements. In practice the number of measurements N is limited and therefore
µ and σ have to be estimated based on these N samples of measurement results. The
parameters derived from these N samples are indicated with m for the average and with
s for the standard deviation. The parameters m and s are called estimators for µ and σ,
respectively.

In the following section relations are given between µ and σ of a Gaussian distribution and
the parameters m and s derived from the measurement results. For other distributions
(Poisson, ...) these relations are different and not given here, the interested reader is
referred to literature.

4.2 Best estimates for average and standard devia-


tion of a Gaussian distribution

The full procedure to determine the best estimates for µ and σ of a Gaussian distribution
is quite elaborate. More details are given in for instance Refs. [1, 3, 4], here only the
results will be given.

The best estimate for µ and therefore for the true value of a quantity, based on N mea-
surement results x1 , x2 , . . . , xN is given by the average of the measurement results:

N
1 X
m= xi . (4.1)
N i=1

In the process of determining s (the best estimate for σ), the intermediate result

N
1 X
σ2 = (xi − µ)2 (4.2)
N i=1

is found. But µ is not known, only its best estimate m, and it can be shown that replacing
µ by m and σ by s also implies replacing 1/N by 1/(N − 1) in the above equation. This
can be seen by considering that there are N independent measurements, of which one is
used to determine m, leaving N − 1 to determine s.
4.3. STANDARD ERROR IN THE MEAN 33

This leads to

N
1 X
s2 = (xi − m)2 (4.3)
N − 1 i=1

and thus s, the best estimate for σ, is given by:

v
u N
u 1 X
s=t (xi − m)2 . (4.4)
N − 1 i=1

Using the same method as before (p. 24), s can also be written as:

r
N
s= (x2 − x2 ). (4.5)
N −1

It is important to realize that s, the best estimate for the standard deviation σ of the Gaus-
sian distribution, is obtained by averaging over the measurement results xi . Therefore s
is also sometimes called the standard deviation of the data points.

In contrast, σ is the standard deviation of the Gaussian distribution used for representing
the measurement results. Hence σ is obtained by averaging over the limit distribution,
as described in section 3.2 on statistical quantities. A similar distinction can be made
between m and µ.

4.3 Standard error in the mean

An important question is how well m approximates µ, or what is the difference between


the true value of a quantity and the average of the measurement results. As discussed
in section 3.1 on the limit distribution, the histogram of xi (figure 4.1) will approach the
Gaussian distribution for N becoming increasingly large. This Gaussian distribution has
a standard deviation σ, which is best estimated by s, as described in the previous section.
The true value of the measured quantity is represented by µ, the average of the Gaussian
distribution, and m is the best estimate for µ. Therefore the error sm in m determines
how well m approximates µ.

Since m depends on N as given by

N
1 X
m= xi , (4.6)
N i=1
34 CHAPTER 4. STATISTICAL ERROR

the error in m will depend on N and on the error ∆xi in measurement xi . Assume that all
measurements xi have the same error ∆xi = constant and call it s. This error s may be
the best estimate for the standard deviation of a Gaussian distribution, i.e. the standard
deviation of the data points (which is also why it is called s here), as described in the
previous section. Or it may be due to the experimental inaccuracy of a measuring device.

The error sm of m can be calculated using error propagation, since m contains a sum-
mation over N terms. The error s of every measurement result xi therefore has to be
summed quadratically:

N  2 N  2
X dm X 1 s2
s2m = 2
s = s2 = , (4.7)
i=1
dxi i=1
N N

The error sm is called the standard error in the mean and is hence given by:

s
sm = √ (4.8)
N

or

v
u N
uX
u (xi − m)2 s
x2 − x2
u
t i=1
sm = = , (4.9)
N (N − 1) N −1

where the last form is obtained using a method similar to (but more elaborate than) the
one used on p. 24.

Because of the factor N in the denominator of the above formula for sm , the standard
error in the mean will become smaller if N increases. So the average value m can be
determined more accurately if measurements are repeated more often. Perfoming an
experiment N = 4 times will halve the standard error in the mean. This may make sense,
but there is a practical limit, because you need for instance N = 25 measurements to
reduce sm by only a factor of 5. Further reduction of sm by this method will take a lot of
time, which you often do not have. It is therefore better to look at the sources of error
in your measurement. If you can improve the accuracy of your experimental setup, for
instance, or use a different but more accurate method of measuring the desired quantity,
you often gain much more accuracy than by simply repeating an inaccurate measurement
many times.
4.4. ACCURACY OF THE ERROR 35

4.4 Accuracy of the error

As noted when describing accuracy and precision (section 1.6), it is often not useful to
report the value of an error very accurately. This is because an estimate is used based on
only one single measurement series. It can be shown [1, 3] that the error ∆s in s is given
by:

s
∆s ≈ p , (4.10)
2(N − 1)

so if a measurement is repeated N = 9 times, the relative error in s is still (∆s/s) ≈ 25%.

Worked example

Exercise
The resistance R of an electrical circuit is measured 6 times, with the following results:
R = 47.1 Ω, 47.4 Ω, 47.8 Ω, 46.9 Ω, 47.2 Ω, 47.5 Ω.
It is clear that the random error in R is much larger than the ±0.1 Ω error of the
measurement instrument.

a) Calculate the best estimate for the resistance of the circuit.

b) Calculate s, the best estimate for the standard deviation σ.

c) Calculate the error in the best estimate for the resistance calculated in part a).

d) How many extra measurements are needed to reduce the error calculated in part c)
by a factor of 3?

Solution

a) R = (1/6) · (47.1 + 47.4 + 47.8 + 46.9 + 47.2 + 47.5) = 47.3167 Ω ≈ 47.3 Ω (but use
intermediate result of 47.3167 Ω for further calculations).

b) s2 = N1−1 6i=1 (Ri − R)2


P

= 51 ((−0.2167)2 + 0.08332 + 0.48332 + (−0.4167)2 + (−0.1167)2 + 0.18332 )



= 0.1017 ⇒ s = 0.1017 = 0.3189 Ω ⇒ s ≈ 0.4 Ω.
√ √
c) sm = s/ N = 0.3189/ 6 = 0.1302 Ω ≈ 0.2 Ω.

d) N needs to be 9 times higher ( 9 = 3); 9×6 = 54, so 54 - 6 = 48 extra measurements
are needed.
36 CHAPTER 4. STATISTICAL ERROR
Chapter 5

Further topics in statistical analysis

5.1 Weighted average

Suppose some quantity x is measured in two different ways. One method yields an average
u1 and standard deviation of the data points s1 (see section 4.2) and the other the values
u2 and s2 . Quantity x can then be written as a function of u1 and u2 : x = f (u1 , u2 ). If the
standard deviations s1 and s2 are not equal, then just taking the average u = 21 (u1 + u2 )
is not a good way of representing the quantity x. In this case it is necessary to calculate
the weighted average of u1 and u2 , where a weight w1 is assigned to u1 and a weight w2
to u2 . The average value for x is then calculated with:

w1 u1 + w2 u2
x= (5.1)
w1 + w2

in which the weights are given by:

1
wi = . (5.2)
s2i

Using the error propagation method, the error sx in the weighted average can be seen to
satisfy the relation:

1 1 1
2
= 2 + 2. (5.3)
sx s1 s2

Summarizing for the case of N measurements:

Weighted average:

37
38 CHAPTER 5. FURTHER TOPICS IN STATISTICAL ANALYSIS

N
X
w i ui
i=1
x= N
(5.4)
X
wi
i=1

Weight:

1
wi = (5.5)
s2i

Weighted error:

N
!−1/2 N
!−1/2
X X 1
sx = wi = (5.6)
i=1
s2
i=1 i

Worked example

Exercise
Two independent measurements of the length L of a wire yield: L1 = 16.4 ± 0.5 m and
L2 = 16.1 ± 0.2 m.

Calculate the weighted average length L and the error in L.

Solution

1 1 1 1
w1 == = 4 and w 2 = = = 25
s21 0.52 s22 0.22
w1 L1 + w2 L2 4 · 16.4 + 25 · 16.1
L= = = 16.1414
w1 + w2 4 + 25
1 1 1
2
= 2 + 2 = w1 + w2 = 4 + 25 = 29 ⇒ sL = 29−1/2 = 0.1857 = ∆L
sL s1 s2

Correct notation: ∆L = 0.2 m, hence L = 16.1 ± 0.2 m.


5.2. PARAMETER ESTIMATION 39

5.2 Parameter estimation

When observing a physical phenomenon, there will often be a functional relationship be-
tween several observed or adjusted quantities. Think of for instance the resistance of a
wire as a function of temperature, radiation intensity versus time in case of radioactive
decay, or the amplitude as a function of frequency in case of resonance. Often the func-
tional relationship is known or supposed to be known and the goal is then to determine
parameters relevant to this relationship.

Given N measurement results yi corresponding to independent variables xi (i = 1 . . . N )


and n parameters a, b, c, . . ., the functional relationship can be written as:

y = f (a, b, c, . . . , x). (5.7)

The problem is then to determine the best estimates for parameters a, b, c, . . ., which
means that they have to be determined in such a way that the probability of finding the
observed measurement results is maximum. By defining the residual

ri = yi − f (a, b, c, . . . , xi ) (5.8)

(measured minus predicted value), it can be shown that the sum of the squares of the
residuals

N
X N
X
S(a, b, c, . . .) = ri2 = [yi − f (a, b, c, . . . , xi )]2 (5.9)
i=1 i=1

has to be minimal to obtain the best estimates for the parameters a, b, c, . . .. Minimizing
S can be done by eye with graphical error analysis or the method of least squares can be
used to calculate the parameters a, b, c, . . . based on N data points (xi , yi ).

In general the (expected) functional relationship y = f (a, b, c, . . . , x) can have any form,
but often it is a linear relationship or it can be rewritten as a linear one. If for instance
the refractive index n of a certain glass is expected to vary with the wavelength λ of the
light as n = a + b/λ2 , then n is plotted versus 1/λ2 . Therefore the following discussion
will only concern the special case y = f (a, b, c, . . . , x) = ax + b, a straight line.

5.2.1 Graphical error analysis, estimation by eye

Experimental data points (xi , yi ) can be plotted in a graph and the desired result is often
the slope of the best possible straight line through the data points and/or the intersection
40 CHAPTER 5. FURTHER TOPICS IN STATISTICAL ANALYSIS

of this line with the y-axis. The corresponding y value at this intersection is also called
the intercept.

Error bars around the data points (xi , yi ) then have to be plotted as well, in order to
allow an estimate of the error in the slope and/or intercept. If absolute errors ∆xi and
∆yi are known, error bars are plotted from yi − ∆yi to yi + ∆yi (likewise for xi ± ∆xi ). If
standard deviations of the data points sxi and syi are known, error bars are plotted from
yi − syi to yi + syi (again likewise for xi ± sxi ). In the case of standard deviations it means
there is a probability of 68% of finding the true value inside the error bars.

Once all data points (xi , yi ) and their corresponding error bars are plotted, it is possible to
draw the best possible straight line. This line should pass through all plotted error bars. If
standard deviations of the data points sxi and syi are plotted, this is not strictly necessary,
since there is still a 32% probability of finding the true value outside the indicated error
bars (see chapter 3). If the best possible straight line passes through the error bars of all
but one data points, the specific measurement corresponding to this single outlying data
point (called an outlier ) should be carefully checked to see whether perhaps some mistake
may have been made.

The error(s) in the slope and/or intercept of the best possible straight line can be found
by drawing other straight lines (with slightly different slope/intercept), which are still
acceptable with respect to the plotted error bars.

A special case of a linear relationship is a proportional relationship, which is

y = kx. (5.10)

Such a line passes through the origin (0, 0) of the graph and has no intercept.

A proportional relationship is often encountered in physics, for instance in Hooke’s law


F = kx for the extension x of a spring subjected to a force F , or in Ohm’s law V = IR
describing how the voltage V over a resistor with resistance R depends on the current I
through the resistor. If you analyse a proportional relationship, for instance the results of
a series of (I, V ) measurements on an unknown resistor, you have to use equation (5.10)
and not y = ax + b.

Plotting data points in a graph and judging by eye which straight line is the best one
possible allows a good survey of the measurement results. Possible deviations of an
expected trend are quickly detected and after gaining some experience the results obtained
in this way are often as good as those obtained by the strictly numerical (and often more
elaborate) method discussed next.

If for instance you expect a proportional relationship (equation [5.10]), but in the graph
of your results you see an intercept for the best possible straight line which clearly differs
from zero (b 6= 0 in y = ax + b), then you need to investigate the cause for this non-zero
5.2. PARAMETER ESTIMATION 41

intercept. Once this cause is known, it can be taken into account.

Nonlinear scales

The method described in the previous section not only works for linear scales, but also
for nonlinear scales1 . Two examples will be discussed here.

• Exponential function
A plot of an exponential function

y = α exp(βx) (5.11)

will yield a straight line when plotted on semilogarithmic paper (logarithmic y axis,
linear x axis). After establishing the best possible straight line by eye, pick two
points (xi , yi ) [i = 1, 2] on this straight line for which the coordinates can be rela-
tively easily read from the graph.
Then the exponential factor β in equation (5.11) can be calculated with

ln(y2 /y1 )
β= (5.12)
(x2 − x1 )
and the multiplication factor α in equation (5.11) is given by

α = yi exp(−βxi ) [i = 1 or 2]. (5.13)

• Power law
Plotting the function of a power law

y = αxβ (5.14)

yields a straight line when double logarithmic paper (both x and y axes logarithmic)
is used. The best possible straight line through the data points can be determined
by eye and two points (xi , yi ) [i = 1, 2] on this best possible straight line have to be
determined for which the coordinates can be relatively easily read from the graph.
These coordinates (xi , yi ) [i = 1, 2] can then be used to calculate the constants α
and β.
The power β in equation (5.14) can be determined using

ln(y2 /y1 )
β= (5.15)
ln(x2 /x1 )
1
Examples of graphs with nonlinear scales are discussed in the document STOP and think before you
write - Advice and tips on writing reports and articles of the course Physics Laboratory 1.
42 CHAPTER 5. FURTHER TOPICS IN STATISTICAL ANALYSIS

and the multiplication factor α in equation (5.14) is given by

α = yi x−β
i [i = 1 or 2]. (5.16)

5.2.2 Method of least squares

The task of minimizing for given data points (xi , yi ) the sum

N
X
S(a, b, c, . . .) = [yi − f (a, b, c, . . . , xi )]2 (5.17)
i=1

with respect to the parameters a, b, c, . . . requires mathematics which is not given here.
The steps needed for solving this problem in case of a linear relationship y = ax + b or a
proportional relationship y = kx are described in for instance Refs. [1, 3, 4]. Here only
the relevant results are presented. All summations run from i = 1 to i = N (note the
difference between x2 and x2 , both in mathematical meaning and in numerical values).

For the linear case y = ax + b the following formulae apply:

P P P
N xi yi − xi yi xy − x y
a= P 2 = 2 (5.18)
x − x2
P 2
N xi − ( xi )

and

yi x2i − xi xi yi
P P P P
b= = y − ax. (5.19)
N x2i − ( xi )2
P P

The errors in a and b are given by:

s
ri2
 P
1
∆a = (5.20)
xi − N x2
P 2
N −2

and

s
x2 ri2
 P
1
∆b = +P 2 (5.21)
N xi − N x2 N −2

with ri = yi − (axi + b) the residual (measured minus predicted).


5.2. PARAMETER ESTIMATION 43

For the proportional case y = kx the following formulae apply:

P
xi yi xy
k= P 2 = (5.22)
xi x2

and

s
ri2
 P
1
∆k = P 2 (5.23)
xi N −1

where now of course the residual is ri = yi − kxi .

In the case of unequal weights, where each data point (xi , yi ) has weight wi , the second
form of the above formulae for a, b and k still holds, so2

xy − x y
a= , (5.24)
x2 − x2

b = y − ax, (5.25)

and

xy
k= , (5.26)
x2

but now the weighted averages

P
wi xi
x= P (5.27)
wi

(and likewise for y, x2 and xy) have to be used in these formulae. The errors ∆a, ∆b and
∆k in this case of unequal weights are given in literature [1, 3].
P P
Calculators
P with
P 2 statistical functions will often give the necessary values of x i , yi ,
xi yi and xi , which simplifies the calculations. But common sense should be used
throughout: just calculating slopes and intercepts without even looking at what the data
looks like, is not very sensible. The method of least squares will yield numerical results,
even if, for instance, the data points (are expected to) lie on part of a parabola, circle or
2
again, pay close attention to the difference in mathematical meaning as well as in numerical values
of x2 and x2 .
44 CHAPTER 5. FURTHER TOPICS IN STATISTICAL ANALYSIS

sine wave. Therefore always inspect the data and make a graph, this will allow you to
judge the behaviour of the data points, check for outliers and see if you would be allowed
to fit a straight line at all.

Nonlinear scales

If a nonlinear scale is used to obtain a straight line in a graph of data points and the
method of least squares will be applied, then first the nonlinear coordinate transformation
has to be applied before the method of least squares can be used.

For instance for an exponential function y = α exp(βx) [equation (5.11)] this means that
first z = ln y has to be calculated for all data points and then the method of least squares
has to be applied to all data pairs (xi , zi ). Parameters α and β can be calculated from
the inverse transformation.

5.2.3 Chi-square test for goodness of fit

Suppose a best possible fit (straight line or otherwise) has been made to a series of
measurements using the method of least squares. Then it is useful to test whether the
best fit is acceptable: do the measurements satisfy the expected functional relationship?

Deviations can be expected in both directions: if the functional relationship has too few
parameters or the wrong form, then the data points will deviate systematically from the
calculated functional relationship and the deviations will be larger than the random errors.
If too many parameters are used (for instance a polynomial of a high degree), then the
calculated functional relationship will try to follow random variations in the data points
as well and the deviations will become too small.

In order to test this, first a graph has to be made of all data points with their standard
deviation, together with the calculated fit of the functional relationship. If no systematic
deviations are observed, a so-called χ2 test 3 can be used. This test determines the prob-
ability of the measured sum of quadratic deviations being the result of random errors in
the data points. For the test to be useful, it is necessary to have good estimates for the
errors ∆yi for each measurement result.

First calculate

N  2
2
X y i − fi
χ = , (5.28)
i=1
∆yi

in which fi = f (a, b, c, . . . , xi ) is the predicted value, as before.


3
Greek letter χ, chi
5.2. PARAMETER ESTIMATION 45

Each of the terms of this sum could be expected to have an average value of 1 and the
sum itself would then be approximately N . This is, however, not entirely correct. The
calculation of χ2 not only involves the values of N independent data points yi , but also the
predicted values fi . But these values fi are also calculated from the same N independent
data points, so the same set of data points is used twice, so to speak. Therefore χ2 and fi
are not independent. Each parameter a, b, c, . . . in fi = f (a, b, c, . . . , xi ) needs one degree
of freedom, so if n parameters a, b, c, . . . (q?) are used in calculating the best fit fi , there
are n degrees of freedom less left over for calculating χ2 .

When for instance fitting a straight line f = ax + b, 2 parameters a and b are needed,
reducing the number of degrees of freedom ν to N − 2 and χ2 will be approximately equal
to ν = N − 2. In general4 : if n parameters are adjusted when calculating the fitted
function f , the number of degrees of freedom ν is

ν = N − n, (5.29)

with N the number of data points.

But χ2 will of course have a probability distribution around this value. This distribution
function also depends on ν and is indicated with f (χ2 |ν). The function f (χ2 |ν) is quite
complicated (see for instance Ref. [4]), but it has the fortunate property that it acquires
the shape of a normal distribution
√ for large ν. The average of the distribution is ν and
its standard deviation is 2ν.

Tables of the χ2 distribution do not give the distribution function itself, but the cumulative
distribution function F (χ2 |ν): it is the probability of the observed value of chi-squared
being less than χ2 . The function 1 − F (χ2 |ν) is then of course the probability of finding
a value higher than χ2 . The table gives the values of χ2 which are still acceptable for
acceptance limits of 1%, 10%, 50%, 90% and 99%. Larger tables can be found in literature
[8, 9].

The table is used as follows. An acceptance requirement is set in advance, for instance
between 1% and 99% or between 10% and 90%. This choice is subjective and the limits
chosen have to be reported in the report. Suppose the 10% and 90% limits are chosen.

If the calculated χ2 value is less than the tabulated value for the 90% acceptance limit, then
the data points do not deviate significantly from the calculated functional relationship.
In that case the function used can be expected to describe the data well and there is only
a small probability that the data points are not well represented by this function. In case
the calculated χ2 value exceeds the tabulated value, then the deviation of the data points
is considered significant and another functional relationship has to be used, perhaps with
more parameters.

On the other hand, χ2 should also not be too small. Even if measurements are performed
4
other examples: n = 1 for a straight line through the origin, n = 3 for a parabolic fit, and so on.
46 CHAPTER 5. FURTHER TOPICS IN STATISTICAL ANALYSIS

F = 0.01 0.10 0.50 0.90 0.99


ν
1 0.000 0.016 0.455 2.706 6.635
2 0.020 0.211 1.386 4.605 9.210
3 0.115 0.584 2.366 6.251 11.35
4 0.297 1.064 3.357 7.779 13.28
5 0.554 1.610 4.351 9.236 15.09
6 0.872 2.204 5.348 10.65 16.81
7 1.239 2.833 6.346 12.02 18.48
8 1.646 3.490 7.344 13.36 20.09
9 2.088 4.168 8.343 14.68 21.67
10 2.558 4.865 9.342 15.99 23.21
11 3.053 5.578 10.34 17.28 24.73
12 3.571 6.304 11.34 18.55 26.22
13 4.107 7.042 12.34 19.81 27.69
14 4.660 7.790 13.34 21.06 29.14
15 5.229 8.547 14.34 22.31 30.58
20 8.260 12.44 19.34 28.41 37.57
25 11.52 16.47 24.34 34.38 44.31
30 14.95 20.60 29.34 40.26 50.89
40 22.16 29.05 39.34 51.81 63.69
50 29.71 37.69 49.34 63.17 76.15
60 37.49 46.46 59.34 74.40 88.38
70 45.44 55.33 69.33 85.53 100.4
80 53.54 64.28 79.33 96.58 112.3
90 61.75 73.29 89.33 107.6 124.1
100 70.07 82.36 99.33 118.5 135.8
∞ ν−a ν−b ν ν+b ν+a
√ √
Table 5.1: Cumulative χ2 distribution F (χ2 |ν); a = 3.290 ν and b = 1.812 ν.

very accurately and the functional relationship is well known, the results are expected to
be scattered randomly around this function. These random deviations will add up to a
value of χ2 , which should not be less than a certain minimum value. If an acceptance
limit of 90% is chosen for the maximum allowed value of χ2 (see previous paragraph), then
an acceptance limit of 100% - 90% = 10% has to be used for looking up the minimum
allowed value of χ2 in the table. If the calculated χ2 value is greater than the χ2 value
tabulated for the 10% acceptance limit, then the scatter of the data points around the
function used is not suspiciously small. If, however, the calculated χ2 value is lower than
the value listed in the table for 10%, the deviation is not accepted as random anymore
and it can be concluded that the fit is too good. The fitted functional relationship then
has too many parameters and the least squares method has to be applied again with
a simpler functional relationship: the data points do not justify the complexity of the
function used.
5.2. PARAMETER ESTIMATION 47

Application of the χ2 test is illustrated with the following example. Suppose N = 10


data points (xi , yi ) are available, where x is determined very accurately and every yi has
a known error ∆yi . A simple theory predicts a linear relationship y = ax + b, but a
more refined theory predicts a second degree polynomial y = px2 + qx + r. Do the data
points justify the refined theory over the simple theory with a confidence level of 90%? To
answer this question, the least squares method is applied to the data points twice, once
with the linear function and once with the parabolic function, using 1/(∆yi )2 as weights.
Suppose χ2 = 14.2 is found for the linear function and χ2 = 7.3 for the quadratic function.
Looking up χ2 = 14.2 in table for ν = 8 degrees of freedom, it is seen that this is above
the 90% level and therefore not acceptable according to the criterion set beforehand. For
the quadratic function there are ν = 7 degrees of freedom left and the value χ2 = 7.3
turns out to be acceptable for the set criterion. If for instance χ2 = 12.3 and 6.5 had been
found, respectively, then a decision of the quadratic function being acceptable could not
have been made, despite it following the data points much better (smaller residuals).

The χ2 test cannot be applied if the errors in the data points are not well known. If ∆yi
were estimated too large, χ2 would be too small and it could be wrongly decided that
the functional relationship used is too accurate. Conversely, if ∆yi were estimated too
small, χ2 would be too large with the possible result of wrongly searching for a functional
relationship which would yield a better fit. Since χ2 depends on the square of ∆yi , already
a small change in ∆yi may be important.

Worked example

Exercise

A series of 4 observations is given in table 5.2 above. The error in x is negligible. A


straight line y = ax + b is fitted to these observations (with equal weights for all data
points).

x y ± ∆y
-2 5±2
-1 2±3
1 1±1
3 -2 ± 2

Table 5.2: Sample data points

a) Calculate the best estimate for a and b using the method of least squares.

b) Calculate the errors in a and b.


48 CHAPTER 5. FURTHER TOPICS IN STATISTICAL ANALYSIS

The student who has carried out the experiment wants to use the chi-square test to
check whether the linear fit is acceptable. She decides to use the 1% - 99% acceptance
requirement.

c) Calculate χ2 .

d) Indicate whether the linear fit is acceptable or not.

Solution

x y ± ∆y r
-2 5 ± 2 0.6780
-1 2 ± 3 -1.0678
1 1 ± 1 0.4407
3 -2 ± 2 -0.0508

Table 5.3: Sample data points (from table 5.2) with residuals calculated from linear fit.

a) N = 4, xi = 1, yi = 6, x2i = 15, xi yi = −17


P P P P
⇒ a = (4 · −17 − 1 · 6)/(4 · 15 − {1}2 ) = −1.2542 ≈ −1.3
and x = 0.25, y = 1.5 ⇒ b = y − ax = 1.8136 ≈ 1.8.
P 2
b) Calculate residuals from linear fit, these are given in table 5.3. Hence ri =
2 2 −1
1.7966 ⇒ (∆a) = (15 − 4 · 0.25 ) (1.7966/{4 − 2}) = 0.0609
⇒ ∆a = 0.2468 ≈ 0.3 (rounded upward)
and (∆b)2 = (1/4 + 0.252 /{15 − 4 · 0.252 })(1.7966/{4 − 2}) = 0.2284
⇒ ∆b = 0.4779 ≈ 0.5 (rounded upward)

c) χ2obs = {ri /(∆yi )}2 = (0.6780/2)2 + (−1.0678/3)2 + (0.4407/1)2 + (−0.0508/2)2 =


P
0.4365.

d) 2 parameters a and b are fitted, so ν = N − 2 = 2. 1% level ⇒ χ2table = 0.020,


99% level ⇒ χ2table = 9.210. χ2obs is in between those two limits, so the linear fit is
acceptable.
Chapter 6

Exercises

1.1 Rewrite the following results, using the correct notation (proper accuracy and num-
ber of significant digits):

a) l = 3128 ± 20 cm
b) T = 0.01532 K ± 0.1 mK
c) a = 281 ± 0.21 mm
d) l = 314 mm ± 2 cm
e) v = 7.438 km/s ± 213 m/s
f) λ = 384.2 nm ± 0.032 µm
g) T = 5764.15 K ± 0.24 mK
h) p = 2.891 MPa ± 12.4 kPa

A.1 A light beam of intensity I0 is incident upon a gas cloud of thickness x and the
number of particles per volume in the gas cloud is N (in m−3 ). The attenuation
suffered by the light beam upon leaving the gas cloud is given by:

I(x) = I0 e−σabs N x ,

with σabs some constant.

a) Determine the dimensions (units) of σabs .


b) Explain the name absorption cross section for σabs .

A.2 In theoretical considerations the quantities Planck mass, Planck length, Planck time
and Planck temperature are derived from four physical constants: speed of light
in vacuum c, reduced Planck’s constant ~ = h/2π, Boltzmann’s constant kB and
gravitational constant G. The Planck quantities are all of the form (Planck quantity)

49
50 CHAPTER 6. EXERCISES

γ δ
= cα ~β kB G . The dimensions of the natural constants are:[c] = m s−1 , [~] = m2 kg
s−1 , [kB ] = m2 kg s−2 K−1 , [G] = m3 kg−1 s−2 . Determine the powers α, β, γ, and δ
for each of the Planck quantities using dimensional analysis.

2.1 Given a = 2.18 ± 0.03 and b = 0.92 ± 0.02, calculate A and ∆A for the following
cases:

a) A = a + b
b) A = ab
c) A = a/b

2.2 The gravitational acceleration g is determined by measuring the period T of a pen-


dulum with length l. The relation between T , l and g is:

s
l
T = 2π .
g

Measurements yield: T = 2.00 ± 0.02 s and l = 1.00 ± 0.01 m.

a) Calculate the relative error in g.


b) Calculate the absolute error in g.
c) Which quantity contributes most to the error in g and why?

2.3 Given the quadratic summation rule for small, independent errors, derive the equa-
tions given in table 2.1 (p. 15) for the relative or absolute error in Z, for the cases

a) Z = AB
b) Z = A/B
c) Z = An . Which values are allowed for n: integer/non-integer, positive/nega-
tive, zero? Explain.
d) Z = ln A
e) Z = eA

ap b q
2.4 Given the quantity Q = , derive the formula for (∆Q/Q)2 as stated on page 16.
cr
Cx
2.5 A quantity is given as y = , with C a constant. There is an absolute error sx
1 + x2
in x, resulting in an error sy in y. How does sy depend on x? Plot sy versus x.
51

2.6 A rectangular, homogeneous bar of copper has mass M and dimensions a, b and c:
M = 135.0 ± 0.1 g, a = 80 ± 1 mm, b = 10 ± 1 mm, c = 20.00 ± 0.01 mm. The
moment of inertia I for rotation around an axis perpendicular to (and through the
centre of) the plane defined by sides a and b is:

M 2
I= (a + b2 ).
12

a) Calculate the error in the density ρ of copper, as determined from the mea-
surements given.
b) Calculate the error in the moment of inertia I.
c) Which error of which quantity has the largest influence on the density ρ (a)
and on the moment of inertia I (b)?
4
2.7 A quantity Q = Q(x, y, z) is given by Q = k xy z2
, with k a constant. The relative
errors in x, y and z are 0.1, 0.2 and 0.1, respectively. Calculate the relative error
(∆Q)/Q of Q.

2.8 The impedance Z (”resistance” to AC voltage) of an electrical circuit containing a


resistor with resistance R and a coil with inductance L is given by:


Z= R 2 + ω 2 L2 ,

in which ω = 2πf is the angular frequency of the AC voltage (of frequency f )


connected to the circuit. For known R, L, ∆R and ∆L, calculate the relative error
∆Z
Z
of Z.

2.9 A Pythagorean triangle is measured to have two sides (adjacent to the right angle)
of a = 3 ± 1 cm and b = 4 ± 1 cm, respectively.

a) Calculate the length of the hypotenuse c and the corresponding error.


b) Calculate the circumference of the triangle and the corresponding error.

2.10 The volume V of a rectangular block is determined by the lengths of three mutually
perpendicular sides. Each of these lengths has a relative error of 0.1%. Calculate
the relative error in V .

2.11 Two quantities x and y are related by

y = sin x

on the interval [0, π].

a) Make a sketch of y(x).


52 CHAPTER 6. EXERCISES

b) Consider the region where the result y ± ∆y = 0.95 ± 0.05. This is caused by
variation of x in the interval x = x0 ± ∆x. Calculate x0 and ∆x and indicate
these values in the sketch.
c) How many times is ∆y smaller/greater than ∆x? Explain whether this result
surprises you and why.
d) Derive an equation for ∆y as function of ∆x, using the general formula ∆y =
dy
∆x (page 12).
dx
e) (Re-)calculate ∆y at x = x0 and explain the difference with the previous result
of ∆y = 0.05.

3.1 A measurement series yields x1 = 3.14159, x2 = 2.71828, x3 = 1.61803, x4 = 1.41421.


Calculate x, x2 and x2 .

3.2 The length distribution of people has a Gaussian distribution. For Dutch men the
average length is 184.0 cm with a standard deviation of 7.0 cm, for Dutch women
the average length is 170.6 cm with a standard deviation of 6.5 cm, resulting in the
tallest population worldwide [10].

a) What percentage of men is taller than 190.0 cm?


b) What percentage of women is taller than 190.0 cm?
c) Repeat both calculations for a height of 180.0 cm.

3.3 Based on a large number of measurements according to a specific method, Boltz-


mann’s constant kB has been determined at kB = 1.38 ± 0.02 · 10−23 J/K. A curious
scientist repeats the measurement with exactly the same experimental setup. Cal-
culate the probability of her finding a value in the interval kB = [(1.39 − 1.40) ±
0.02] · 10−23 J/K.

3.4 The mass of an object is measured to be M = 4.56 ± 0.03 kg. Interpret the given
error as standard deviation of the data points. Calculate the probability of the true
mass M being > 4.60 kg.

3.5 The width of a Gaussian distribution is normally characterised by the standard


deviation σ. Another measure often used for the width is the full width at half
maximum (FWHM), which is indicated in figure 6.1. The name f (x) in this figure
is equivalent to N (x) used in the rest of this reader.
Derive an expression for FWHM in terms of σ and show that FWHM ≈ 2.35σ.

3.6 The heat W produced by a current I in a resistance R during time T is given by:
W = I 2 RT . If I is not constant, then W = I 2 RT , where I 2 is the average of
I 2 during period T . The current I in the resistor has an average value Iav and a
standard deviation sI .

a) Derive an expression for W , containing Iav and sI .


53

Figure 6.1: Full width at half maximum

b) Calculate W for Iav = 3 mA, sI = 1 mA, R = 10 kΩ and T = 1 s.

3.7 The number N (t) of radioactive atoms at time t is given by:

N (t) = N (0)e−t/τ

with τ the decay constant, which is related to the half-life by:

T1/2
τ= .
ln 2
A sample contains radioactive atoms with a half-life of T1/2 = 10 000 ± 10 year. A
student measures an average of 2.0 decays per second.

a) How many radioactive atoms are present in the sample at t = 0?


b) Now consider decay measurements during periods of 1 second. Calculate the
probability of observing exactly k decays in 1 second, for each of the values
k = 0, 1, 2, 3, 4.

3.8 The activity of a radioactive source is measured by a student. In a time interval of


9 minutes the detecter registers 2489 counts. The student then removes the source
to do a background measurement. This yields 101 counts in 3 minutes. Assume the
error in the time measurements is negligible. The count rate (in counts per minute)
is a measure for the activity of the source.

a) Calculate the absolute and relative error in the registered number of counts of
source + background.
b) Calculate the absolute and relative error in the registered number of counts of
the background only.
c) Calculate the absolute and relative error in the net number of counts of the
source only.
d) Calculate the count rate and its (absolute) error for the combination of source
+ background.
54 CHAPTER 6. EXERCISES

e) Calculate the count rate and its (absolute) error for the background only.
f) Calculate the count rate and its (absolute) error for the net signal from the
source only.

r
N
4.1 The standard deviation of the data points can be written as s = (x2 − x2 ).
N −1
Consider measurement values x = 0.98, 0.99, 1.00, 1.01, 1.02, 1.03.

a) Calculate x2 , x2 and s, using only 2 decimal places in all your calculations, i.e.
round every intermediate result to 0.01.
b) Repeat a), but now using 4 decimal places (rounding to 0.0001).
c) Repeat a), but now using all decimals your calculator provides.
d) Comment on all results of a) - c).

4.2 The resistance of a resistor is measured repeatedly and the values R = 5.615, 5.622,
5.624, 5.618, 5.620, 5.633, 5.628, 5.624, 5.613 Ω are found.

a) Calculate the average resistance R and the best estimate for the standard
deviation sR .
b) Calculate the error in the average.
c) How is this measurement reported in the lab journal?
d) Calculate the probability of finding a value R greater than R = 5.640 Ω.

4.3 When measuring a surface area A = ab, the following values are found:
a = 11.03, 11.00, 10.97, 10.98, 11.02, 10.99, 11.01 cm and
b = 8.51, 8.48, 8.49, 8.50, 8.53, 8.48, 8.51 cm.

a) Calculate the best estimates for σa and σb .


b) Calculate the standard error in the averages of a and b.
c) Calculate A and ∆A.

4.4 A quantity is measured N times.

a) How many extra measurements have to be performed to improve the accuracy


by a factor of 2 (or halve the error in the average)?
b) Calculate this for N = 10 and N = 100.
c) Is it always useful to just increase the number of measurements to get a higher
accuracy?

4.5 An object is repeatedly dropped from a fixed height and the drop time t is measured
with a stopwatch. The results are t = 1.23, 1.33, 1.25, 1.35, 1.30 s.
55

a) The display of the stopwatch is accurate to 0.01 s. Is this also the accuracy of
the measurements?
b) Calculate s, the best estimate for the standard deviation of the time measure-
ments.
c) Calculate the best estimate for the drop time t and its error ∆t.
d) Suppose 5 new measurements are performed and a new best estimate for the
drop time is determined. Give the probability of the new result lying within
the margins determined from the first set of 5 measurements (part b).

5.1 Three students use the same experimental setup to determine the speed of light c.
Their results are: c1 = 299771 ± 3 km/s, c2 = 299779 ± 2 km/s and c3 = 299776 ± 1
km/s. Calculate the weighted average c of c1 , c2 , c3 and the error sc in c.
5.2 Two students, Alice and Bob, measure the volume of a cylinder by measuring its
diameter and height. Alice finds h = 5.00 ± 0.01 cm and D = 2.00 ± 0.02 cm and
calculates the volume VA . But Bob finds h = 4.95 ± 0.02 cm and D = 1.98 ± 0.04
cm and calculates the volume VB . Calculate the weighted average V of VA and VB
and the error ∆V in V .
5.3 An interference pattern called Newton’s rings is created by positioning a planocon-
vex lens with its convex side on top of a flat glass plate and illuminating this system
from above with monochromatic light (see figure 6.2). The radius rk of dark ring k
satisfies the relationship rk2 = Rkλ, in which R = 100.0 cm is the radius of curvature
of the convex lens surface and λ the wavelength of the light. An error ∆R = 0.1 cm
in R is given by the lens supplier.

Figure 6.2: Newton’s rings.

In this setup many measurements are performed for k = 8 and k = 18: r8 =


0.200 ± 0.002 cm and r18 = 0.305 ± 0.002 cm. Use both measurement series r8 and
r18 to calculate the weighted average wavelength λ of the light.
5.4 In an experiment a detector is rotated around a fixed axis. The angular position of
the detector is not measured in degrees directly, but an angular position sensor is
56 CHAPTER 6. EXERCISES

used. This sensor just ouputs a pulse for every increment of the angular position
of the detector. These pulses are counted by a computer. The experimental setup
is also equipped with a protractor to measure the detector angle in degrees. At an
angle of 52◦ the computer has already counted 72 pulses. The detector angle is then
decreased to −21◦ , at which point the computer has counted a total of 6351 pulses.
Assume negligible uncertainties in this exercise and round your numerical answers
to 2 decimal places (where appropriate).

a) Calculate the number of pulses given by the sensor if the detector is rotated
over an angle of exactly 1◦ .
b) Calculate the change in angle (in degrees) after 1 pulse is counted.
c) Calculate the angle at which the computer started counting pulses.
d) Write down a formula for transforming the number of pulses n into angular
position ϑ (in degrees).

5.5 A linear relationship y = ax + b exists between two physical quantities x and y.


Quantity x is measured very accurately (negligible error). The results are given in
table 6.1.

x y ± ∆y
1.00 61 ± 3
2.00 50 ± 3
3.00 39 ± 3
4.00 30 ± 3
5.00 19 ± 3
6.00 12 ± 3
7.00 0±3
8.00 -11 ± 3

Table 6.1: Measurements (x, y)

a) Plot the results including error bars in a clear graph.


b) Use your naked eye and plot the best possible straight line. Determine from
this line the slope a, the intercept b and the errors ∆a and ∆b.

5.6 Continuation of the previous exercise: Use the method of least squares (and not
the graph) to calculate a, b, ∆a and ∆b and compare these results with those of the
graphical method.

5.7 A pendulum oscillates in air, therefore its motion is damped due to friction. The
amplitude A decreases exponentially as a function of time t: A(t) = A0 exp(−γt).
A student performs measurements on this pendulum and she notes the results in
table 6.2. Errors in A and t are negligible.
57

t (s) A (mm)
1.00 43.4
2.00 19.0
3.00 8.4
4.00 3.4
5.00 1.5
6.00 0.7
7.00 0.3
8.00 0.1

Table 6.2: Measurements pendulum

a) Show that equation (5.11) yields a straight line when plotted on semilogarith-
mic paper.
b) Derive equation (5.12).
c) Derive equation (5.13).
d) Plot the student results on semilogarithmic graph paper and draw the best
possible straight line, using your naked eye.
e) Pick two easily readable points (xi , yi ) (i = 1, 2) on this straight line and
calculate the amplitude A0 at t = 0 and the damping constant γ. Also give
the proper units for A0 and γ.
f) Calculate the time td after which the amplitude has decreased to exp(−1) ≈
0.368 times its starting amplitude.

5.8 Continuation of the previous exercise: Use the method of least squares (and not the
graph) to calculate A0 and γ. Compare these results with those of the graphical
method.

5.9 The force F between two spherical magnets varies with the distance d between their
centres as a power law: F (d) = F0 dn . A student varies the distance between two
spherical magnets of 40 mm diameter and carefully determines the force; she notes
the results in table 6.3. Errors in F and d are negligible.

a) Show that equation (5.14) yields a straight line when plotted on double loga-
rithmic paper.
b) Derive equation (5.15).
c) Derive equation (5.16).
d) Plot the student results on double logarithmic graph paper and draw the best
possible straight line, using your naked eye.
e) Pick two easily readable points (xi , yi ) (i = 1, 2) on this straight line and
calculate the proportionality constant F0 and the power n.
58 CHAPTER 6. EXERCISES

d (mm) F (N)
40 221.1
41 199.6
43 164.3
45 136.7
50 89.5
55 61.2
60 43.3
70 23.6
80 13.9
90 8.8
100 5.9
110 4.1
140 1.6

Table 6.3: Measurements spherical magnets

f) The power n is expected to have an integer value, but your results may yield
a value for n that deviates somewhat from an integer value. Round n to the
nearest integer value and determine the proper units for F0 and n.

(Inspired by Ref. [11].)


5.10 Continuation of the previous exercise: Use the method of least squares (and not the
graph) to calculate F0 and n. Compare these results with those of the graphical
method.
5.11 In an experiment the pressure P of a certain amount of gas is measured as function
of the volume V of the gas. The results are given in table 6.4. The relationship
between P and V is known: P V γ = C, with γ and C constants.

V (m3 ) P (N/m2 )
38.00 95.5
47.00 74.1
56.00 55.5
62.00 49.0
73.00 40.2
88.00 29.8
99.00 25.7

Table 6.4: P-V measurements

a) Assume the measurement of V is accurate relative to the measurement of P .


Use the method of least squares to determine the constants γ and C. Give γ
and C together with their proper dimensions (units).
59

b) The error in P is ∆P = 3 N/m2 . Plot P versus V (including error bars)


on double logarithmic paper. Plot the relation P V γ = C as well, using the
calculated values for γ and C.
5.12 Ancient Egyptian pyramids all have a square base, of which two sides are oriented
more or less North - South. The magnitude of the deviation from true North ap-
pears to correlate with the pyramid’s age. An explanation for this correlation has
been published in the journal Nature by archeologist Spence [12, 13]. The ancient
Egyptians did not take a specific single star to determine true North (as had been
thought for a long time), but a pair of stars. The line connecting these two stars
would have passed through the north celestial pole at the time of building the pyra-
mid. Due to the precession of Earth’s axis, the position of the north celestial pole
slowly changes with respect to the fixed stars.

Spence found two pairs of stars to be likely candidates for having been used by
the ancient Egyptians. Table 6.5 lists the age estimate of eight pyramids and the
corresponding deviation (in arc minutes) from true North. Star pair 1 moves 0.264
arc minutes per year and star pair 2 moves 0.325 arc minutes per year.
Pyramid’s age Deviation from true
(years AD) North (arc minutes)
-2600 -18
-2583 -12
-2572 -8.5
-2552 -2.5
-2520 6
-2487 12.5
-2444 22.5
-2430 30

Table 6.5: Data pyramids

Use the method of least squares to determine which star pair is likely to have been
used by the ancient egyptians for the determination of true North.
60 CHAPTER 6. EXERCISES

5.13 An optical spectrum is recorded with a CCD camera mounted behind a spectro-
graph; the result is shown in the figure. The chip of this camera is 384 pixels wide
and each pixel corresponds to a certain wavelength (the vertical direction in the
image is not used in the measurement). The wavelength scale is calibrated with a
reference spectrum, see table 6.6. The pixel number is accurately determined and
the standard deviation of the wavelength data is 0.5 nm.

Figure 6.3: Optical spectrum [14]

pixel x λ (nm)
1 300.1
50 320.9
200 386.8
384 469.8

Table 6.6: Calibration measurements

A student thinks a linear fit through the calibration data (using the method of least
squares) will be accurate enough, but the spectrograph manual suggests using a
second degree polynomial. She decides to use the χ2 test with an acceptance limit
of 90%.
Will she find a linear fit acceptable or should she use a quadratic fit? Hint: the
quadratic fit yields λ = 4.101 · 10−5 x2 + 0.4276x + 299.57 nm; do the linear fit
yourself.

5.14 The resistance R of a platinum wire is sometimes used as a thermometer. Based on


theory, it is known that R is a function of temperature T :

R(T ) = R0 + αT
61

with R0 and α constants. For a specific platinum wire the following measurement
results have been obtained (table 6.7):

T (◦ C) R (Ω)
-50.0 80.3
-40.0 84.0
-30.0 88.3
-20.0 92.0
-10.0 96.3

Table 6.7: R-T measurements

The error in T is negligible.

a) Calculate the best estimates for the constants R0 and α using the method of
least squares.
b) Calculate the errors in R0 and α.
c) Calculate the value R and its error ∆R at a temperature T = −25.5◦ C (assume
in this case ∆T = 0.1◦ C).
d) A smart studentP performs a fit to a parabolic function R = pT 2 + qT + w as
well and finds ri2 = 0.0823, where ri is the difference between observed value
and fitted value. Calculate χ2 (necessary for the χ2 test). Assume ∆R = 0.5
Ω.
e) Suppose the 10% - 90% probability level is chosen. Indicate whether a parabolic
function is acceptable as well or not.
62 CHAPTER 6. EXERCISES
Appendix A

Dimensional analysis

Suppose a certain quantity A is known to depend other quantities B, C, D, ..., but the
exact functional dependence is not known. Often this dependence can already be derived
by looking at the dimensions of the quantities involved. The units of all quantities can
be expressed in SI base units, like mass (kg), length (m), time (s), temperature (K) and
current (A). How such a dimensional analysis works, is best seen in an example.

Question: The lift (upward force) F on the wing of an aeroplane depends on the air
density ρ, the speed v with which the air flows over the wing and the wing surface area
A. Find the functional form.

Solution: Assume the proportionality F ∝ ρx v y Az . The powers x, y, z are unknown, but


can be determined by dimensional analysis. We know the unit (dimension) of each of the
quantities F , ρ, v and A. Let [X] indicate the unit of a quantity X, then:

[F ] = kg m s−2
[ρ] = kg m−3
[v] = m s−1
[A] = m2

so for the units the following must hold:

[F ] = [ρ]x [v]y [A]z

which yields

kg m s−2 = kgx m−3x my s−y m2z .

Collecting the powers for kg, m and s leads to the following set of equations

63
64 APPENDIX A. DIMENSIONAL ANALYSIS

1 = x
1 = −3x + y + 2z
−2 = −y

which has the solution x = 1, y = 2, z = 1. Therefore F ∝ ρv 2 A. Note that dimensional


analysis will only find the powers in a functional dependence, proportionality factors like
1
2
or π are not found in this way.

A different situation where dimensional analysis may be useful, is when functions like
sin x, ex , ln x or log x are encountered. The argument of such a (transcendental) function
has to be dimensionless, since it cannot operate on units (dimensions), only on numbers.
Note that angles ( ◦ or radians) are also dimensionless.

Question: What is the dimension of k, Boltzmann’s constant?

Solution: k is often encountered in formulae like e−E/kT , where E is the energy related
to a system and T its temperature. Since [E] = J and [T ] = K, it follows that [k] = J K−1
in order for −E/kT to be dimensionless.

More information about and examples of dimensional analysis can be found in literature
[15, 16].
Appendix B

List of symbols

The symbols listed below are frequently used in this reader. Other literature may use
different symbols.

Chapter 1
X value of unknown quantity
x measurement value
∆x measurement uncertainty in x, error in x
sx statistical error in x, derived from large number of repeated
measurements of x

Chapter 2
dy
derivative of function y(x)
dx
∂f
partial derivative of function f (x, y, z, . . .) with respect to x,
∂x
with the other variables y, z, . . . held constant

Chapter 3
N number of measurements

N
X
xi = x1 + x2 + x 3 + . . . + xN
i=1

N
1 X
x = xi = average value of all (measurement) values of x
N i=1

65
66 APPENDIX B. LIST OF SYMBOLS

N
X
x2i = (x1 )2 + (x2 )2 + (x3 )2 + . . . + (xN )2
i=1

N
1 X 2
x2 = x = average value of the squares of all values of x
N i=1 i

N
X
xk nk = x1 n1 + x2 n2 + x3 n3 + . . . + xN nN
k=1

exp(x) = ex with e = 2.718... the base of the natural logarithm


µ average of quantity x, in case x has a known probability
distribution function, or
µ average of Gaussian distribution
σ standard deviation of quantity x, in case x has a known
probability distribution function, or
σ standard deviation of Gaussian distribution
P probability
λ average number of independent, countable events in Poisson distribution
(in a specified time interval)
Nc number of counted events in a single experiment
(in a specified time interval)

Chapter 4
m best estimate for µ (average of Gaussian distribution), based on N
measurement results
s best estimate for σ (standard deviation of Gaussian distribution),
based on N measurement results;
s is also called the standard deviation of the data points
sm standard error in the mean = error in m
67

Chapter 5
x weighted average value of all (measurement) values of x
sx error in weighted average x
fi predicted value from fitted function f , evaluated at xi
ri residual, difference between measured and predicted value
a slope of line y = ax + b
∆a error in slope a of line y = ax + b
b intercept of line y = ax + b
∆b error in intercept b of line y = ax + b
k slope of line y = kx
∆k error in slope k of line y = kx
χ2 test parameter used in determining goodness of fit
ν number of degrees of freedom
n number of parameters used in fitting a function to data points
68 APPENDIX B. LIST OF SYMBOLS
Bibliography

[1] G. L. Squires, Practical Physics, 4th ed., Cambridge University Press, 2001. Available
for consultation in the Physics Practical Library, code EXP8.

[2] J.R. Taylor, An introduction to error analysis: the study of uncertainties in physical
measurements, 2nd ed., University Science Books, 1997. Available for consultation in
the Physics Practical Library, code WT4.

[3] G. L. Squires, Fysisch Experimenteren, 2nd ed., Uitgeverij Het Spectrum, 1979 (Dutch
translation of 1st ed. of [1]).

[4] H.J.C. Berendsen, Goed meten met fouten, 5th ed., Bibliotheek der Rijksuniver-
siteit Groningen, 2009; available at http://www.hjcb.nl/meten/GoedMeten.pdf
(accessed August 2013) (translated as [5]).

[5] H.J.C. Berendsen, A Student’s Guide to Data and Error Analysis, Cambridge Uni-
versity Press, 2011.

[6] P.R. Bevington en D.K. Robinson, Data reduction and error analysis for the physical
sciences, McGraw-Hill, 1992.

[7] M.L. Wijvekate, Verklarende Statistiek, Uitgeverij Het Spectrum, 2011.

[8] M. Abramowitz and I.A. Stegun, Handbook of Mathematical Functions with Formu-
las, Graphs, and Mathematical Tables, National Bureau of Standards (NBS), 1964
(ISBN 0-486-61272-4).

[9] W.M. Haynes (ed.), Handbook of Chemistry and Physics, CRC Press, 2010.

[10] UMC St. Radboud (Nijmegen), Pediatric Department, 2013, www.umcn.nl/


Informatiefolders/7304-Grote_lengte-i.pdf (accessed August 2013).

[11] C. Ucke, H.J. Schlichting, Die Magnetkanone, Physik in unserer Zeit 40, 152 - 155
(2009); DOI: 10.1002/piuz.200801170. See www.ucke.de/christian/physik for en-
glish version.

[12] K. Spence, Ancient Egyptian chronology and the astronomical orientation of pyra-
mids, Nature 408, 320 - 324 (2000).

69
70 BIBLIOGRAPHY

[13] K. Spence, Ancient chronology: Astronomical orientation of the pyramids, Nature


412, 699 - 700 (2001).

[14] R.J.H. Klein-Douwel, J.J. Schermer, J.J. ter Meulen, CN distribution in flame de-
position of diamond and its relation to the growth rate, morphology, and nitrogen
incorporation of the diamond layer, Diamond Relat. Mater., 7, 1118 - 1132 (1998).

[15] D. Bolster, R.E. Hershberger, R.J. Donnelly, Dynamic similarity, the dimensionless
science, Physics Today 64, 42 (2011).

[16] R. W. Robinett, Dimensional analysis as the other language of physics, Am. J. of


Physics 83, 353 (2015).

[17] C. Devillers, D. A. Ramsay, The Ã3 Πi − X̃ 3 Σ− Band System of the CCO Molecule,
Can. J. Phys., 49, 2839 - 2858 (1971).

You might also like