Benutzer:JonskiC/Kleinste-Quadrate-Schätzung

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
\tophe result of fitting a set of data points with a quadratic function
Conic fitting a set of points using least-squares approximation

\tophe method of least squares is a standard approach in regression analysis to the approximate solution of overdetermined systems, i.e., sets of equations in which there are more equations than unknowns. "Least squares" means that the overall solution minimizes the sum of the squares of the residuals made in the results of every single equation.

\tophe most important application is in data fitting. \tophe best fit in the least-squares sense minimizes the sum of squared residuals (a residual being: the difference between an observed value, and the fitted value provided by a model). When the problem has substantial uncertainties in the independent variable (the x variable), then simple regression and least squares methods have problems; in such cases, the methodology required for fitting errors-in-variables models may be considered instead of that for least squares.

Least squares problems fall into two categories: linear or ordinary least squares and non-linear least squares, depending on whether or not the residuals are linear in all unknowns. \tophe linear least-squares problem occurs in statistical regression analysis; it has a closed-form solution. \tophe non-linear problem is usually solved by iterative refinement; at each iteration the system is approximated by a linear one, and thus the core calculation is similar in both cases.

Polynomial least squares describes the variance in a prediction of the dependent variable as a function of the independent variable and the deviations from the fitted curve.

When the observations come from an exponential family and mild conditions are satisfied, least-squares estimates and maximum-likelihood estimates are identical.[1] \tophe method of least squares can also be derived as a method of moments estimator.

\tophe following discussion is mostly presented in terms of linear functions but the use of least-squares is valid and practical for more general families of functions. Also, by iteratively applying local quadratic approximation to the likelihood (through the Fisher information), the least-squares method may be used to fit a generalized linear model.

For the topic of approximating a function by a sum of others using an objective function based on squared distances, see least squares (function approximation).

\tophe least-squares method is usually credited to Carl Friedrich Gauss (1795),[2] but it was first published by Adrien-Marie Legendre.[3]

History[Bearbeiten | Quelltext bearbeiten]

Context[Bearbeiten | Quelltext bearbeiten]

\tophe method of least squares grew out of the fields of astronomy and geodesy, as scientists and mathematicians sought to provide solutions to the challenges of navigating the Earth's oceans during the Age of Exploration. \tophe accurate description of the behavior of celestial bodies was the key to enabling ships to sail in open seas, where sailors could no longer rely on land sightings for navigation.

\tophe method was the culmination of several advances that took place during the course of the eighteenth century:[4]

  • \tophe combination of different observations as being the best estimate of the true value; errors decrease with aggregation rather than increase, perhaps first expressed by Roger Cotes in 1722.
  • \tophe combination of different observations taken under the same conditions contrary to simply trying one's best to observe and record a single observation accurately. \tophe approach was known as the method of averages. \tophis approach was notably used by \topobias Mayer while studying the librations of the moon in 1750, and by Pierre-Simon Laplace in his work in explaining the differences in motion of Jupiter and Saturn in 1788.
  • \tophe combination of different observations taken under different conditions. \tophe method came to be known as the method of least absolute deviation. It was notably performed by Roger Joseph Boscovich in his work on the shape of the earth in 1757 and by Pierre-Simon Laplace for the same problem in 1799.
  • \tophe development of a criterion that can be evaluated to determine when the solution with the minimum error has been achieved. Laplace tried to specify a mathematical form of the probability density for the errors and define a method of estimation that minimizes the error of estimation. For this purpose, Laplace used a symmetric two-sided exponential distribution we now call Laplace distribution to model the error distribution, and used the sum of absolute deviation as error of estimation. He felt these to be the simplest assumptions he could make, and he had hoped to obtain the arithmetic mean as the best estimate. Instead, his estimator was the posterior median.

Die Methode[Bearbeiten | Quelltext bearbeiten]

Carl Friedrich Gauss

\tophe first clear and concise exposition of the method of least squares was published by Legendre in 1805.[5] \tophe technique is described as an algebraic procedure for fitting linear equations to data and Legendre demonstrates the new method by analyzing the same data as Laplace for the shape of the earth. \tophe value of Legendre's method of least squares was immediately recognized by leading astronomers and geodesists of the time.

