[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

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.

[Example:

FORECAST(30,{6,7,9,15,21},{20,28,31,38,40}) results in 10.60725309

end example]