Returns an array of statistics for a straight line that best fits the given data set.
Syntax
y_values: The array or range containing the known (or dependent) y values. E.g. A2:A6
x_values: The array or range containing the known (or independent) x values. It must be of the same size as that of y_values. Defaults to {1,2,3...} if omitted. E.g. B2:B6
allow_const: Logical value that determines whether to return the y-intercept values or not. Defaults to 1 if omitted.
TRUE or 1 - returns the y-intercept values
FALSE or 0 - returns the y-intercept as 0
stats: Logical value that determines whether to return additional regression statistics or not. Defaults to 0 if omitted.
TRUE or 1 - returns the additional regression data
|
Statistics Returned |
Description |
|
m1,m2,...,mn |
The slope of the regression line y=mx+b for the values x1,x2, etc. |
|
b |
The y-intercept of the regression line. |
|
se1,se2,...,sen |
The standard error values for the slopes m1,m2,...,mn. |
|
seb |
The standard error value of the intercept b. |
|
r2 |
The coefficient of determination. |
|
sey |
The standard error of the regression for the y value. |
|
F |
The F statistic or F observed value for variance analysis. |
|
df |
The degrees of freedom from the variance analysis. |
|
ssreg |
The regression sum of squares. |
|
ssresid |
The residual sum of squares. |
Examples
|
Formula |
Result |
|
|
=LINEST(A2:A6;B2:B6) |
3 |
-1 |
|
=LINEST(A2:A6;B2:B6;1;1) |
3 0.2 0.98684210526316 225 90 |
-1 1 1 3 1.2 |
Possible Errors
|
Errors |
Meaning |
|
#N/A! |
|
|
#NAME! |
|
|
#VALUE! |
|
|
#REF! |
|
Similar Functions