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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:INTERCEPT function}}
 +
{{Documentation/CalcFunc StatisticalTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_FORECAST_function
 +
|NextPage=Documentation/How_Tos/Calc:_PEARSON_function
 +
}}__NOTOC__
  
 
== INTERCEPT ==
 
== INTERCEPT ==
Line 27: Line 32:
 
: 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, 10 returns <tt>'''0.2'''</tt>. The equation of the straight line found is very nearly <i>y</i> = 2<i>x</i> (and would be if B4 contained 6) - thus the straight line very nearly (but not quite) goes through the origin.
 
: 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, 10 returns <tt>'''0.2'''</tt>. The equation of the straight line found is very nearly <i>y</i> = 2<i>x</i> (and would be if B4 contained 6) - thus the straight line very nearly (but not quite) goes through the origin.
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: FORECAST function|FORECAST]]
 
* [[Documentation/How_Tos/Calc: FORECAST function|FORECAST]]
 
* [[Documentation/How_Tos/Calc: SLOPE function|SLOPE]]
 
* [[Documentation/How_Tos/Calc: SLOPE function|SLOPE]]
Line 35: Line 40:
 
* [[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/Statistical functions]]

Latest revision as of 14:43, 2 February 2024



INTERCEPT

Fits a straight line to data using linear regression and returns its intercept on the y-axis.

Syntax:

INTERCEPT(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.
INTERCEPT fits a straight line through these data points, using the linear regression method (least squares). It then returns the y value where that straight line crosses the y-axis.
The equation of a straight line may be given as y = a + bx. The linear regression method calculates:
Calc linregress b.png
and
Calc linregress a.png.
a is the y-axis intercept returned by this function.


Advanced topic:
The parameters xvalues and yvalues are always evaluated as array formulas.

Example:

INTERCEPT(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, 10 returns 0.2. The equation of the straight line found is very nearly y = 2x (and would be if B4 contained 6) - thus the straight line very nearly (but not quite) goes through the origin.



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