01 Methods2 Slides
01 Methods2 Slides
Dept. of Physics
v.2023-09-30
1 / 25
References
2 / 25
Contents
1 Uncertainty in measurement
2 Linear regression
3 / 25
1. Uncertainty in measurement
4 / 25
1. Uncertainty in measurement
5 / 25
6 / 25
7 / 25
1. Uncertainty in measurement
1.3. Reporting measurement results
x±u
8 / 25
1. Uncertainty in measurement
The uncertainty u is seldom reported with more that one
significant figure. Example:
±0.2 is okay
±0.24 is okay but exceptional
±0.2432 is not correct.
N 2
s2 = x − x2
N −1
r
s2
u = tN
N
where tN is from the following table,
10 / 25
1. Uncertainty in measurement
11 / 25
1. Uncertainty in measurement
Example
2.137 ≡ 2.137 ± 0.001
12 / 25
1. Uncertainty in measurement
Numbers without decimal point can be assumed to be exact.
Example: 2π, 3x.
13 / 25
1. Uncertainty in measurement
1.6. Propagation of uncertainties
Example: Rectangle
What is the area of a rectangle of dimensions 234.5 cm × 7.5 cm?
Answer: A = 234.5 × 7.5 = 1.8 × 103 cm2 .
(The product, 1758.75, given with only two significant digits.)
For a sum the result must contain the same number of decimal
places as the summand with least decimal places.
Example: 8034.323 + 5.21 = 8039.53
Example: 1300 − 243 = 1.1 × 103 , not 1057.
However, beware of the context, e.g., in accounting.
14 / 25
1. Uncertainty in measurement
These rules for sums and products are simplified recipes for
particular cases of a more general formula, as follows.
Propagation of uncertainties
Consider a variable y = f (x1 , x2 , . . . , xK ) which depends on the
uncorrelated variables xk . The uncertainty uy of y is related to the
individual uncertainties uk of each variable xk according to the
formula
X ∂f 2
u2y = u2k
∂xk
k
1 Uncertainty in measurement
2 Linear regression
16 / 25
2. Linear regression
What is the straight line that best fits a given set of {x, y} data?
1 X
y= yi
N
i
1 X 2
y2 = yi
N
i
1 X
xy = x i yi
N
i
18 / 25
2. Linear regression
19 / 25
2. Linear regression
The quantity r2 ∈ [0, 1] is called coefficient of determination.
The closer r2 is to unity, the better x’s and y’s are connected by
a linear relation.
y = mx
20 / 25
2. Linear regression
y = mx
with
xy
m=
x2
21 / 25
2. Linear regression
Note that these last formulas for m and r are identical to the
ones for the general linear fit replacing x and y by zero.
2.2. Examples
22 / 25
2. Linear regression
Example: Real battery
An electrical battery can be modeled as a voltage source V with an
internal resistance r. If an external resistance R is connected to the
battery terminals the current I in the circuit is
1
V = (R + r) I ⇒ R=V −r
I
By varying R and measuring the corresponding I values a linear
regression
y = mx + b
can be made with the identifications
23 / 25
2. Linear regression
y = mx
24 / 25
2. Linear regression
Example: Massless spring vs. real spring
Consider a massless spring with a yet unknown constant k. Different
masses M are made to oscillate and the angular frequency ω is
measured. The relation
1 1
2
= M i.e. y = ω −2 x=M m = k −1
ω k
is amenable to proportional regression so that k can be obtained
from the slope m. But real springs have mass. The total oscillating
mass can be modeled as (M + M′ ) with M′ the unknown
contribution from the spring itself. Thus,
1 1 ′ 1 M′
= (M + M ) = M +
ω2 k k k
amenable to linear regression with slope 1/k and intercept M′ /k.
25 / 25