6.6 Exponential decay and least-squares fitting
Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §6.6–6.7.2. Rewritten in original wording. Continues 6.5.2b Cubic splines labs. Labs: 6.6b Least-squares fitting labs.
Fitting exponential decay
Real particle-decay measurements — such as the number of -meson decays recorded in 10-ns time bins — are noisy and finite in number, unlike the smooth theoretical curve they're compared against. Given such data, the problem is to deduce a physical constant, the particle lifetime , from the scatter.
The underlying physics is a stochastic process: in a short time , the number of decays out of remaining particles is proportional to both and :
with the lifetime. Taking yields , whose solution is exponential decay — the curve to fit (compare against the tabulated pion lifetime s). The walk below linearizes that fit and recovers from a straight line.
Why "best fit" doesn't mean "passes through every point"
Three points frame all of least-squares fitting:
- If the data carry real experimental error, the statistically "best" fit will not pass through every data point — forcing that (as Lagrange interpolation does) actually makes the fit worse, not better.
- If the assumed theoretical form is wrong for the data, its best fit may simply be a poor fit — and that's useful information, since it tells you the theory doesn't apply.
- Only the simplest case — a fit linear in its parameters — has a closed-form solution. Everything else needs a trial-and-error numerical search (Section 6.8).
Chi-square and linear least squares
Given measurements and a theory with parameters, least-squares fitting adjusts the to minimize . When the stationarity conditions are linear — closed formulas for (and a stabler centered form). Walk normal equations — pick the matching formula at each step.
If depends on the nonlinearly, the same stationarity conditions become a nonlinear system — search (Section 6.8), trying several starts so a found minimum is global.
Rule of thumb (Gaussian errors): a good fit has . Much smaller usually means too many parameters or overestimated ; much larger usually means a bad theory or underestimated errors. If is unknown, a common fallback is .
Parameter uncertainties and correlation follow from the same weighted sums: , , , and .
Turning exponential decay into a linear fit
is nonlinear in , but a logarithm linearizes it. Pick the decay law, the line, and the recovery formulas among lookalikes.
Extending to a quadratic (still linear in the parameters!)
is still a linear fit — linearity refers to the dependence on the 's, not on . (By contrast, is not linear, because appears inside the exponential.) Minimizing for the quadratic gives three simultaneous linear equations in :
with , , extending the earlier sums. In matrix form this is with
For a closed form exists, but larger problems need a numerical linear solve — the same kind of Gaussian-elimination machinery used for the cubic-spline system in the previous lesson. This pattern — more parameters, same structure — is exactly why linear algebra libraries (Chapter 7) matter for fitting realistic models.
Least-squares fitting
1 / 4chi-square weights each residual by…
Pick an answer to see if you are right.