Presentation on theme: "PHYSICS 2CL – SPRING 2009 Physics Laboratory: Electricity and Magnetism, Waves and Optics Prof. Leonid Butov (for Prof. Oleg Shpyrko)"— Presentation transcript:
PHYSICS 2CL – SPRING 2009 Physics Laboratory: Electricity and Magnetism, Waves and Optics Prof. Leonid Butov (for Prof. Oleg Shpyrko) Mayer Hall Addition (MHA) 3681, ext Office Hours: Mondays, 3PM-4PM. Lecture: Mondays, 2:00 p.m. – 2:50 p.m., York Hall 2722 Course materials via webct.ucsd.edu (including these lecture slides, manual, schedules etc.)
Today’s Plan: Chi-Squared, least-squared fitting Next week: Review Lecture (Prof. Shpyrko is back)
Long-term course schedule Schedule available on WebCT WeekLecture TopicExperiment 1 Mar. 30 Introduction NO LABS 2 Apr. 6 Error propagation; Oscilloscope; RC circuits 0 3 Apr. 13 Normal distribution; RLC circuits 1 4 Apr. 20 Statistical analysis, t-values; 2 5 Apr. 27 Resonant circuits 3 6 May 4 Review of Expts. 4, 5, 6 and 7 4, 5, 6 or 7 7 May 11 Least squares fitting, 2 test 4, 5, 6 or 7 8 May 18 Review Lecture 4, 5, 6 or 7 9 May 25 No Lecture (UCSD Holiday: Memorial Day) No LABS, Formal Reports Due 10 June 1 Final Exam NO LABS
Labs Done This Quarter 0. Using lab hardware & software 1.Analog Electronic Circuits (resistors/capacitors) 2.Oscillations and Resonant Circuits (1/2) 3.Resonant circuits (2/2) 4.Refraction & Interference with Microwaves 5.Magnetic Fields 6.LASER diffraction and interference 7.Lenses and the human eye This week’s lab(s), 3 out of 4
LEAST SQUARES FITTING (Ch.8) Purpose: 1) Agreement with theory? 2) Parameters y(x) = Bx
LINEAR FIT y(x) = A +Bx : A – intercept with y axis B – slope x1y1 x2y2 x3y3 x4y4 x5y5 x6y6 A where B=tan
? LINEAR FIT y(x) = A +Bx x1y1 x2y2 x3y3 x4y4 x5y5 x6y6 y=-2+2x y=9+0.8x
y(x) = A +Bx y=-2+2x y=9+0.8x Assumptions: x j << y j ; x j = 0 2)y j – normally distributed j : same for all y j x1y1 x2y2 x3y3 x4y4 x5y5 x6y6 LINEAR FIT
LINEAR FIT: y(x) = A + Bx y 3 -yfit 3 y 4 -yfit 4 Yfit(x) [y j -yfit j ] 2 Quality of the fit Method of linear regression, aka the least-squares fit….
LINEAR FIT: y(x) = A + Bx y 3 -(A+Bx 3 ) y 4 -(A+Bx 4 ) true value [y j -(A+Bx j )] 2 minimize Method of linear regression, aka the least-squares fit….
What about error bars? Not all data points are created equal!
Weight-adjusted average: Reminder: Typically the average value of x is given as: Sometimes we want to weigh data points with some “weight factors” w 1, w 2 etc: You already KNOW this – e. g. your grade: Weights: 20 for Final Exam, 20 for Formal Report, and 12 for each of 5 labs – lowest score gets dropped)
More precise data points should carry more weight! Idea: weigh the points with the ~ inverse of their error bar
Weight-adjusted average: How do we average values with different uncertainties? Student A measured resistance 100±1 (x 1 =100 , 1 =1 ) Student B measured resistance 105±5 (x 2 =105 , =5 ) Or in this case calculate for i=1, 2: with “statistical” weights: BOTTOM LINE: More precise measurements get weighed more heavily!
How good is the agreement between theory and data? TEST for FIT (Ch.12)
d = N - c # of degrees of freedom # of data points # of parameters calculated from data # of constraints
y 3 -(A+Bx 3 ) y 4 -(A+Bx 4 ) true value LEAST SQUARES FITTING Minimize … 3. A in terms of x j y j ; B in terms of x j y j, … 4. Calculate 5. Calculate 6. Determine probability for x j y j y=f(x) y(x)=A+Bx+Cx 2 +exp(-Dx)+ln(Ex)+…
Usually computer program (for example Origin) can minimize as a function of fitting parameters (multi-dimensional landscape) by method of steepest descent. Think about rolling a bowling ball in some energy landscape until it settles at the lowest point Fitting Parameter Space Best fit (lowest 2) Sometimes the fit gets “stuck” in local minima like this one. Solution? Give it a “kick” by resetting one of the fitting parameters and trying again
Example: fitting datapoints to y=A*cos(Bx) “Perfect” Fit
Example: fitting datapoints to y=A*cos(Bx) “Stuck” in local minima of 2landscape fit
Next on PHYS 2CL: Monday, May 18, Review Lecture