lecture 4: fitting straight lines by the least-squares methodbelz/phys3719/lecture04.pdf · 24...
TRANSCRIPT
![Page 1: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/1.jpg)
Lecture 4: Fitting Straight Lines by the Least-Squares Method
Physics 3719Spring Semester 2011
M.Shattuck,CUNY,
Ideal ParticleImage
![Page 2: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/2.jpg)
24 January 2011 Physics 3719, Lecture 04 2
Problem of Straight-Line Fitting
● We have discussed and seen examples of linearization of data, in which we recast mathematical relations between variables in straight-line form– Easy to recognize by eye– Easy to fit
![Page 3: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/3.jpg)
24 January 2011 Physics 3719, Lecture 04 3
Transform to Linear: Basic Idea
x = independent variabley = dependent variable
slope intercept
![Page 4: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/4.jpg)
24 January 2011 Physics 3719, Lecture 04 4
Transform to Linear: Example
![Page 5: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/5.jpg)
24 January 2011 Physics 3719, Lecture 04 5
Problem of Straight-Line Fitting● Remaining problem: I have a set of points
(x
i,y
i ±
i)
which I expect to follow a linear relationship y = A + Bx What is my best estimate for the coefficients A, B?
![Page 6: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/6.jpg)
24 January 2011 Physics 3719, Lecture 04 6
1st: Mechanical Analog● Suppose we have a set of
points (xi,y
i).
![Page 7: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/7.jpg)
24 January 2011 Physics 3719, Lecture 04 7
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.)
![Page 8: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/8.jpg)
24 January 2011 Physics 3719, Lecture 04 8
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.
![Page 9: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/9.jpg)
24 January 2011 Physics 3719, Lecture 04 9
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?
![Page 10: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/10.jpg)
24 January 2011 Physics 3719, Lecture 04 10
Equilibrium position of rod will minimize potential energy.
![Page 11: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/11.jpg)
24 January 2011 Physics 3719, Lecture 04 11
where
define
In terms of stretch of string
then
![Page 12: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/12.jpg)
24 January 2011 Physics 3719, Lecture 04 12
Discussion
● To what does the spring constant k correspond in our linear fitting problem?
● Must the ki all be the same?
![Page 13: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/13.jpg)
24 January 2011 Physics 3719, Lecture 04 13
replace
With the “chi-squared” function:
thus replace
![Page 14: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/14.jpg)
24 January 2011 Physics 3719, Lecture 04 14
Minimization of 2
Solve two equations in two unknownsSee handouts for results.
![Page 15: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/15.jpg)
24 January 2011 Physics 3719, Lecture 04 15
Application left for homework
exercise!
![Page 16: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/16.jpg)
24 January 2011 Physics 3719, Lecture 04 16
Accuracy and Precision/Statistical and Systematic
![Page 17: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/17.jpg)
24 January 2011 Physics 3719, Lecture 04 17
Uncertainties in Experimental Physics
● Freshman physics:– 90% of time is spent measuring
central value– Compare to “accepted value”– Tack on experimental uncertainty as an
afterthought, if at all.
● Undergrad Lab (and the rest of your careers):– Spend most of your time understanding errors– Before you even touch equipment!– Is experiment worth doing? Will someone fund it?
![Page 18: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/18.jpg)
24 January 2011 Physics 3719, Lecture 04 18
Terminology...
● Accuracy: How close to True value?
● Precision: What is the spread you'd see in repeated measurements?
![Page 19: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/19.jpg)
24 January 2011 Physics 3719, Lecture 04 19
More terminology...
● Random or Statistical Error: Can be reduced by taking more measurements
● Systematic Error: Cannot be reduced by taking more measurements
● Q: When is an experiment “finished”?
![Page 20: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/20.jpg)
24 January 2011 Physics 3719, Lecture 04 20
![Page 21: Lecture 4: Fitting Straight Lines by the Least-Squares Methodbelz/phys3719/lecture04.pdf · 24 January 2011 Physics 3719, Lecture 04 17 Uncertainties in Experimental Physics Freshman](https://reader033.vdocument.in/reader033/viewer/2022050605/5fac3ecc6afed928127edce1/html5/thumbnails/21.jpg)
24 January 2011 Physics 3719, Lecture 04 21