Reweight an unreliable reading
Fit a constant to the readings 1, 2 and 8. First minimise the unweighted sum of squared deviations. Next suppose the third reading has standard deviation twice that of the others, with independent zero-mean errors. Write the weighted objective, find its minimiser, and explain the change.
Worked solution
For equal weights, differentiating \(\sum(y_i-c)^2\) gives \(3c=11\), so \(c=11/3\). With independent errors, weighting by inverse variance gives relative weights \(1,1,1/4\). Differentiate \((1-c)^2+(2-c)^2+(8-c)^2/4\) to get \(2.25c=5\), or \(c=20/9\).
The high reading has less leverage because its prescribed uncertainty is larger. The weighted residual sum vanishes at the answer: \(\sum w_i(y_i-c)=0\). This argument depends on the uncertainty model, and a common calibration offset cannot be removed by treating measurements as independent.
Try this calculation. Change one observation’s uncertainty and recompute the weighted projection. More than one fitted coefficient requires the additional basis columns specified in this exercise.
Rotate into a better fitting basis
For sample positions \(s=999,1000,1001\), consider columns \(1\) and \(s\). Compute their dot product. Replace the second column by \(s-1000\), compute the new two-by-two Gram matrix, and express the original intercept and slope for a centred fit \(5+0.2(s-1000)\). Which intercept most directly represents the experiment?
Worked solution
The original column dot product is 3000. The centred positions sum to zero and have squared norm two. The new Gram matrix is diagonal with entries 3 and 2, so the fitted mean and trend separate in the normal equations.
Expanding gives intercept \(5-200=-195\) and slope 0.2. The centred intercept is 5 at a measured position. The original intercept extrapolates roughly a thousand position units from the data, so a small slope error can change it considerably.
Try this calculation. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.
Calculate a smoothing factor
On an eight-interval Dirichlet grid take Jacobi error modes \(j=1\) and \(j=7\). Find both amplification factors for ordinary Jacobi and for weighted Jacobi with weight \(2/3\). Predict the magnitude of the high-frequency component after three weighted sweeps if its initial amplitude is one.
Worked solution
Ordinary Jacobi gives
The weighted factors are
Three weighted sweeps leave magnitude \(0.28259^3\simeq0.0226\) of the high-frequency error. The smooth error retains \(0.94925^3\simeq0.855\) of its amplitude. A coarse-grid correction should therefore target the smooth component.
Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.