Weighting factors in least squares

The accessibility of high speed computers (or even mod- em desk calculators) has increased the popularity of least squares methods in chemistry...
1 downloads 0 Views 1MB Size
Donald E. Sands University of Kentucky Lexington, 40506

Weighting Factors in Least Squares

The accessibility of high speed computers (or even modem desk calculators) has increased the popularity of least squares methods in chemistry. This new-found ability to do least squares fits extends ever? to nonlinear problems, and the technique deserves emphasis in the modern undergraduate chemistry curriculum. However, some problems in applying the method have become visible; these difficulties are present even in the linear cases, but recent inclinations to do calculations in more than one way have made the pitfalls more apparent. As a simple example, consider the equation Y, = Ax,

(1)

where we have a set of values xi and the corresponding y,, and we want to find the "hest" value of the coefficient A. According to the principle of least squares, this best value is that which causes Q = Xw;(y,

- Ax,)'

(2)

to be a minimum, where the wj are weighting factors that must be chosen appropriately. Adjusting A to minimize Q leads to the normal equation

In order to carry out the calculation represented by eqn. (3), we must know not only the values of xi and yi, hut will dve also the weiehts w i . c iff^^^^^ choices of different val;es of A, and we must set some Friterion ghat will specify a suitable set of weights. One such condition may he based upon the variance of A, 02(A); let US require that aZ(Al be a minimum. BY the usual methods for studying propagation of error

In eqn. (4) we have assumed the independence of all the xi and yi; if this is not the case, cross-terms involving the covariances of the correlated. variables must be included ( I ) ; such problems are best treated with the aid of a matrix fornulation of least squares, which elegantly expresses both linear and nonlinear cases (2). We shall assume for algebraic tractability that the a2(x,) in eqn. (4) are negligible, so we need include only the oYyi) term in the calculation. We shall return later to the more general

case. Using eqn. (3) to evaluate the partial derivatives of A with respect to the yi, we obtain aTA)Z2w,x,'= Z~,'x,~o