210 likes | 574 Views
PHYSICS 2CL – SPRING 2009 Physics Laboratory: Electricity and Magnetism, Waves and Optics. Prof. Leonid Butov (for Prof. Oleg Shpyrko) oshpyrko@physics.ucsd.edu Mayer Hall Addition (MHA) 3681, ext. 4-3066 Office Hours: Mondays, 3PM-4PM.
E N D
PHYSICS 2CL – SPRING 2009Physics Laboratory: Electricity and Magnetism, Waves and Optics Prof. Leonid Butov (for Prof. Oleg Shpyrko) oshpyrko@physics.ucsd.edu Mayer Hall Addition (MHA) 3681, ext. 4-3066 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
Labs Done This Quarter 0. Using lab hardware & software • Analog Electronic Circuits (resistors/capacitors) • Oscillations and Resonant Circuits (1/2) • Resonant circuits (2/2) • Refraction & Interference with Microwaves • Magnetic Fields • LASER diffraction and interference • 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
A LINEAR FIT y(x) = A +Bx : A – intercept with y axis B – slope q where B=tanq
LINEAR FIT ? y(x) = A +Bx y=-2+2x y=9+0.8x
LINEAR FIT y(x) = A +Bx y=-2+2x y=9+0.8x • Assumptions: • dxj << dyj ; dxj = 0 • yj – normally distributed • sj: same for all yj
LINEAR FIT: y(x) = A + Bx S [yj-yfitj] Method of linear regression, aka the least-squares fit…. Yfit(x) 2 Quality of the fit y4-yfit4 y3-yfit3
LINEAR FIT: y(x) = A + Bx S [yj-(A+Bxj)] Method of linear regression, aka the least-squares fit…. true value 2 minimize y4-(A+Bx4) y3-(A+Bx3)
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” w1, w2 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 W (x1=100 W, s1=1 W) Student B measured resistance 105±5 W (x2=105 W, s2=5 W) Or in this case calculate for i=1, 2: with “statistical” weights: BOTTOM LINE: More precise measurements get weighed more heavily!
c2TEST for FIT (Ch.12) How good is the agreement between theory and data?
c2TEST for FIT (Ch.12) # of degrees of freedom d = N - c # of data points # of parameters calculated from data # of constraints
LEAST SQUARES FITTING true value xj yj y=f(x) y(x)=A+Bx+Cx2+exp(-Dx)+ln(Ex)+… y4-(A+Bx4) y3-(A+Bx3) 1. … 2. Minimize c2: 3. A in terms of xj yj ; B in terms of xj yj , … 4. Calculate c2 5. Calculate 6. Determine probability for
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 Best fit (lowest c2) 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 Fitting Parameter Space
Example: fitting datapoints to y=A*cos(Bx) “Perfect” Fit
Example: fitting datapoints to y=A*cos(Bx) “Stuck” in local minima of c2landscape fit
Next on PHYS 2CL: Monday, May 18, Review Lecture