FORECAST (X, YValues, XValues) FORECAST (X; YValues; XValues)
X
Number Number
The horizontal coordinate of the point.
YValues
The vertical coordinates of the data points. This array must have the same size as the XValues parameter.
XValues
The horizonal coordinates of the data points. This array must have the same size as the YValues parameter.
Returns
Number Number
The vertical coordinate of the point on a straight line which has been fitted to data using linear regression.
Fits a straight line to data using linear regression and returns the vertical coordinate of a point on that line.
Example
FORECAST (170, { 8, 9, 10, 11 }, { 50, 80, 110, 140 })
FORECAST (170; { 8; 9; 10; 11 }; { 50; 80; 110; 140 })
Returns 12.