The least squares method (least squares) is in the field of regression analysis. It has many uses, as it allows an approximate representation of a given function by other simpler ones. OLS can be extremely useful in processing observations, and it is actively used to estimate some values from the results of measurements of others containing random errors. In this article, you'll learn how to implement least squares calculations in Excel.
Statement of the problem on a concrete example
Suppose there are two indicators X and Y. Moreover, Y depends on X. Since MNCs are of interest to us from the point of view of regression analysis (in Excel its methods are implemented using built-in functions), we should immediately proceed to consider a specific problem.
, X — , , Y — , .
, (Y) , . , Y = f (X) , , .
,
, , n .
, - , 5-6 . , «» . , , «».
M1 (x1, y1), … Mn (xn, yn). y = f (x), , M1, M2, ..Mn.
, , , , , . = ax + b, , a , - a b.
. ei () xi, . . ei = yi - f (xi).
, , . . X Y , ei . , , .
, . . , ( Excel ), .
Excel, , , , . , (e12 + e22 + e32+ ... en2).
:
, :
, , X Y, :
a b, , 2- :
, 2 , :
, , , a* b*. , . . , , y = a*x + b*, , . , , , .
Excel
"" . : «» (. Y; . X; X; .). Excel .
, Excel, «=» «». , :
- Y ( );
- x1, …xn, . . ;
- , x, ( . ).
, «». 1, , , , b = 0.
x, «», «Shift» + «Control»+ «Enter» («»).
. Excel — «» — , . . :
- y , () x .
- «» x, Excel , , y.
- «» , .
- x, «» . , 1; 2; 3; 4;…, y.
- , x , y. .
- x . , , x y . , y .
«»
Excel . «». «», . . . X, Y.
Now you know the formulas in Excel for dummies that allow you to predict the future value of a particular indicator according to a linear trend.