Documentation/Calc Functions/FORECAST.LINEAR
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Function name:
FORECAST.LINEAR
Category:
Statistical Analysis
Summary:
Extrapolates future values based on existing x and y values.
Syntax:
FORECAST.LINEAR(Value; DataY; DataX)
Returns:
Returns a real number which is the predicted value of y using linear regression for the given Value and the 2 data sets, DataY and DataX.
Arguments:
Value is a real number or a reference to the cell containing that number which is the x value, for which the y value on the linear regression is to be returned.
DataY is the array or a reference to the range of known y values.
DataX is the array or a reference to the range of known x values.
- If DataX has variance of 0 then the function returns a division (#DIV/0!) error.
- If dimensions of DataX and DataY are not same then the function returns an error value.
- If either DataX or DataY is an empty array then the function returns an error value and if either of them is a reference to a range of empty cells then the function returns a value(#VALUE!) error.
Additional details:
- The equation for FORECAST.LINEAR is
y = α + βx,
where α = ӯ - βx̄ and β is given as:
Here x̄ and ӯ are mean values for DataX and DataY, respectively.
- FORECAST and FORECAST.LINEAR performs the same operation.
Examples:
DataY | DataX | |
---|---|---|
1 | 195 | 200 |
2 | 151 | 180 |
3 | 148 | 178 |
4 | 189 | 165 |
5 | 183 | 192 |
6 | 154 | 144 |
Formula | Description | Returns |
---|---|---|
=FORECAST.LINEAR(150;A1:A6;B1:B6) | returns the y value expected for the x value of 150 if the X(B1:B6) and Y(A1:A6) values in both references are linked by a linear trend. | 156.839639188173 |
=FORECAST.LINEAR(170;{8,9,10,11};{50,80,110,140}) | returns the y value expected for the x value of 170 if the DataX = {50,80,110,140} and DataY = {8,9,10,11} values in both arrays are linked by a linear trend. | 12 |
Related LibreOffice functions:
ODF standard:
None
Equivalent Excel functions:
FORECAST.LINEAR