Difference between revisions of "Manuals/calci/FORECAST"

From ZCubes Wiki
Jump to navigation Jump to search
Line 33: Line 33:
 
|+Spreadsheet
 
|+Spreadsheet
 
|-
 
|-
! !! A !! B !! C !! D!! E
+
! !! A !! B !! C !! D!! E !!F
 
|-
 
|-
 
! 1
 
! 1
| 5 || 30 || -28 ||-42 ||46
+
| 5 || 30 || -28 ||-42 ||51 ||46
 
|-
 
|-
 
! 2
 
! 2
| 9 || 32 ||-18 || 34 || -1
+
| 9 || 32 ||-18 || 34 || 14 || -1
 
|-
 
|-
 
! 3
 
! 3
| 11  || 15  ||35 ||-13|| 29
+
| 11  || 15  ||35 ||-13|| 0 ||29
 
|-
 
|-
 
! 4
 
! 4
| 18 ||28  ||12  ||25 ||18
+
| 18 ||28  ||12  ||25 ||60 ||18
 
|-
 
|-
 
! 5
 
! 5
Line 53: Line 53:
 
| 4  || 10 ||  ||  ||
 
| 4  || 10 ||  ||  ||
 
|}
 
|}
=FORECAST(25,A1:B2,C1:D2) = 16.41772152
+
# =FORECAST(26,A1:A6,B1:B6) = 13.16666667
 +
# =FORECAST(18,C1:C4,D1:D4) = 2.119541779
  
 
==See Also==
 
==See Also==

Revision as of 00:32, 15 January 2014

FORECAST(n,y,x)


  • is the data point .
  • is the dependent array of data.
  • is the independent array of data.


Description

  • This function gives the predicted value of the dependent variable for the specific value, x, of the independent variable by using a least squares linear regression to predict y values from x values.
  • In is the data point to predict a value. is the dependent array of data to predict the -value and is the independent array of data to predict the -value.
  • The formula for is
  • where and .
  • Here and are the sample means of x and y.
  • This function will give the result as error when
 1. Any one of the value is nonnumeric.
 2. The values of x and y are empty or contain a different number of data points.
 3. The variance of x is zero.


Examples

  1. y={5,9,11,18,32,4}

x={ FORECAST(26,B1:B6,C1:C6)=13.16666667

  1. y={}

x={-42,34,-13,25} FORECAST(18,C5:C8,D5:D8)=2.119541779

  1. y={51,14,0,60}

x={46,-1,29,18} FORECAST(24,D1:D4,E1:E4)=31.71054889

  1. y={2,5,9,17}

x={4,14,28} FORECAST(10,B1:B4,C1:C3)=NAN.

Spreadsheet
A B C D E F
1 5 30 -28 -42 51 46
2 9 32 -18 34 14 -1
3 11 15 35 -13 0 29
4 18 28 12 25 60 18
5 32 41
6 4 10
  1. =FORECAST(26,A1:A6,B1:B6) = 13.16666667
  2. =FORECAST(18,C1:C4,D1:D4) = 2.119541779

See Also


References