Separate the unknowns by how they enter the observations
Suppose observations at known times \(t_i\) have mean \(y_i=b+a e^{-k t_i}\) with \(k>0\). Both \(a\) and \(b\) enter linearly once \(k\) is specified. For independent equal-variance measurement noise, minimising squared residuals is a natural fit. More general known covariance can be incorporated by whitening the data and model columns together. Fitting all three unknowns by nonlinear iteration is possible, but every candidate rate should be judged against the best available amplitude and background at that rate. Otherwise an apparent improvement or failure of the rate may merely reflect a poor nuisance estimate.
Let \(s_i=e^{-kt_i}\), bars denote sample means, and regress \(y_i\) on \(1,s_i\). Differentiating the sum of squared residuals with respect to \(b\) gives
Substitution and differentiation with respect to \(a\) yield
The denominator vanishes when all times coincide or \(k=0\), at which point the two columns are identical. A QR or SVD of the whitened design reveals this rank loss. The simple centred formulas are transparent for analysis; for large poorly scaled datasets a stable factorisation remains preferable to unmonitored normal equations. Define profile objective \(\Phi(k)=\tfrac12\sum_i r_i^2\),
A one-dimensional search can now explore its shape, bounds or competing minima.
Differentiate the profiled objective without differentiating the whole fit
Write \(X=[\mathbf1,s]\), \(c=(b,a)^T\) and \(r=y-Xc\). At the least-squares solution \(X^Tr=0\). Taking the total derivative of \(\Phi=r^Tr/2\) gives \(-r^T(X'c+Xc')\). The term with \(c'\) vanishes by orthogonality, leaving \(\Phi'=-r^TX'c=a\sum_i r_i t_i e^{-kt_i}\). This simplification applies to the scalar objective gradient, not necessarily to the full residual Jacobian or second derivative. The projected component \((I-P_X)X'c\) is the local model change with rate that cannot be absorbed by a linear-nuisance adjustment. Its whitened squared norm characterises rate information near a well-fitting model.
At short times,
Data resolving only a constant and a slope constrain \(a+b\) and \(ak\), not \(a,b,k\) individually. Making the inner least-squares solve arbitrarily accurate cannot create curvature information absent from the acquisition. Include times approaching the decay time and a late observation near the baseline if feasible. Alternatively supply an independently characterised background with uncertainty rather than fixing it silently. A flat profile exposes this identifiability issue more clearly than a single successful three-parameter optimiser status.
Recover a rate exactly before introducing noise
At \(t=0,1,2,3\) s consider the noiseless data \(5,3,2,1.5\) in sensor units. Successive differences are \(-2,-1,-0.5\), a geometric sequence with ratio \(q=e^{-k}=1/2\). The rate is \(k=\ln2\,\mathrm{s^{-1}}\), and substituting the first two points gives
At the correct rate the profile residual vanishes. An independent numerical implementation should reproduce both the rate and these coefficients and show \(X^Tr\) near zero for every rate, including incorrect candidate rates. These checks distinguish errors in profiling from failures of the outer search.
The difference ratio gives a poor general estimator when the later differences approach the measurement noise. Its numerator and denominator share observed samples, so their errors are correlated. Profiling the original observations uses all data without creating these ratio singularities and permits weighting by known variances. A late-time outlier can nonetheless bias a nonlinear fit with only a handful of samples. Examine the four individual residuals and compare predictions at a held-out time before interpreting a narrow numerical minimum as an identified physical mechanism.
Inspect the rate profile after refitting amplitude and background
The calculation uses the four times above and adds a controlled perturbation to one late observation. It solves the two linear nuisance parameters afresh at each trial rate; a second curve evaluates the same rate with amplitude and background fixed to their original noiseless values. Comparing them makes visible how allowing nuisance parameters to adapt changes both the best rate and the apparent uncertainty. At zero perturbation both curves share \(k=\ln2\), but only the profiled curve describes the stipulated joint fit.
What precision would the four measurements support?
Let the four observations have independent, equal standard deviation \(\sigma\). A small change in rate has derivative vector \(v_i=-a t_i e^{-kt_i}\). Refitting amplitude and background can mimic any change in the span of \(s_i=e^{-kt_i}\) and the constant vector. Only the orthogonal component \(v_\perp=(I-P_X)v\) distinguishes the rate. At the baseline \(a=4,\ k=\log 2\), the unprojected derivative is \((0,-2,-2,-1.5)\). Regressing it on \(s\) and a constant gives slope \(1.98261\) and intercept \(-2.30435\). Subtract that fit and add the squared remainders to obtain
The local least-squares change in rate due to a noise vector is \(v_\perp^T\epsilon/\|v_\perp\|^2\). Its standard deviation is therefore \(\sigma/\|v_\perp\|\). For \(\sigma=0.10\) this is approximately \(0.104\ {\rm s}^{-1}\). Tiny tolerances in the scalar optimiser cannot supply additional information. The estimate assumes small perturbations and an adequate decay law. A visibly asymmetric profile requires inspecting the actual objective on both sides before attaching symmetric error bars.
Tutorial · distinguish a narrow numerical minimum from identified data
Check a false rate numerically
For the noiseless observations take \(q=e^{-k}=1/4\). Compute the best linear background and amplitude approximately. Verify that the sum of residuals vanishes although the fit is wrong.
Work through the solution
Here \(s=(1,0.25,0.0625,0.015625)\). Using the centred expressions gives \(a\simeq3.325,\ b\simeq1.771\). The mean prediction equals the observed mean \(2.875\) by construction, forcing the residual sum to zero. The individual residuals are not all zero because their successive differences have ratio \(1/2\) instead of \(1/4\). Orthogonality to fitted columns certifies the conditional linear solve, not the outer rate.
Measure how the profile changes if the sampling interval doubles
Suppose the same four numerical readings are obtained at \(0,2,4,6\) s. Which parameters change, and which ratio argument still works?
Work through the solution
The decay per sample remains \(q=0.5\), but now \(q=e^{-2k}\), so
Amplitude and baseline stay 4 and 1. Reporting \(q\) as a per-second rate without including time spacing would create a factor-of-two physical error even though every fitted residual vanishes.
Identify a structurally invisible rate
Take a preparation with true amplitude \(a=0\), independent equal-variance noise and an unknown baseline. Can any choice of times identify \(k\) from the exact noiseless data?
Work through the solution
For every \(k>0\) the inner fit permits \(a=0,b=\bar y\), giving zero residual for constant data. The local rate derivative \(X'c\) vanishes and the profile carries no rate information. Random noise may select a numerical minimum, but it does not turn the true no-decay signal into an identified relaxation rate. The experiment needs a preparation with measurable nonzero excitation or a different observable sensitive to the rate.