lecture 20: intro to fitting, least squaresbelz/phys3730/lab20/lecture20.pdf · lecture 20: intro...
TRANSCRIPT
Lecture 20: Intro to Fitting,Least Squares
Physics 3730/6720Fall Semester 2019
A bunch of fittings
Fitting● Purpose: Compare data
to a physical model.● “Model” (Webster) – a
system of postulates, data, and inferences presented as a mathematical description of an entity or state of affairs
● i.e. a functional relationship between variables
Fitting● Simplest case: straight line fit
to data with normally distributed (Gaussian) uncertainties.
● What does this mean?
– Measure quantity x, N times.
– As N → large, parent probability distribution → Gaussian
Gaussian Errors● Note that one
sigma (1s)error interval is not the maximum possible excursion from X
0:
– 32% > 1s
– 4.5% > 2s
– 0.27% > 3s
Use “2/3rds Rule” as a Rough Guide
● Spread of points, error bars consistent with normal error distribution.
s6
s5
s4
s3
s2
s1
Independent variable(assume uncertainty negligible)
dependent
vari
able
● What is the problem here?
Use “2/3rds Rule” as a Rough Guide
● What is the problem here?
Use “2/3rds Rule” as a Rough Guide
Problem of Straight-Line Fitting● Remaining problem: I have a set of points
(x
i,y
i ± s
i)
which I expect to follow a linear relationship y = A + Bx What is my best estimate for the coefficients A, B?
1st: Mechanical Analog● Suppose we have a set of
points (xi,y
i).
1st: Mechanical Analog● Suppose we have a set of
points (xi,y
i).
● To each point, connect a spring. (Imagine spring can only move in y direction.)
1st: Mechanical Analog● Suppose we have a set of
points (xi,y
i).
● To each point, connect a spring. (Imagine spring can only move in y direction.)
● To the other end of the springs attach a rigid rod.
1st: Mechanical Analog● Suppose we have a set of
points (xi,y
i).
● To each point, connect a spring. (Imagine spring can only move in y direction.)
● To the other end of the springs attach a rigid rod.
● What will determine where rod comes to rest?
1st: Mechanical Analog● Suppose we have a set of
points (xi,y
i).
● To each point, connect a spring. (Imagine spring can only move in y direction.)
● To the other end of the springs attach a rigid rod.
● Equilibrium position of rod will minimize potential energy.
replace
With the “chi-squared”
function:
thus replace
The problem of fitting data with normally distributeduncertainties is reduced to a matter of finding the model parameters that minimize the chi-squared.
Chi-squared Minimization
● Today: Do chi-squared minimization by brute-force search of parameter space.
● Thursday/Homework: Look at general analytic (but computation-heavy) solution for “linear functions” of the form:
y = a0 + a
1x1 +a
2x2 + a
3x3 + ...
Additional Reading:
Taylor: An Introduction to Error Analysis
Bevington: Data Reduction and Error Analysis for the Physical Sciences
Press et al, Numerical Recipes