Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the...

Preview:

Citation preview

Lecture 21: More Fitting

Physics 3730/6720Fall Semester 2019

A bunch of fittings

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.

Direct minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

Grid Search minimization of c2 ...

● “c2 parabola”● Also can tell us

about uncertainty in fit parameters…

● c2 + 1 → B ± σB

Grid Search minimization of c2 ...

Analytic Minimization of c2

Analytic Minimization of c2

Evaluating Fits: c2

● Definition of c2

● Absolute magnitude of c2 only has meaning relative to the number of degrees of freedom

● #DOF = (# of data points) - (# parameters determined from the data)

● #DOF = (# of data points) - (# constraints)

● c2 /#DOF ~ 1 for good fit● What would “zero degrees of freedom” mean?

“Goodness of Fit” or “Quality Factor”

● Evaluated by means of “upper incomplete gamma function” in scipy.special.gammaincc

● Also known as “p-value” or “chance probability”● Probability that in a large ensemble of

experiments, a c2 as large or greater as that of the current measurement is found.

Additional Reading:

Taylor: An Introduction to Error Analysis

Bevington: Data Reduction and Error Analysis for the Physical Sciences

Press et al, Numerical Recipes

Additional Reading:

Taylor: An Introduction to Error Analysis

Bevington: Data Reduction and Error Analysis for the Physical Sciences

Press et al, Numerical Recipes

Recommended