lecture 21: more fitting - astronomybelz/phys3730/lab21/lecture21.pdfreplace with the...
TRANSCRIPT
![Page 1: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/1.jpg)
Lecture 21: More Fitting
Physics 3730/6720Fall Semester 2019
A bunch of fittings
![Page 2: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/2.jpg)
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.
![Page 3: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/3.jpg)
Direct minimization of c2 ...
![Page 4: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/4.jpg)
Grid Search minimization of c2 ...
![Page 5: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/5.jpg)
Grid Search minimization of c2 ...
![Page 6: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/6.jpg)
Grid Search minimization of c2 ...
![Page 7: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/7.jpg)
Grid Search minimization of c2 ...
![Page 8: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/8.jpg)
Grid Search minimization of c2 ...
![Page 9: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/9.jpg)
Grid Search minimization of c2 ...
![Page 10: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/10.jpg)
Grid Search minimization of c2 ...
![Page 11: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/11.jpg)
Grid Search minimization of c2 ...
![Page 12: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/12.jpg)
Grid Search minimization of c2 ...
![Page 13: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/13.jpg)
● “c2 parabola”● Also can tell us
about uncertainty in fit parameters…
● c2 + 1 → B ± σB
Grid Search minimization of c2 ...
![Page 14: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/14.jpg)
Analytic Minimization of c2
![Page 15: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/15.jpg)
Analytic Minimization of c2
![Page 16: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/16.jpg)
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?
![Page 17: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/17.jpg)
“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.
![Page 18: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/18.jpg)
Additional Reading:
Taylor: An Introduction to Error Analysis
Bevington: Data Reduction and Error Analysis for the Physical Sciences
Press et al, Numerical Recipes
![Page 19: Lecture 21: More Fitting - Astronomybelz/phys3730/lab21/lecture21.pdfreplace With the “chi-squared” function: thus replace The problem of fitting data with normally distributed](https://reader034.vdocuments.mx/reader034/viewer/2022050311/5f738e1595797216be0c6b1f/html5/thumbnails/19.jpg)
Additional Reading:
Taylor: An Introduction to Error Analysis
Bevington: Data Reduction and Error Analysis for the Physical Sciences
Press et al, Numerical Recipes