Difference between revisions of "Documentation/How Tos/Calc: FORECAST function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
m
 
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:FORECAST function}}
 +
{{Documentation/CalcFunc StatisticalTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_COVAR_function
 +
|NextPage=Documentation/How_Tos/Calc:_INTERCEPT_function
 +
}}__NOTOC__
  
 
== FORECAST ==
 
== FORECAST ==
Line 7: Line 12:
 
<tt>'''FORECAST(new_xvalue; yvalues; xvalues)'''</tt>
 
<tt>'''FORECAST(new_xvalue; yvalues; xvalues)'''</tt>
 
: <tt>'''yvalues'''</tt> and <tt>'''xvalues'''</tt> are single row or column ranges specifying points in a set of data. <tt>'''yvalues'''</tt> and <tt>'''xvalues'''</tt> must be the same size.  
 
: <tt>'''yvalues'''</tt> and <tt>'''xvalues'''</tt> are single row or column ranges specifying points in a set of data. <tt>'''yvalues'''</tt> and <tt>'''xvalues'''</tt> must be the same size.  
: <tt>'''FORECAST'''</tt> fits a straight data through these data points, using the linear regression method.
+
: <tt>'''FORECAST'''</tt> fits a straight line through these data points, using the linear regression method.
  
 
: <tt>'''FORECAST'''</tt> returns the y value on the straight line found, corresponding to the x value in <tt>'''new_xvalue'''</tt>. It is equivalent to <tt>'''TREND(yvalues; xvalues; new_xvalue)'''</tt>.
 
: <tt>'''FORECAST'''</tt> returns the y value on the straight line found, corresponding to the x value in <tt>'''new_xvalue'''</tt>. It is equivalent to <tt>'''TREND(yvalues; xvalues; new_xvalue)'''</tt>.
Line 20: Line 25:
 
: with the same x values and y values, also returns <tt>'''13'''</tt>.
 
: with the same x values and y values, also returns <tt>'''13'''</tt>.
  
=== See also: ===
+
{{SeeAlso|EN|
[[Documentation/How_Tos/Calc: TREND function|'''TREND''']],
+
* [[Documentation/How_Tos/Calc: TREND function|TREND]]
[[Documentation/How_Tos/Calc: INTERCEPT function|'''INTERCEPT''']],
+
* [[Documentation/How_Tos/Calc: INTERCEPT function|INTERCEPT]]
[[Documentation/How_Tos/Calc: SLOPE function|'''SLOPE''']],
+
* [[Documentation/How_Tos/Calc: SLOPE function|SLOPE]]
[[Documentation/How_Tos/Calc: STEY function|'''STEY''']]
+
* [[Documentation/How_Tos/Calc: STEYX function|STEYX]]
 
+
* [[Documentation/How_Tos/Calc: Statistical functions|Statistical functions]]
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
+
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 +
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 +
[[Category: Documentation/Reference/Calc/Statistical functions]]

Latest revision as of 14:42, 2 February 2024



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.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_FORECAST_function&oldid=260074"
Views
Personal tools
Navigation
Tools