Difference between revisions of "Manuals/calci/MOVINGAVERAGE"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''MOVINGAVERAGE'''(Array, PeriodInterval, NewTableFlag) where, '''Array '''- Input range should be one bloc...")
 
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
=MOVINGAVERAGE(Array, PeriodInterval, NewTableFlag)=
  
'''MOVINGAVERAGE'''(Array, PeriodInterval, NewTableFlag)
+
*where, <math>Array</math> is an array of reference to cells containing an array
 +
*<math>PeriodInterval</math> represents the number of intervals
 +
*<math>NewTableFlag</math> is a logical value that decides whether to display the output in the same worksheet or a new space cube.
  
where,
+
MOVINGAVERAGE() calculates the expected value, over a past period of fixed length at any time.
  
'''Array '''- Input range should be one block.
+
== Description ==
  
'''PeriodInterval '''- represents the number of intervals. The default interval is 3.
+
MOVINGAVERAGE(Array, PeriodInterval, NewTableFlag)
  
'''NewTableFlag''' - is the TRUE or FALSE.If set as TRUE,the result in new sheet. If NewTableFlag is omitted, it assumed to be FALSE.
+
*Moving average is a calculation to analyze data points by creating a series of averages of different subsets of the full data set.
 +
*<math>Array</math> can be any positive integers including zero '0'.
 +
*e.g. If <math>PeriodInterval</math> is set to '6', the average of previous 5 points and the current data point is calculated. Moving Average for first '5' data points cannot be calculated due to less number of data points. Hence Moving average for first '5' data points will be null.
 +
*If <math>PeriodInterval</math> is omitted, Calci assumes it to be 3.
 +
*If <math>PeriodInterval</math> &lt; 4, Calci returns an #N/A error message.
 +
*If <math>PeriodInterval</math> &gt; 'Length of Array', Calci returns an #N/A error message.
 +
*<math>NewTableFlag</math> can be a logical value TRUE or FALSE. If omitted, Calci assumes it to be FALSE.
 +
*If <math>NewTableFlag</math> is TRUE, the result is displayed on new zspace sheet.
 +
<font=blue>Need to check the functionality of NewTableFlag after next release</font>
  
</div>
+
== Examples ==
----
+
Consider the following table with Columns A as data point and Column B as array input for MOVINGAVERAGE() function.
<div id="1SpaceContent" class="zcontent" align="left">Moving Average calculatesthe expected value over a past period of fixed length at any time.</div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left">
 
  
Lets see an example in (Column3Row1)
+
<div id="2SpaceContent" class="zcontent" align="left">
  
<nowiki>=MOVINGAVERAGE(R1C1:R6C1,3, TRUE)</nowiki>
+
{| id="TABLE3" class="SpreadSheet blue"
 +
|- class="even"
 +
| class="sshl_f" | '''Period'''
 +
| class=" " | '''Array Input'''
 +
| class=" " |
  
MOVINGAVERAGE returns the result in new sheet(5Space).
+
|- class="odd"
 +
| class="sshl_f" |
 +
| class=" " |
 +
| class=" " |
  
MOVINGAVERAGE(R1C1:R6C1, 7, TRUE)
+
|- class="even"
 +
| class="sshl_f" | 0
 +
| class=" " |0
 +
| class=" " |
  
MOVINGAVERAGE returns the #ERROR(LengthofArray &lt; PeriodInterval).
+
|- class="odd"
 +
| class="sshl_f" | 1
 +
| class=" " |45.5
 +
| class=" " |
  
</div>
+
|- class="even"
----
+
| class="sshl_f" | 2
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
+
| class=" " |60
 +
| class=" " |
  
MOVING AVERAGE
+
|- class="odd"
 +
| class="sshl_f" | 3
 +
| class=" " |200
 +
| class=" " |
  
</div></div>
+
|- class="even"
----
+
| class="sshl_f" | 4
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
+
| class=" " |160
----
+
| class=" " |
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
  
If Length of Array &lt; 4 ,MOVINGAVERAGE return the #ERROR.
+
|- class="odd"
 
+
| class="sshl_f" | 5
MOVINGAVERGAGE returns the #ERROR, if Length of Array &lt; PeriodInterval.
+
| class=" " |300
 
+
| class=" " |
</div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
  
{| id="TABLE3" class="SpreadSheet blue"
 
 
|- class="even"
 
|- class="even"
 +
| class="sshl_f" | 6
 +
| class=" " |340
 
| class=" " |
 
| class=" " |
| Column1
+
 
| Column2
 
| class="  " | Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | 7
| class=" " | 11
+
| class=" " |310
| 3
+
| class=" " |
| class="sshl_f" | 5Space
+
 
| class="sshl_f" | 5
 
 
|- class="even"
 
|- class="even"
| class="  " | Row2
 
| class=" " | 70
 
 
| class="sshl_f" | 8
 
| class="sshl_f" | 8
| class="   " | 9
+
| class=" " |500
| class="sshl_f" | 128
+
| class=" " |
 +
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" | 9
| class=" " | 12
+
| class=" " |566
| class="sshl_f" | #ERROR
+
| class=" " |
| 14
+
 
| class="sshl_f    " | 15
 
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" | 10
| class=" " | 17
+
| class=" " |610
| class="    SelectTD1 ChangeBGColor SelectTD1" |
+
| class=" " |
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>18
+
 
| class="sshl_f" | 10000
 
| class="  " | 20
 
|- class="odd"
 
| class=" " | Row5
 
| class=" " | 110
 
| 26
 
| 10023
 
| 168
 
|- class="even"
 
| Row6
 
| class=" " | 6
 
| class="sshl_f" | 8
 
| 1.619775
 
| 0.525322
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=MOVINGAVERAGE(A1:A11, 6, TRUE) returns the following table:
----
+
 
 
<div id="5SpaceContent" class="zcontent" align="left">
 
<div id="5SpaceContent" class="zcontent" align="left">
  
Line 109: Line 104:
 
! Moving Average
 
! Moving Average
 
|- class="odd"
 
|- class="odd"
| 11
+
| 0
 +
| null
 +
|- class="even"
 +
| 45.5
 +
| null
 +
|- class="odd"
 +
| 60
 
| null
 
| null
 
|- class="even"
 
|- class="even"
| 70
+
| 200
 +
| null
 +
|- class="odd"
 +
| 160
 
| null
 
| null
 
|- class="odd"
 
|- class="odd"
| 12
+
| 300
| 31
+
| 127.58333333333333
 
|- class="even"
 
|- class="even"
| 17
+
| 340
| 33
+
| 184.25
 
|- class="odd"
 
|- class="odd"
| 110
+
| 310
| 46.333333333333336
+
| 228.33333333333334
 
|- class="even"
 
|- class="even"
| 6
+
| 500
| 44.333333333333336
+
| 301.6666666666667
 +
|- class="odd"
 +
| 566
 +
| 362.6666666666667
 +
|- class="odd"
 +
| 610
 +
| 437.6666666666667
 
|}
 
|}
  
</div>
+
== See Also ==
----
+
 
 +
*[[Manuals/calci/HISTOGRAM | HISTOGRAM]]
 +
*[[Manuals/calci/EXPONENTIALSMOOTHING | EXPONENTIALSMOOTHING]]
 +
 
 +
== References ==
 +
 
 +
*[http://en.wikipedia.org/wiki/Moving_average Moving Average]

Revision as of 18:07, 9 January 2014

MOVINGAVERAGE(Array, PeriodInterval, NewTableFlag)

  • where, is an array of reference to cells containing an array
  • represents the number of intervals
  • is a logical value that decides whether to display the output in the same worksheet or a new space cube.

MOVINGAVERAGE() calculates the expected value, over a past period of fixed length at any time.

Description

MOVINGAVERAGE(Array, PeriodInterval, NewTableFlag)

  • Moving average is a calculation to analyze data points by creating a series of averages of different subsets of the full data set.
  • can be any positive integers including zero '0'.
  • e.g. If is set to '6', the average of previous 5 points and the current data point is calculated. Moving Average for first '5' data points cannot be calculated due to less number of data points. Hence Moving average for first '5' data points will be null.
  • If is omitted, Calci assumes it to be 3.
  • If < 4, Calci returns an #N/A error message.
  • If > 'Length of Array', Calci returns an #N/A error message.
  • can be a logical value TRUE or FALSE. If omitted, Calci assumes it to be FALSE.
  • If is TRUE, the result is displayed on new zspace sheet.

<font=blue>Need to check the functionality of NewTableFlag after next release

Examples

Consider the following table with Columns A as data point and Column B as array input for MOVINGAVERAGE() function.

Period Array Input
0 0
1 45.5
2 60
3 200
4 160
5 300
6 340
7 310
8 500
9 566
10 610
=MOVINGAVERAGE(A1:A11, 6, TRUE) returns the following table:

MOVING AVERAGE
Input Moving Average
0 null
45.5 null
60 null
200 null
160 null
300 127.58333333333333
340 184.25
310 228.33333333333334
500 301.6666666666667
566 362.6666666666667
610 437.6666666666667

See Also

References