The topic: Least squares method Numeriska beräkningar i Naturvetenskap och Teknik
An exemple Model Why do the measured values deviate from the model if the measurement is correct? Numeriska beräkningar i Naturvetenskap och Teknik
How determine the ‘best’ straight line? Model Numeriska beräkningar i Naturvetenskap och Teknik
Distance between line and measurements points... Numeriska beräkningar i Naturvetenskap och Teknik
How to define the distance between the line and the measurement points? Largest deviation at minimum Approximation in maximum norm Sum of deviations squared as small as possible Approximation in Euclidian norm Easier to calculate! Norm Numeriska beräkningar i Naturvetenskap och Teknik
Matrix formulation: An example with More equations than unknowns! Numeriska beräkningar i Naturvetenskap och Teknik
Matrix formulation: An example Numeriska beräkningar i Naturvetenskap och Teknik
Matrix formulation: An example Numeriska beräkningar i Naturvetenskap och Teknik
Matrix formulation: An example Numeriska beräkningar i Naturvetenskap och Teknik
General Statement of the Problem: Depending on the model, the measurement data can of course be described by other expressions than the straight line. In general terms one seeks a function f* that approximates f’s given values as well as possible in euclidian norm. Specifically, above we looked for a solution expressed as but we could as well have looked for a solution given by another function (possibly then for different data) etc... Numeriska beräkningar i Naturvetenskap och Teknik
Generally one can thus write: f(x) is in other words a linear combination of given functions Where the coefficients are sought One can in accordande with a vector space look at it so that Spans a function space (a space of this kind which fulfills certain conditions is called a Hilbert space, cmp. quant. mech) Numeriska beräkningar i Naturvetenskap och Teknik
In the case of the straight line we have In a geometrical comparision these two functions, which can be seen as two vectors in the function space, span a plane U: ”vector” 0 ”vector” 1 Approximating function sought function The smallest distance from the plane is given by a normal. The Smallest deviation between f* och f is for f*-f orthogonal to the plane U! Numeriska beräkningar i Naturvetenskap och Teknik
Normal equations Since we are interested in fitting m measured values we leave the picture of the continuous function space and view f(x) as an m-dimensional vector with values: That should be expressed byand For the straight line: Numeriska beräkningar i Naturvetenskap och Teknik
The orthogonality condition now gives the equations: where the equations for the normal: Which gives Numeriska beräkningar i Naturvetenskap och Teknik
The equations for the normal : Numeriska beräkningar i Naturvetenskap och Teknik
Back to the exemple: Model: Data: Numeriska beräkningar i Naturvetenskap och Teknik
Conclusion: the minimum of is orthogonal to the basis vectors Assuming the modelGiven data is obtained when The coefficienterna c 1, c 2, c 3, c n are determined from Numeriska beräkningar i Naturvetenskap och Teknik
The equations or Where the colomuns in A are: Numeriska beräkningar i Naturvetenskap och Teknik
Note 1: The func’s Have to be linearly independent (cmp vectors in a vector space) Note 2: Assume our problem would have been (x koord -996) cmp to Numeriska beräkningar i Naturvetenskap och Teknik