A weighted least-squares fit gives a fitted intercept and slope with means
PHYSICS · Subjective · Fermi University Physics · Scientific Practice & Experimental Methods · Data analysis and model fitting in the laboratory · Data analysis and model fitting in the laboratory
Error, Chance and the Machine, Ch Monte Carlo integration and variance reduction
Problem
A weighted least-squares fit gives a fitted intercept a and slope b with means ⟨a⟩=5.0, ⟨b⟩=2.0 and covariance matrix V=(4.03.03.09.0) in the fit's units (so var(a)=4.0, var(b)=9.0, cov(a,b)=3.0). Using the Cholesky factor L of V (with V=LLT and L lower triangular, so that L=RT for the upper-triangular factor R with V=RTR) and a pair of independent standard normal draws z1=1.0, z2=−0.5, generate one correlated sample (a,b) with the fit's covariance structure.