LINEST(known_y's [,known_x's] [,const] [,stats])

Returns the array of values for a straight line that best fits your data.

known_y'sThe set of y-values for the equation (y = mx + c).
known_x's(Optional) The set of x-values for the equation (y = mx + c).
const(Optional) True or False to specify whether the constant c is to equal 0.
stats(Optional) True or False to specify whether to return additional regression statistics.

Remarks

* For an illustrated example refer to the page under Advanced Functions.
* This function returns more than one value and always returns an array.
* This function must be entered as an array formula.
* Calculates the statistics for a line by using the "least squares" method.
* If "known_y's" is in a single column, then each column of "known_x's" is interpreted as a separate variable.
* If "known_y's" is in a single row, then each row of "known_x's" is interpreted as a separate variable.
* The "known_x's" can include one or more sets of variables.
* If "known_x's" is left blank, it is assumed to be the array {1,2,3,} that is the same size as "known_y's".
* If "const" = True, then c is calculated normally.
* If "const" = False, then c = 0 and the equation (y = mx) is used.
* If "const" is left blank, then True is used.
* If "stats" = False, then only the m-coefficients and the constant b are returned.
* If "stats" = True, then Additional Regression Statistics are returned.
* If "stats" is left blank, then False is used.
* If only one variable is used, "known_y's" and "known_x's" can be ranges of any shape, as long as they have equal dimensions.
* If more than one variable is used, "known_y's" must be a vector (that is, a range with a height of one row or a width of one column).
* In Excel 2010 the accuracy of this function was improved.
* For the Microsoft documentation refer to support.office.com

 A
1{=LINEST({1,9,5,7},{0,4,2,3},True,False)} = {1,2}
2{=LINEST({1,9,5,7},{0,4,2,3},False,False) = 2.3103
3{=LINEST({1,9,5,7},{0,4,2,3},True,True)} = {2,1;0,0;1,0;1.906E+32,2;35,0}


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top