LinRegIntercept

Return to: Calculated Member Builder Function List

Calculates the linear regression of a set and returns the value of b in the regression line y = ax + b.

Syntax

LinRegIntercept(«Set», «Numeric Expression»
[, «Numeric Expression»])

Remarks

Linear regression by using the least-squares method calculates the equation of the best-fit line for a series of points. Let the regression line be given by the equation

y = ax+b

where a is called the intercept and b is called the slope.

This function evaluates «Set» against the first «Numeric Expression» to get the set of values for the y-axis. It then evaluates «Set» against the second «Numeric Expression», if present, to get the set of values for the x-axis. If the second «Numeric Expression» is not present, the function uses the members of «Set» as values for the x-axis.

The latter case is not often useful for standard dimensions (for example, SalesPerson). However, it is often used with the time dimension.

After obtaining the set of points, LinRegIntercept returns the intercept of the regression line (b in the equation above).


Note Empty cells or cells containing text or logical values are ignored; however, cells with zero values are included.


Example

To find the trend in Sales for the sales of the last nine periods:

LinRegSlope(LastPeriods(9), Sales) returns the value for a.

LinRegIntercept(LastPeriods(9), Sales) returns the value for b.

 

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.