quality:correction
Extension by weights

When the observations are not equally reliable, a weighted sum of squares may be minimized,

Each element of the diagonal weight matrix W should, ideally, be equal to the reciprocal of the error variance of the measurement. The normal equations are then, more generally,