FORECAST (forecast using linear regression)

<< Click to Display Table of Contents >>

FORECAST (forecast using linear regression)

Syntax:

FORECAST(x, y_values, x_values)

Description:

This 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 (called "trendline" or "best-fit 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 have approximately for a certain value x (the independent variable).

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

x is the value x for which a prediction is to be made.

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

y_values are the dependent variables (the resistance in the above example).

x_values are the independent variables (the temperature in the above example).

Note:

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

Additional info:

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

Example:

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

Cells A1:A4 contain the temperatures that were measured (the independent variables): 8, 20, 25, 28

Cells B1:B4 contain the resistances that were measured (the dependent variables): 261, 508, 608, 680

The resistance which will be delivered at 15°C can be estimated using the following formula:

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

At 15°, a resistance of 405.21805 (Ohm) would thus be expected.

Additional info:

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

See also:

INTERCEPT, SLOPE, SKEW, STEYX, TREND