Difference between revisions of "Documentation/How Tos/Calc: FORECAST function"
From Apache OpenOffice Wiki
< Documentation | How Tos
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
m |
||
Line 28: | Line 28: | ||
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
− | [[Category: Documentation/Reference/Calc]] | + | [[Category: Documentation/Reference/Calc/Statistical functions]] |
Revision as of 12:35, 17 May 2010
FORECAST
Fits a straight line to data using linear regression and returns a point on that line.
Syntax:
FORECAST(new_xvalue; yvalues; xvalues)
- yvalues and xvalues are single row or column ranges specifying points in a set of data. yvalues and xvalues must be the same size.
- FORECAST fits a straight line through these data points, using the linear regression method.
- FORECAST returns the y value on the straight line found, corresponding to the x value in new_xvalue. It is equivalent to TREND(yvalues; xvalues; new_xvalue).
- Advanced topic:
- The parameters xvalues and yvalues are always evaluated as array formulas. Note that TREND does not evaluate its parameters as array formulas.
Example:
FORECAST(6; B2:B6; A2:A6)
- where the x values in A2:A6 are 1, 2, 3, 4, 5 and the y values in B2:B6 are 2, 4, 7, 8, 11 returns 13.
TREND(B2:B6; A2:A6; 6)
- with the same x values and y values, also returns 13.