FORECAST (forecast using linear regression)

<< Click to Display Table of Contents >>

FORECAST (forecast using linear regression)

Syntax:

FORECAST(x, y_values, x_values)

Description:

Returns the y coordinate for the given x coordinate on a best-fit line based on the given values.

A best-fit line is the result of a linear regression, a statistical technique that adapts a line to a set of data points (for example, the results of a series of measurements).

The FORECAST function allows you to predict what value y (the dependent variable) will approximately have at a certain value x (the independent variable).

This function can be used to predict, for example, the resistance of a temperature-sensitive resistor at a specific temperature after having measured the resistance at several other temperatures.

x is the value x for which a prediction is desired.

For the y_values and x_values arguments, you usually specify a cell range.

y_values are the known y values (e.g., the resistance).

x_values are the known x values (e.g., the temperature).

Note:

Note that this function expects first the y_values and then the x_values as second and third arguments – not the other way around.

Annotation:

The linear regression is performed with this function using the least squares method.

Example:

The resistance of a temperature-sensitive resistor has been measured at several temperatures.

Cells A1:A4 contain the temperatures measured: 8, 20, 25, 28

Cells B1:B4 contain the resistances measured: 261, 508, 608, 680

The following calculation returns an estimate for the resistance at 15 degrees:

FORECAST(15, B1:B4, A1:A4) returns 405.21805 (Ohm)

Annotation:

INTERCEPT(y_values, x_values) equals FORECAST(0, y_values, x_values).

See also:

INTERCEPT, SLOPE, SKEW, STEYX, TREND