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 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 arguments, 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.
Note:
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: 8, 20, 25, 28
Cells B1:B4 contain the resistances that were measured: 261, 508, 608, 680
The following calculation returns an estimate for the resistance at 15°C:
FORECAST(15, B1:B4, A1:A4) returns 405.21805 (Ohm)
Note:
INTERCEPT(y_values, x_values) equals FORECAST(0, y_values, x_values).
See also: