LINEST function - The function returns a line description array using the least square method in Excel
The following article introduces you to the LINEST function - one of the functions in the statistical function group is very popular in Excel.
Description: The function returns the line description array using the least squares method.
Syntax: LINEST (known_y's, [known_x's], [const], [stats])
Inside:
- known_y's : The set of known y values in the relationship y = b * m ^ x, is a required parameter.
+ If known_y's is in a single column or row -> each known_y's column or row is interpreted as a separate variable.
- known_x's: The set of known x values in the relationship y = b * m ^ x, is an optional parameter.
+ known_x's may include 1 or more sets of variables.
+ If known_x's is omitted -> it is assumed to be an array of the same size as known_y's
- const: The logical value determining the value of the constant b, is an optional value including the following values:
+ const = True or ignore -> b is calculated normally.
+ const = False or ignore -> b = 1 and m are adjusted such that: y = m ^ x.
- stats: Logical values that determine the type of additional regression statistics returned include: {mn, mn-1, ., m1, b; sen, sen-1, ., se1, seb ; r2, sey; F, df; ssreg, ssresid}.
Attention:
- Can describe any straight line by slope and intersection y:
+ Slope (m):
To find the slope of line m, take two points on that line, (x1, y1) and (x2, y2) -> slope equal to (y2 - y1) / (x2 - x1).
+ Intersection Y (b):
The intersection y of a line b, is the value of y at the point where the line intersects the y-axis.
The equation of the line is y = mx + b . You can calculate any point on a straight line by entering the value y or x into the equation.
- When there is only one independent variable -> use the formula:
+ Slope:
= INDEX (LINEST (known_y's, known_x's), 1)
+ Crossing Y:
= INDEX (LINEST (known_y's, known_x's), 2)
+ Use commas to separate values in the same row.
+ Use semicolons separating between rows together.
- When there are some independent variables x -> use the formula:
[m = frac {{sum {left ({x - overline x} right) left ({y - overline y} right)}}} {{sum {{{left ({x - overline x} right)} ^ 2 }}}}]
[b = overline y - moverline x]
Where: x = AVERAGE (known x's ) and y = AVERAGE (known_y's).
For example:
Calculate the slope and y intersection of the line corresponding to the values of x and y in the data table below:
- Calculate the slope m of the line corresponding to the values of x and y. In a cell to calculate enter the formula : = LINEST (C6: C10, D6: D10, FALSE)
- Press Enter -> slope m of the line corresponding to the values of x and y are:
- Calculate the intersection y of the line corresponding to the values of x and y. In the cell to calculate enter the formula : = LINEST (C6: C10, D6: D 10, TRUE)
- Press Enter -> y intersection of the line corresponding to the values x, y are:
Above are instructions and some specific examples when using the LINEST function in Excel.
Good luck!
You should read it
- How to use the Match function in Excel
- OR function in Excel, how to use the OR function, and examples
- GEOMEAN function - The function returns the average of a positive array or range of data in Excel
- The SQRT function returns the square root of a positive number in Excel
- QUARTILE.EXC function - The function returns the quartile of a dataset without values 0 and 1 in Excel
- The square root formula in Excel - The square root function in Excel
- TTEST - Returns the probability associated with a Student's t-Test in Excel
- TRIMMEAN function - The function returns the average of the inner part of a dataset in Excel
May be interested
- MODE.SNGL function - Function that returns the most frequently occurring, or the most repeated values in an array or data range in Excelmode.sngl function: the function returns the most frequently occurring, or the most repeated value in an array or range of data. support functions from excel 2010 onwards. syntax: mode.sngl (number1, [number2], ...)
- Instructions for using Index function in Excelindex is a function that returns an array in excel. when using the index function, you get the values in a cell between the column and the row.
- RSQ - The function returns the square of the Pearson torque correlation coefficient in Excelrsq: the function returns the square of the pearson moment correlation coefficient through data points in known_ys and known_xs. syntax: rsq (known_ys, known_xs)
- The Match function (the function searches for a specified value in an array or cell range) in Excelthe match function helps you search for a specified value in an array, a range of cells, and then returns the position of the value in that array or range.
- Z.TEST function - The function returns one-sided value of the z test in Excelz.test: the function returns the one-sided p value of the z test. support functions from excel 2010 onwards. syntax: z.test (array, x, [sigma])
- TRIMMEAN function - The function returns the average of the inner part of a dataset in Exceltrimmean function: the function returns the average of the inside of the data set. the function calculates by removing which percentage of the value is in the first or last boundary of the data set. syntax: trimmean (array, percent)
- QUARTILE.INC function - The function returns the quartile of a dataset including values 0 and 1 in Excelquartile.inc function: the function returns the quartile of a data set, with percentile values from 0 to 1 including 0 and 1. support functions from execl 2010 onwards. syntax: quartile.inc (array, quart)
- ZTEST function - Returns the probability value on one side of the z test in Excelztest function: the function returns the one-sided probability value of the z test. for the hypothetical population mean, the function returns the probability that the sample mean will be greater than the sample mean observed in the data set or array.
- LOGEST - The function returns an array of data that describes an exponential curve that fits the data given in Excellogest: the function returns the data array that describes the exponential curve that fits the given data. - the equation of the curve is: y = b * m ^ x or y = (b * (m1 ^ x1) * (m2 ^ x2) * _) syntax: logest (known_ys, [known_xs], [const], [ stats])
- SLOPE function - The function returns the slope of a linear regression line through data points in Excelslope function: the function returns the slope of a linear regression line through data points. the slope is the vertical distance divided by the horizontal distance between any two points on that line, the rate of change along the regression line. syntax: slope (known_ys, known_xs)