Sie sind auf Seite 1von 4

Data Analysis for Physics Laboratory Dr. D.M.

Cullen, October 2009


These notes cover the most important points from the PHYS 10181B lectures. They are
intended as an aide-memoire, and do not replace the e-learning module lecture notes. Fur-
ther material can be found in textbooks, such as Practical Physics by G L Squires.
Good laboratory practice
It is good laboratory practice, which helps with data analysis, to keep good records of all
that could possibly be relevant, recording all of your readings in ink, directly into a neat
laboratory notebook.
Standard errors
We almost always need to know the error on a measurement. Errors dont represent ab-
solute limits: for example, a result x implies 68.3% condence that the true value is
in the range x x + , and 95.5% condence that the true value lies in the range
x 2 x + 2.
There are two important types of errors: random errors due to factors such as the intrinsic
accuracy of the apparatus; and systematic errors, which cause measurements to deviate
from true values in a systematic way.
Repeated measurements and the Gaussian (normal) distribution
Consider a sample of n repeated measurements, x
i
, of the same quantity, each with the
same standard error. The best estimate of the true value is the average, x. The mean
squared deviation (or variance), s
2
, of the sample is a measure of the spread of the distri-
bution of measurements:
s
2
=
1
n
n

i=1
(x
i
x)
2
The standard deviation (the root mean squared deviation), s, of the sample is just the
square root of this :
s =

_
1
n
n

i=1
(x
i
x)
2
The sample represents a nite set of measurements from an underlying distribution which,
in the ideal case, is a Gaussian (also called normal) distribution:
1
f(x) =
1

2
exp
_

(x x)
2
2
2
_
The quantity is the standard deviation of the Gaussian distribution, and represents
the standard error on a single measurement, i.e. it is related to the precision of the
apparatus and the care with which the measurements are made. A good estimate of
the standard deviation of the underlying normal distribution may be obtained from the
standard deviation of the nite sample of n measurements, using:

_
n
n 1
s
In practice, the number of measurements, n, is usually large enough that
_
n/(n 1) can
be taken as unity. In other words, the standard deviation of the nite sample of measure-
ments is a very good approximation to the standard deviation of the underlying (innite)
Gaussian distribution.
The standard error on the average value, x, is given by the standard deviation of the
distribution (i.e. the error on each of the individual measurements) divided by the square
root of the number of measurements:

m
=

n
From such a set of measurements, the quoted result would therefore be x
m
.
From the point of view of the design of an experiment involving repeated measurement,
the nal precision therefore depends on both the precision of each measurement and the
number of measurements taken.
Estimating the error on a single measurement
Most often, one doesnt make many measurements of the same quantity. When only one,
or a few, measurements are taken (or repeated measurement would just give the same
answer) we need to estimate the error. One method is to ask yourself: over what range
of values am I almost certain (say 95% condence) that the true value lies? That range
would correspond to 2 (i.e. four times the error).
2
Fitting functions to data
One often investigates the dependence of a quantity (a dependent variable y) on another
quantity (an independent variable x) which is deliberately varied in denite steps.
For a set of N measurements (x
i
, y
i

i
) compared to a theoretical curve, y = f(x), the
value of chi-squared is given by:

2
=
N

i=1
_
y
i
f (x
i
)

i
_
2
In a t to the data, in which some parameters of f(x) are allowed to vary (usually by a
computer), the best t corresponds to the set of parameter values which gives the mini-
mum value of chi-squared.
The number of degrees of freedom, Ndof, is equal to the number of data points, N, minus
the number of free parameters in the t. A t to a straight line, y = mx + c, has two
free parameters, m and c. For a good t, the value of chi-squared will be approximately
equal to the number of degrees of freedom. As a rule of thumb, values of chi-squared in
the range from half to twice Ndof may be regarded as indicating an acceptable t if Ndof
is less than about 20. For larger Ndof, values of
2
/Ndof in the range 1
_
8/Ndof
to 1 +
_
8/Ndof would be acceptable. Values outside of these acceptable ranges usually
imply that something is wrong, either with the errors
i
, or with the assumed function f(x).
Combining or propagating errors
A set of independently measured quantities x, y, z,..., each with errors, may be combined
to get the value of some function f = f(x, y, z, ...) and its error. The general formula for
combining errors involves the partial derivatives of the function:

2
f
=
_
f
x
_
2

2
x
+
_
f
y
_
2

2
y
+
_
f
z
_
2

2
z
+ ...
The terms represent the contribution to the error in f from the error in each of the mea-
sured variables. The contributions are added in quadrature. (For complicated functions,
it may be easier to nd these contributions by varying the value of each measurement in
turn by its error, while keeping all other quantities xed, and recalculating the value of f).
The formula leads to some simple rules, such as:
(i) When independent measurements are added or subtracted, then the absolute errors are
combined in quadrature; for example, if f = x + y z, then

2
f
=
2
x
+
2
y
+
2
z
3
(ii) When independent quantities are multiplied or divided, then the fractional (or per-
centage) errors are combined in quadrature. For example, if f = xy/z, then
_

f
f
_
2
=
_

x
x
_
2
+
_

y
y
_
2
+
_

z
z
_
2
(iii) When a measured quantity is raised to a power, the fractional error is multiplied by
the (modulus of) the power. For example, if f = x
3
2
, then
_

f
f
_
=
3
2
_

x
x
_
(iv) For the natural log function f = ln x, then
f
= (
x
/x).
The weighted average
For a set of n measurements, x
i
, of the same quantity, each with a dierent error,
i
, the
best estimate of the true value is the weighted average, given by:
Wmean =

n
i=1
w
i
x
i

n
i=1
w
i
where w
i
is the weight of a measurement, x
i
, given by:
w
i
=
1

2
i
The standard error on the weighted average is given by:

(Wmean)
=
1
_

w
i
Counting-experiments and the Poisson distribution
Many types of processes involving discrete occurrences, such as radioactive decay or su-
pernovae explosions follow a Poisson distribution.
The variance of the Poisson distribution is , i.e. the same as the expectation value, and
so the standard deviation of a Poisson distribution is

.
As the value of increases, the Poisson distribution becomes very like the Gaussian dis-
tribution, and for values of above about 10, it is reasonable to treat it as a (discrete)
Gaussian distribution. In an experiment where N counts are recorded, a statistical error
of

N may be assigned, allowing for the random uctuations in the counting rate.
4

Das könnte Ihnen auch gefallen