Lab 4: Least Square Fitting - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Lab 4: Least Square Fitting

Description:

Lab 4: Least Square Fitting * * * * * * * * * * * * * Lab 4: Least Square Fitting The most popular approach of linear regression (y=A+Bx) Linear regression is widely ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 24
Provided by: Weid150
Category:

less

Transcript and Presenter's Notes

Title: Lab 4: Least Square Fitting


1
Lab 4 Least Square Fitting
2
Lab 4 Least Square Fitting
  • The most popular approach of linear regression
    (yABx)
  • Linear regression is widely used in biological,
    behavioral and social sciences to describe
    possible relationships between variables. It is
    ranked as one of the most important tools used in
    these disciplines.
  • Based on a set of measurements (xi, yi)
  • Calculate parameters A and B.
  • Evaluate the quality of the fitting
  • Principle of maximum likelihood

3
Statistics of a single quantity
Principle of maximum likelihood
4
Statistics of the relationship between multiple
quantities
5
Calculate A and B with least square fitting
The simplest case
  • Assumptions
  • for a set of measurements (xi, yi), i1, , N
  • Ignore uncertainties of xi (correlated with yi)
  • Uncertainty of y follows a Gaussian distribution
    w/ true value YiAB?xi, and the same standard
    deviation sy (no need to know its value a priori)
  • Principle of maximum likelihood.

6
Calculate A and B with least square fitting
The simplest case
The probability of one measurement (xi, yi) is
The probability of (xi, yi), i1, , N is
Chi square
?2 is a measure of how well the fitting is.
7
The simplest case (cont.)
Principle of maximum likelihood
8
The simplest case (cont.)
9
The simplest case (cont.)
The solution is
No need to know sy!
10
Estimate the uncertainty of y
Similar to N measurement of the same quantity
(if we know the true values of A and B)
However, we dont really know the true value of A
and B. Instead, we use the best estimates for A
and B, which reduce the value of above formula
and need to be compensated.
One can always find a line that perfectly passes
through 2 points.
11
Uncertainties of A and B
Pr. 8.16
Using error propagation formula
12
Weighted Least Square fitting (this lab)e.g. yi
with different uncertainties
13
Weighted Least Square fitting
Pr. 8.9
More general case
  • Assumptions
  • for a set of measurements (xi, yi), i1, , N
  • Ignore the uncertainties of xi
  • Uncertainties of yis follow Gaussian
    distribution w/ true values YiABxi, and
    standard deviations si (which are needed for
    fitting).
  • Principle of maximum likelihood.

14
Pr. 8.9
Weighted Least Square fitting
More general case
The probability of one measurement (xi, yi) is
The probability of (xi, yi), i1, , N is
Chi square
Different for every i.
15
More general case (cont.)
Principle of maximum likelihood
16
More general case (cont.)
17
Uncertainties of A and B
Pr. 8.19
Using error propagation formula
E.g.
18
Uncertainties of A and B (cont.)
19
Summary of Least square fitting
Only linear algebra!
  • Assumptions
  • for a set of measurements (xi, yi), i1, , N
  • Uncertainty of y follows Gaussian distribution w/
    true value YiABxi, and standard deviation si
  • Principle of maximum likelihood.

20
Lab 4 ? decay of 137Ba
Half life D0.5 D0
Show derivation in your report
Linear regression
21
Uncertainty is not constant!
Uncertainty of decay count Di (Poisson)
At time progresses, Di is getting smaller and
smaller.
What is the uncertainty of lnDi ?
22
The background radiation
Background radiation is the radiation constantly
present in the natural environment of the Earth,
which is emitted by natural and artificial
sources.
  • Sources in the Earth.
  • Sources from outer space, such as cosmic rays.
  • Sources in the atmosphere, such as the radon gas
    released from the Earth's crust.

23
Lab 4 Least Square Fitting of decay counts
  • One run of decay counts/interval (D) vs. time (t)
  • Must start counting shortly after sample is
    loaded
  • Sampling rate 10 second/sample (?t)
  • Run time 600 seconds ( of measurements n60).
  • Measurement of background radiation
  • Wait 20-30 minutes
  • Repeat the counting experiment in 1.
  • Make sure no other radioactive sources near your
    counter
  • Analyze data
  • Subtract background DD-Db, error propagation.
  • plot D vs. t and lnD vs. t
  • Least square fit and overlap your fitting curves
    with data plots.
  • Origin (OriginLab) is more convenient than
    Matlab.
Write a Comment
User Comments (0)
About PowerShow.com