

The correlation coefficient gives a "rough" indicator of a good fit. These additional statistics tell you how good the best fit line is. This is the ratio of the variance in the data explained by the linear model divided by the variance unexplained by the linear model.Īn even better test for a "good fit" is to use the Fisher F-statistic. The coefficient of determination, written as r2 Standard Error for the slope coefficients This table explains what the 10 numbers actually tell us: SlopeĪlso known as Alpha, written as "c" or "b" Instead of 2 numbers, this function now returns 10 numbers arranged as two columns and five rows. When "stats" is TRUE this function will return additional regression statistics. This formula is completely different to "y=mx+c" and therefore whether "const" is true or false has enormous implications on the results returned by this function. When the intercept is zero, the y-values need to be recalculated using the formula "y=mx" This is the only situation when this function does not return more than one value. This function now only returns a single value and does not have to be entered as an array formula.

When "const" is FALSE the slope is calculated with an assumption that the Intercept = 0. Instead of using the LINEST function you could use the SLOPE and INTERCEPT functions to obtain the same values. The intersection of the line with the y-axis is at -1. We can check the results by plotting an XY Scatter chart. The intercept of the best fit straight line with the y-axis has been added to cell "C10". The slope of the best fit straight line has been added to cell "B10". Not two cells in the same column.Įnter the following formula as an Array Formula (using Ctrl + Shift + Enter) into the cells "B10:C10". You must select two cells in the same row. One column for the x-values and one for the y-values. When "const" is left blank (or True) the slope and intercept is calculated and returned.Įnter the following data arranged in two columns. Straight lines satisfy the equation "y=mx+b" when you have one independent x-value.ī is the value where the line crosses the y-axis and corresponds to the "const" argument. This function uses the "least squares" method to calculate a best fit line. This function includes an option to include additional regression statistics (stats = true). The LINEST funtion returns the slope and intercept values for a best fit straight line.