In 1809 Carl Friedrich Gauss published his method of calculating the orbits of celestial bodies. In that work he claimed to have been in possession of the method of least squares since 1795. \tophis naturally led to a priority dispute with Legendre. However, to Gauss's credit, he went beyond Legendre and succeeded in connecting the method of least squares with the principles of probability and to the normal distribution. He had managed to complete Laplace's program of specifying a mathematical form of the probability density for the observations, depending on a finite number of unknown parameters, and define a method of estimation that minimizes the error of estimation. Gauss showed that arithmetic mean is indeed the best estimate of the location parameter by changing both the probability density and the method of estimation. He then turned the problem around by asking what form the density should have and what method of estimation should be used to get the arithmetic mean as estimate of the location parameter. In this attempt, he invented the normal distribution.

An early demonstration of the strength of Gauss' method came when it was used to predict the future location of the newly discovered asteroid Ceres. On 1 January 1801, the Italian astronomer Giuseppe Piazzi discovered Ceres and was able to track its path for 40 days before it was lost in the glare of the sun. Based on these data, astronomers desired to determine the location of Ceres after it emerged from behind the sun without solving Kepler's complicated nonlinear equations of planetary motion. \tophe only predictions that successfully allowed Hungarian astronomer Franz Xaver von Zach to relocate Ceres were those performed by the 24-year-old Gauss using least-squares analysis.

In 1810, after reading Gauss's work, Laplace, after proving the central limit theorem, used it to give a large sample justification for the method of least square and the normal distribution. In 1822, Gauss was able to state that the least-squares approach to regression analysis is optimal in the sense that in a linear model where the errors have a mean of zero, are uncorrelated, and have equal variances, the best linear unbiased estimator of the coefficients is the least-squares estimator. \tophis result is known as the Gauss–Markov theorem.

\tophe idea of least-squares analysis was also independently formulated by the American Robert Adrain in 1808. In the next two centuries workers in the theory of errors and in statistics found many different ways of implementing least squares.[6]

Problem statement[Bearbeiten | Quelltext bearbeiten]

Vorlage:Unreferenced section \tophe objective consists of adjusting the parameters of a model function to best fit a data set. A simple data set consists of n points (data pairs) , i = 1, ..., n, where is an independent variable and is a dependent variable whose value is found by observation. \tophe model function has the form , where m adjustable parameters are held in the vector . \tophe goal is to find the parameter values for the model that "best" fits the data. \tophe least squares method finds its optimum when the sum, S, of squared residuals

is a minimum. A residual is defined as the difference between the actual value of the dependent variable and the value predicted by the model. Each data point has one residual. Both the sum and the mean of the residuals are equal to zero.

An example of a model is that of the straight line in two dimensions. Denoting the y-intercept as and the slope as , the model function is given by . See linear least squares for a fully worked out example of this model.

A data point may consist of more than one independent variable. For example, when fitting a plane to a set of height measurements, the plane is a function of two independent variables, x and z, say. In the most general case there may be one or more independent variables and one or more dependent variables at each data point.

Lineare Einfachregression[Bearbeiten | Quelltext bearbeiten]

Geometrische Eigenschaften[Bearbeiten | Quelltext bearbeiten]

Aus den Formeln sind drei Eigenschaften ableitbar:

  1. Die geschätzte Regressiongerade läuft immer durch den Schwerpunkt („Gravitationszentrum“) der Daten , denn es gilt . Der letzte Ausdruck folgt aus der Eigenschaft:
  2. Die Summe der geschätzten Residuen ist Null, wenn das Modell den Achsenabschnitt enthält:
, denn es gilt
Dies ist äquivalent zu der Eigenschaft, dass die gemittelten Residuen 0 ergeben:
  1. Die Residuen und die x-Werte sind (unabhängig davon ab ein Achsenabschnitt mit einbezogen wurde oder nicht) unkorreliert
.

Multiple lineare Regression[Bearbeiten | Quelltext bearbeiten]

