FORECAST
Syntax:
FORECAST ( x , known-ys , known-xs )
Description: Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. The known values are existing x-values and y-values, and the new value is predicted by using linear regression.
Mathematical Formula:
FORECAST=a+bx, where: 

and:

and where x and y are the sample means AVERAGE(known-xs) and AVERAGE(known-ys).
Arguments:
| Name | Type | Description | 
|---|---|---|
| x | number | The data point for which a value is to be predicted. | 
| known-xs | array, reference | The independent data. | 
| known-ys | array, reference | The dependent data. | 
Return Type and Value: number – The future value.
However, if
- known-xs and known-ys are empty or contain a different number of data points, the return value is unspecified. 
- The variance of known-xs equals zero, the return value is unspecified.