Presentation is loading. Please wait.

Presentation is loading. Please wait.

9. Data Fitting Fitting Experimental Spectrum

Similar presentations


Presentation on theme: "9. Data Fitting Fitting Experimental Spectrum"— Presentation transcript:

1 9. Data Fitting Fitting Experimental Spectrum
Fitting Exponential Decay Theory: Probability & Statistics Least-Square Fitting Calling LAPACK from C

2 9.1. Fitting Experimental Spectrum
Two types of techniques for fitting data : Interpolation: polynomials passing through all data points. Least-squares: model with adjustable parameters. Model :

3 Lagrange Interpolation
nth order polynomial passing through n + 1 data points { ( xi , fi ) ; i = 0,1,...,n } : where i  j   k  i ,  x 1 2 4 f(x) 12 24 60 E.g.

4 Assuming f describe the 1st n derivatives exactly, then the remainder theorem gives :
Ex Do §

5 Cubic Splines Ref: D.Kincaid, W.Cheney, "Numerical Analysis", § 6.4, Brook (1991) Given a set of n + 1 data points { ( xi , yi ) ; i = 0,1,..., n }, the cubic spline S(x) interpolates each of the n intervals with a 3rd degree polynomial such that S passes through all n + 1 data points. f  & f  are continuous in all n  1 interior points. # of parameters = P = 4 n. # of constraints = C = 2n + 2(n 1) = 4n 2 Natural spline : S 0 = S n = 0

6 For Si on interval [ xi , xi+1 ] :
Since Si is a 3rd degree polynomial, Si is linear in x. where

7 With z0 = zn = 0, is a tri-diagonal linear system for the unknowns { zi ; i = 1,..., n1 } Once it’s solved, say, by Gaussian elimination ( Thomas algorithm ), one has Ex Do a spline fit for the cross section data ( see § 9.1.5).

8 9.2. Fitting Exponential Decay
Theory : stochastic events: Task: ‘Fit’ theory to experimental data by choosing the ‘best’ values of N0 and .

9 9.3. Theory: Probability & Statistics
Basics ( discrete events ) : Probability P(x) of event x (occurring) : 0  P(x)  1. 1  P(x)  Probability of event x not occurring. In the sampling of a population, P(x) of a particular sample having value x is : Mean value of a function f(x) is :

10 Binomial Distribution
Let the probability of success in each trial be p. After N trials, the probability of having succeeded x times is

11 Gaussian & Poisson Distribution
See F.Reif, “Fundamentals of Statistical & Thermal Physics, §1.6 & Prob 1.9. As N   while   Np remains finite, PB becomes the Gaussian distribution As N   while p  0, PB becomes the Poisson distribution

12 9.4. Least-Square Fitting Given ND data points { xi , yi ± i } , i = 1,..., ND , & a model function g(x) = g(x; {m} ) of Np parameters m, m = 1,..., Np, find the values of {m} by minimizing Thus, m = 1,..., Np Ex Do Exercise in §

13 Linear Regression

14 To minimize subtractive cancellation error, let
where

15 Nonlinear Fit of Breit-Wigner to Cross Section
Breit-Wigner resonance formula :

16

17 9.5. Calling LAPACK from C


Download ppt "9. Data Fitting Fitting Experimental Spectrum"

Similar presentations


Ads by Google