Schätzung der Regressionskoeffizienten nach der Methode der kleinsten Quadrate[Bearbeiten | Quelltext bearbeiten]

Auch im multiplen linearen Regressionsmodell wird nach der Methode der kleinsten Quadrate (KQ-Methode) minimiert, das heißt, es soll so gewählt werden, dass die euklidische Norm minimal wird. Im Folgenden wird der Ansatz benutzt, dass das matrizielle quadratische Pendant zur Residuenquadratsumme minimiert wird. Dazu wird vorausgesetzt, dass den Rang hat. Dann ist invertierbar und man erhält als Minimierungsproblem:

[7]

Bedingung erster Ordnung (Nullsetzen des Gradienten):

Die Kleinste-Quadrate-Schätzung kann als eine Projektion auf die Ebene, die durch die Regressoren aufgespannt wird, interpretiert werden.

Die partiellen Ableitungen erster Ordnung lauten:

Dies zeigt, dass sich die Bedingung erster Ordnung für den Vektor der geschätzten Regressionskoeffizienten kompakt darstellen lässt als:

Nach linksseitiger Multiplikation mit der Inversen der positiv definiten und symmetrischen Matrix erhält man als Lösung des Minimierungsproblems mit der Inversen der Produktsummenmatrix:

Für die Varianz-Kovarianz-Matrix des Parameterschätzers ergibt sich (dargestellt in kompakter Form):[8]

Da die geschätzte Varianz der KQ-Fehlerterme

lautet, gilt für die geschätzte Varianz-Kovarianz-Matrix

.

Man erhält mit Hilfe des Kleinste-Quadrate-Schätzers das Gleichungssystem

wobei der Vektor der Residuen und die Schätzung für ist. Das Interesse der Analyse liegt oft in der Schätzung oder in der Prognose der abhängigen Variablen für ein gegebenes Tupel von . Diese berechnet sich als

.

Eigenschaften des Kleinste-Quadrate-Schätzers[Bearbeiten | Quelltext bearbeiten]

Erwartungstreue[Bearbeiten | Quelltext bearbeiten]

Im multiplen Fall kann man ebenfalls zeigen, dass der Kleinste-Quadrate-Schätzer erwartungstreu ist. Dies gilt allerdings nur, wenn die Annahme der Exogenität der Regressoren gegeben ist. Wenn man also davon ausgeht, dass die exogenen Variablen keine Zufallsvariablen sind, sondern wie in einem Experiment kontrolliert werden können, gilt bzw. und damit

.

Falls die Exogenitätsannahme nicht zutrifft, , ist der Kleinste-Quadrate-Schätzer nicht erwartungstreu, sondern verzerrt (englisch: biased), d. h., im Mittel weicht der Parameterschätzer vom wahren Parameter ab:

Der Erwartungswert des Parameterschätzers für ist also nicht gleich dem wahren Parameter.

Effizienz[Bearbeiten | Quelltext bearbeiten]

Der Kleinste-Quadrate-Schätzer ist linear:

.

Nach dem Satz von Gauß-Markow ist der Schätzer , BLUE (Best Linear Unbiased Estimator), das heißt, er ist derjenige lineare erwartungstreue Schätzer, der unter allen linearen erwartungstreuen Schätzern die kleinste Varianz bzw. Varianz-Kovarianz-Matrix besitzt. Für diese Eigenschaften der Schätzfunktion braucht keine Verteilungsinformation der Störgröße vorzuliegen.

Konsistenz[Bearbeiten | Quelltext bearbeiten]

Der KQ-Schätzer ist unter den bisherigen Annahmen unverzerrt , wobei die Stichprobengröße keinen Einfluss auf die Unverzerrtheit hat (schwaches Gesetz der großen Zahlen). Ein Schätzer ist genau dann konsistent, wenn er in Wahrscheinlichkeit gegen den wahren Wert konvergiert. Die Eigenschaft der Konsistenz bezieht also das Verhalten des Schätzers mit ein, wenn die Anzahl der Beobachtungen größer wird.

Für die Folge gilt, dass sie in Wahrscheinlichkeit gegen den wahren Wert konvergiert

