The method of least squares is a standard approach 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 errors made in the results of every single equation.
The most important application is in data fitting. The 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. The linear least-squares problem occurs in statistical regression analysis; it has a closed-form solution. A closed-form solution (orclosed-form expression) is any formula that can be evaluated in a finite number of standard operations. The non-linear problem has no closed-form solution and 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.
When the observations come from an exponential family and mild conditions are satisfied, least-squares estimates and maximum-likelihood estimates are identical. The method of least squares can also be derived as a method of moments estimator.
The 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).
The result of fitting a set of data points with a quadratic function.
The least-squares method is usually credited to Carl Friedrich Gauss (1795), but it was first published by Adrien-Marie Legendre.
Conic fitting a set of points using least-squares approximation.
History[edit]
Context[edit]
The method of least squares grew out of the fields of astronomy andgeodesy as scientists and mathematicians sought to provide solutions to the challenges of navigating the Earth's oceans during the Age of Exploration. The 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.
The method was the culmination of several advances that took place during the course of the eighteenth century:
• The 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.
• The combination of different observations taken under the sameconditions contrary to simply trying one's best to observe and record a single observation accurately. The approach was known as the method of averages. This approach was notably used byTobias 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.
• The combination of different observations taken under differentconditions. The 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 byPierre-Simon Laplace for the same problem in 1799.
• The 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.
The method[edit]
Carl Friedrich Gauss
The first clear and concise exposition of the method of least squares was published by Legendre in 1805. The 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. The 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. This 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 thenormal 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 Piazzidiscovered Ceres and was able to track its path for 40 days before it was lost in the glare of the sun. Based on this data, astronomers desired to determine the location of Ceres after it emerged from behind the sun without solving the complicated Kepler's nonlinear equations of planetary motion. The 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. This result is known as the Gauss–Markov theorem.
The 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.
Problem statement[edit]
The 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 adependent variable whose value is found by observation. The model function has the form , where the m adjustable parameters are held in the vector . The goal is to find the parameter values for the model which "best" fits the data. The 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.
.
An example of a model is that of the straight line in two dimensions. Denoting the 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.
Limitations[edit]
This regression formulation considers only residuals in the dependent variable. There are two rather different contexts in which different implications apply:
• Regression for prediction. Here a model is fitted to provide a prediction rule for application in a similar situation to which the data used for fitting apply. Here the dependent variables corresponding to such future application would be subject to the same types of observation error as those in the data used for fitting. It is therefore logically consistent to use the least-squares prediction rule for such data.
• Regression for fitting a "true relationship". In standard regression analysis, that leads to fitting by least squares, there is an implicit assumption that errors in the independent variable are zero or strictly controlled so as to be negligible. When errors in the independent variable are non-negligible, models of measurement error can be used; such methods can lead to parameter estimates, hypothesis testing andconfidence intervals that take into account t
วิธีการกำลังสองน้อยเป็นวิธีมาตรฐานในการแก้ปัญหาโดยประมาณของระบบกำหนดมากเกินไปคือชุดของสมการซึ่งมีสมการมากกว่าราชวงศ์ "สแควน้อย" หมายความว่าการแก้ปัญหาโดยรวมลดผลรวมของสี่เหลี่ยมของข้อผิดพลาดที่เกิดขึ้นในผลของสมการเดียวทุก
โปรแกรมที่สำคัญที่สุดคือในข้อมูลที่เหมาะสม แบบที่ดีที่สุดในความหมายอย่างน้อยสี่เหลี่ยมลดผลรวมของการยกกำลังเหลือ, ส่วนที่เหลือถูกความแตกต่างระหว่างค่าสังเกตและค่าติดตั้งที่มีให้โดยรูปแบบ เมื่อปัญหามีความไม่แน่นอนมากในตัวแปรอิสระ ('X' ตัวแปร) ถดถอยแล้วการที่ง่ายและวิธีกำลังสองน้อยมีปัญหา; ในกรณีดังกล่าว, วิธีการที่จำเป็นสำหรับรุ่นที่ข้อผิดพลาดในตัวแปรที่เหมาะสมอาจได้รับการพิจารณาแทนว่าน้อยสแควร์
สแควร์ปัญหาน้อยตกอยู่ในสองประเภท: น้อยสแควร์เส้นหรือสี่เหลี่ยมธรรมดาและไม่เชิงเส้นน้อยขึ้นอยู่กับว่าหรือไม่ เหลือเป็นเชิงเส้นในราชวงศ์ทั้งหมด ปัญหาเชิงเส้นอย่างน้อยสี่เหลี่ยมที่เกิดขึ้นในการวิเคราะห์การถดถอยทางสถิติ มันมีวิธีการแก้ปัญหาในรูปแบบปิด การแก้ปัญหาแบบปิด (การแสดงออก orclosed แบบฟอร์ม) เป็นสูตรใด ๆ ที่สามารถประเมินได้ในจำนวน จำกัด ของการดำเนินงานมาตรฐาน ปัญหาที่เกิดขึ้นไม่เป็นเส้นตรงไม่ได้มีการแก้ปัญหาในรูปแบบปิดและมักจะแก้ไขได้โดยการปรับแต่งซ้ำ; ที่ซ้ำกันระบบจะห้วงเส้นหนึ่งและทำให้การคำนวณหลักจะคล้ายกันในทั้งสองกรณี
เมื่อสังเกตมาจากครอบครัวชี้แจงและภาวะที่ไม่รุนแรงมีความพึงพอใจอย่างน้อยสี่เหลี่ยมประมาณการและประมาณการโอกาสสูงสุดเหมือนกัน วิธีการของสี่เหลี่ยมอย่างน้อยนอกจากนี้ยังสามารถเป็นวิธีการที่ได้มาในช่วงเวลาประมาณ
สนทนาต่อไปนี้จะถูกนำเสนอส่วนใหญ่ในแง่ของการทำงานเชิงเส้น แต่การใช้อย่างน้อยสี่เหลี่ยมที่ถูกต้องและเป็นประโยชน์สำหรับครอบครัวทั่วไปมากขึ้นฟังก์ชั่น นอกจากนี้โดยการใช้ซ้ำประมาณกำลังสองในท้องถิ่นเพื่อความน่าจะเป็น (ผ่านข้อมูลฟิชเชอร์), วิธีการอย่างน้อยสี่เหลี่ยมอาจจะถูกใช้เพื่อให้เหมาะสมกับรูปแบบเชิงเส้นทั่วไป
สำหรับหัวข้อของการใกล้เคียงกับการทำงานโดยรวมของผู้อื่นโดยใช้ฟังก์ชันวัตถุประสงค์ตาม เกี่ยวกับระยะทางกำลังสองดูน้อยสแควร์ (ประมาณฟังก์ชั่น) ผลจากการกระชับชุดของจุดข้อมูลที่มีฟังก์ชันกำลังสองวิธีการอย่างน้อยสี่เหลี่ยมมักจะให้เครดิตกับคาร์ลฟรีดริชเกาส์ (1795) แต่มันถูกตีพิมพ์ครั้งแรกโดย Adrien- Legendre มารีรูปกรวยกระชับชุดของจุดใช้อย่างน้อยสี่เหลี่ยมประมาณประวัติ [แก้ไข] บริบท [แก้ไข] วิธีการของสี่เหลี่ยมน้อยงอกออกมาจากสาขาของดาราศาสตร์ andgeodesy เป็นนักวิทยาศาสตร์และนักคณิตศาสตร์พยายามที่จะให้โซลูชั่นเพื่อความท้าทายในการเดินเรือ มหาสมุทรของโลกในช่วงอายุของการสำรวจ คำอธิบายที่ถูกต้องของพฤติกรรมของดวงดาวเป็นกุญแจสำคัญที่จะช่วยให้เรือที่จะแล่นเรือในทะเลเปิดที่ลูกเรือไม่สามารถพึ่งพาพบเห็นที่ดินสำหรับการนำวิธีการเป็นสุดยอดของความก้าวหน้าหลายอย่างที่เกิดขึ้นในช่วงที่สิบแปด ศตวรรษ: •การรวมกันของการสังเกตที่แตกต่างกันเป็นประมาณการที่ดีที่สุดของมูลค่าที่แท้จริง; ข้อผิดพลาดลดลงรวมมากกว่าการเพิ่มขึ้นอาจจะแสดงเป็นครั้งแรกโดยโรเจอร์ Cotes ใน 1722 •การรวมกันของการสังเกตที่แตกต่างกันภายใต้ sameconditions ขัดต่อเพียงการพยายามที่ดีที่สุดในการสังเกตและบันทึกการสังเกตเดียวถูกต้อง วิธีการที่เป็นที่รู้จักกันเป็นวิธีการของค่าเฉลี่ย วิธีการนี้ถูกนำมาใช้โดยเฉพาะอย่างยิ่ง byTobias เมเยอร์ขณะที่ศึกษาไลเบรชันของดวงจันทร์ในปี 1750 และโดยปิแอร์ไซมอนเลซในการทำงานของเขาในการอธิบายความแตกต่างในการเคลื่อนไหวของดาวพฤหัสบดีและดาวเสาร์ใน 1788 •การรวมกันของการสังเกตที่แตกต่างกันภายใต้ differentconditions วิธีต่อมาเป็นที่รู้จักกันเป็นวิธีการเบี่ยงเบนน้อยแน่นอน มันได้รับการดำเนินการโดยเฉพาะอย่างยิ่งโดยโรเจอร์โจเซฟ Boscovich ในการทำงานของเขาในรูปทรงของโลกใน 1757 และ byPierre ไซมอนเลซสำหรับปัญหาเดียวกันในปี ค.ศ. 1799 •การพัฒนาของเกณฑ์ที่สามารถได้รับการประเมินเพื่อตรวจสอบเมื่อการแก้ปัญหาที่มีข้อผิดพลาดน้อยที่สุด ได้รับความสำเร็จ Laplace พยายามที่จะระบุรูปแบบทางคณิตศาสตร์ของความหนาแน่นของความน่าจะเป็นข้อผิดพลาดและกำหนดวิธีการประเมินที่ช่วยลดข้อผิดพลาดของการประเมิน เพื่อจุดประสงค์นี้ Laplace ใช้สมมาตรสองเข้าข้างกระจายชี้แจงตอนนี้ที่เราเรียกว่าการกระจาย Laplace แบบกระจายความผิดพลาดและใช้ผลรวมของส่วนเบี่ยงเบนแน่นอนเป็นข้อผิดพลาดของการประเมิน เขารู้สึกเหล่านี้จะตั้งสมมติฐานที่ง่ายที่สุดที่เขาจะทำและเขาหวังที่จะได้รับค่าเฉลี่ยเป็นประมาณการที่ดีที่สุด แต่ประมาณการของเขาเป็นหลังแบ่งวิธี [แก้ไข] คาร์ลฟรีดริชเกาส์นิทรรศการแรกที่ชัดเจนและรัดกุมของวิธีการกำลังสองน้อยได้รับการตีพิมพ์โดย Legendre ใน 1805 เทคนิคการอธิบายเป็นขั้นตอนเกี่ยวกับพีชคณิตสมการเชิงเส้นที่เหมาะสมกับข้อมูล และแสดงให้เห็นถึง Legendre วิธีการใหม่โดยการวิเคราะห์ข้อมูลเดียวกับ Laplace สำหรับรูปร่างของโลก ค่าของวิธี Legendre ของน้อยสแควร์ได้รับการยอมรับได้ทันทีโดยนักดาราศาสตร์และนัก geodesists เวลาชั้นนำใน 1809 คาร์ลฟรีดริชเกาส์ตีพิมพ์วิธีการของเขาในการคำนวณวงโคจรของดวงดาว ในการทำงานที่เขาอ้างว่าเขาได้รับอยู่ในความครอบครองของวิธีการของสี่เหลี่ยมอย่างน้อยตั้งแต่ 1795 นี้ธรรมชาติจะนำไปสู่ความขัดแย้งที่มีความสำคัญกับ Legendre แต่จะทำให้เครดิตของเกาส์เขาไปเกิน Legendre และประสบความสำเร็จในการเชื่อมต่อวิธีการกำลังสองน้อยกับหลักการของความน่าจะเป็นและเอวกระจาย เขามีการจัดการเพื่อให้โปรแกรม Laplace ของการระบุรูปแบบทางคณิตศาสตร์ของความหนาแน่นของความน่าจะเป็นสำหรับการสังเกตขึ้นอยู่กับจำนวน จำกัด ของพารามิเตอร์ที่ไม่รู้จักและกำหนดวิธีการประเมินที่ช่วยลดข้อผิดพลาดของการประเมิน เกาส์แสดงให้เห็นว่าค่าเฉลี่ยย่อมเป็นประมาณการที่ดีที่สุดของพารามิเตอร์สถานที่โดยการเปลี่ยนทั้งความหนาแน่นของความน่าจะเป็นและวิธีการประเมิน จากนั้นเขาก็หันปัญหารอบโดยขอให้สิ่งที่รูปแบบความหนาแน่นควรจะมีและสิ่งที่วิธีการในการประเมินควรจะใช้ในการรับมัชฌิมเลขคณิตเป็นค่าประมาณของพารามิเตอร์สถานที่ ในความพยายามนี้เขาคิดค้นการกระจายปกติสาธิตแรกของความแข็งแรงของวิธีเกาส์มาเมื่อมันถูกนำมาใช้ในการคาดการณ์สถานที่ตั้งในอนาคตของดาวเคราะห์น้อยที่เพิ่งค้นพบเซเรส วันที่ 1 มกราคม 1801 นักดาราศาสตร์ชาวอิตาลีจูเซปเป้ Piazzidiscovered เซเรสและก็สามารถที่จะติดตามเส้นทางของตนเป็นเวลา 40 วันก่อนที่มันจะหายไปในแสงจ้าของดวงอาทิตย์ บนพื้นฐานของข้อมูลนี้นักดาราศาสตร์ที่ต้องการการกำหนดตำแหน่งของเซเรสหลังจากที่มันโผล่ออกมาจากด้านหลังของดวงอาทิตย์โดยไม่ต้องแก้สมการไม่เชิงเส้นที่ซับซ้อนเคปเลอร์ของการเคลื่อนที่ของดาวเคราะห์ เพียงการคาดการณ์ที่ได้รับอนุญาตที่ประสบความสำเร็จนักดาราศาสตร์ฮังการีฟรานซ์ซาเวียร์ฟอนซัคเซเรสจะย้ายเหล่านั้นดำเนินการโดย 24 ปีเกาส์โดยใช้การวิเคราะห์อย่างน้อยสี่เหลี่ยมในปี 1810 หลังจากที่ได้อ่านเกาส์การทำงานของ Laplace หลังจากพิสูจน์ทฤษฎีบทขีด จำกัด กลางที่ใช้ มันจะให้เหตุผลของกลุ่มตัวอย่างขนาดใหญ่สำหรับวิธีการอย่างน้อยเมตรและการกระจายปกติ ใน 1822 เกาส์ก็สามารถที่จะระบุว่าวิธีการอย่างน้อยสี่เหลี่ยมเพื่อการวิเคราะห์การถดถอยที่เหมาะสมในแง่ที่ว่าในรูปแบบเชิงเส้นที่ผิดพลาดมีค่าเฉลี่ยของศูนย์เป็น uncorrelated และมีความแปรปรวนเท่ากันประมาณเป็นกลางที่ดีที่สุดเชิงเส้นของ ค่าสัมประสิทธิ์เป็นประมาณอย่างน้อยสี่เหลี่ยม ผลที่ได้นี้เป็นที่รู้จักกันเกาส์มาร์คอฟทฤษฎีบทความคิดของอย่างน้อยสี่เหลี่ยมวิเคราะห์ยังเป็นสูตรอิสระโดยชาวอเมริกันโรเบิร์ต Adrain ใน 1808 ในอีกสองคนมานานหลายศตวรรษในทฤษฎีของข้อผิดพลาดและในสถิติพบวิธีที่แตกต่างกันในการดำเนินการ สี่เหลี่ยมอย่างน้อยคำสั่งปัญหา [แก้ไข] วัตถุประสงค์ประกอบด้วยการปรับพารามิเตอร์ของฟังก์ชั่นรูปแบบให้เหมาะกับชุดข้อมูล ข้อมูลชุดที่เรียบง่ายประกอบด้วย n จุด (คู่ข้อมูล), i = 1, ... , n ที่เป็นตัวแปรอิสระและเป็นตัวแปรที่มีค่า adependent พบโดยการสังเกต ฟังก์ชั่นรูปแบบที่มีรูปแบบที่ซึ่งค่าปรับเมตรจะมีขึ้นในเวกเตอร์ เป้าหมายของเราคือการหาค่าพารามิเตอร์สำหรับรูปแบบที่ "ดีที่สุด" เหมาะกับข้อมูล วิธีกำลังสองน้อยที่สุดพบว่าเมื่อผลรวม, S, ตกค้างกำลังสองคือขั้นต่ำ ที่เหลือถูกกำหนดให้เป็นความแตกต่างระหว่างค่าจริงของตัวแปรตามและมูลค่าตามคำทำนายของรูปแบบ. ตัวอย่างของรูปแบบเป็นที่ของเส้นตรงในสองมิติ แสดงถึงการสกัดกั้นและเป็นทางลาดชันในขณะที่ฟังก์ชั่นรุ่นที่ได้รับจาก ดูสี่เหลี่ยมเชิงเส้นน้อยสำหรับตัวอย่างการทำงานอย่างเต็มที่ออกของรุ่นนี้จุดข้อมูลอาจประกอบด้วยตัวแปรอิสระมากกว่าหนึ่ง ตัวอย่างเช่นเมื่อเครื่องบินที่เหมาะสมกับชุดของการวัดความสูงของเครื่องบินเป็นหน้าที่ของสองตัวแปรอิสระ x และ Z, พูด ในกรณีทั่วไปมากที่สุดอาจจะมีหนึ่งหรือตัวแปรอิสระมากขึ้นและหนึ่งหรือตัวแปรตามมากขึ้นในแต่ละจุดข้อมูลข้อ จำกัด [แก้ไข] สูตรการถดถอยนี้จะพิจารณาเหลือเพียงแห่งเดียวในตัวแปรตาม มีสองบริบทที่แตกต่างกันค่อนข้างที่ผลกระทบที่แตกต่างกันใช้บังคับ ได้แก่•การถดถอยในการทำนาย นี่คือรูปแบบการติดตั้งเพื่อให้กฎการคาดการณ์สำหรับการประยุกต์ใช้ในสถานการณ์ที่คล้ายกันซึ่งข้อมูลที่ใช้สำหรับการปรับใช้การ นี่คือตัวแปรตามที่สอดคล้องกับการใช้งานในอนาคตดังกล่าวจะต้องอยู่ภายใต้ประเภทเดียวกันของข้อผิดพลาดการสังเกตผู้ที่อยู่ในข้อมูลที่ใช้สำหรับการติดตั้งอุปกรณ์ ดังนั้นจึงเป็นเรื่องที่สอดคล้องกันมีเหตุผลที่จะใช้กฎการทำนายอย่างน้อยสี่เหลี่ยมสำหรับข้อมูลดังกล่าว•การถดถอยเพื่อกระชับความสัมพันธ์ "ที่แท้จริง" ในการวิเคราะห์การถดถอยมาตรฐานที่นำไปสู่การปรับกำลังสองน้อยโดยมีสมมติฐานโดยปริยายว่าข้อผิดพลาดในตัวแปรอิสระที่มีศูนย์หรืออย่างเคร่งครัดควบคุมเพื่อที่จะมีเพียงเล็กน้อย เมื่อเกิดข้อผิดในตัวแปรอิสระจะไม่เล็กน้อยรูปแบบของข้อผิดพลาดการวัดสามารถนำมาใช้; วิธีการดังกล่าวสามารถนำไปสู่การประเมินพารามิเตอร์ช่วงการทดสอบสมมติฐาน andconfidence ที่นำเข้าเสื้อบัญชี
การแปล กรุณารอสักครู่..