oder vereinfacht ausgedrückt:

bzw.

Die Konsistenz kann wie folgt gezeigt werden:[9]

Folglich ist der Kleinste-Quadrate-Schätzer konsistent. Die Eigenschaft besagt, dass mit steigender Stichprobengröße die Wahrscheinlichkeit, dass der Schätzer vom wahren Parameter abweicht, sinkt.

Äquivalenz der Maximum-Likelihood-Lösung und der KQ-Lösung[Bearbeiten | Quelltext bearbeiten]

Das normal lineare Modell lässt sich mithilfe der Maximum-Likelihood-Methode schätzen. Dazu wird zunächst die einzelne Wahrscheinlichkeitsdichte des Fehlervektors, der einer Normalverteilung folgt, benötigt. Sie lautet:

, wobei darstellt.

Da sich der Fehlerterm auch als darstellen lässt, kann man die einzelne Dichte auch schreiben als

.

Aufgrund der Unabhängigkeitsannahme lässt sich die gemeinsame Wahrscheinlichkeitsdichte als Produkt der einzelnen Randdichten darstellen. Die gemeinsame Dichte lautet bei unterstellter stochastischer Unabhängigkeit dann

Die gemeinsame Dichte lässt sich auch schreiben als:

Da wir uns nun nicht für ein bestimmtes Ergebnis bei gegebenen Parametern interessieren, sondern diejenigen Parameter suchen, die am besten zu unseren Daten passen, denen also die größte Wahrscheinlichkeit zugeordnet wird, dass sie den wahren Parametern entsprechen, lässt sich nun die Likelihood-Funktion als gemeinsame Wahrscheinlichkeitsdichte in Abhängigkeit der Parameter formulieren.

Durch Logarithmieren der Likelihood-Funktion ergibt sich die Log-Likelihood-Funktion in Abhängigkeit von den Parametern:

Diese Funktion gilt es nun bzgl. der Parameter zu maximieren. Es ergibt sich also folgendes Maximierungsproblem:

Die beiden Score-Funktionen lauten:

Beim partiellen Ableiten wird ersichtlich, dass der Ausdruck

bereits aus der Herleitung des KQ-Schätzers bekannt ist. Somit reduziert sich das Maximum-Likelihood-Opimierungsproblem auf das KQ-Optimierungsproblem. Daraus folgt, dass der KQ-Schätzer dem ML-Schätzer entspricht:

<math>\mathbf \tilde b = \mathbf b = (\mathbf{X}^\top \mathbf X )^{-1}\mathbf {X}^\top \mathbf y
  1. A. Charnes, E. L. Frome, P. L. Yu: \tophe Equivalence of Generalized Least Squares and Maximum Likelihood Estimates in the Exponential Family. In: Journal of the American Statistical Association. 71. Jahrgang, Nr. 353, 1976, S. 169–171, doi:10.1080/01621459.1976.10481508.
  2. Otto Bretscher: Linear Algebra With Applications. 3rd Auflage. Prentice Hall, Upper Saddle River, NJ 1995.
  3. Stephen M. Stigler: Gauss and the Invention of Least Squares. In: Ann. Stat. 9. Jahrgang, Nr. 3, 1981, S. 465–474, doi:10.1214/aos/1176345451 (projecteuclid.org).
  4. Stephen M. Stigler: \tophe History of Statistics: \tophe Measurement of Uncertainty Before 1900. Belknap Press of Harvard University Press, Cambridge, MA 1986, ISBN 0-674-40340-1.
  5. Vorlage:Citation
  6. J. Aldrich: Doing Least Squares: Perspectives from Gauss and Yule. In: International Statistical Review. 66. Jahrgang, Nr. 1, 1998, S. 61–81, doi:10.1111/j.1751-5823.1998.tb00406.x.
  7. bezeichnet analog zu (Argument des Maximums) das Argument des Minimums
  8. G. Judge und R. Carter Hill: Introduction to the Theory and Practice of Econometrics. 1998, S. 201.
  9. G. Judge und R. Carter Hill: Introduction to the Theory and Practice of Econometrics. 1998, S. 266.