Difference between revisions of "Manuals/calci/MOVINGAVERAGE"
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...") |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <div | + | <div style="font-size:25px">'''MOVINGAVERAGE (Array,PeriodInterval,ShowChart,ShowStandardErrorOptions,NewTableFlag)'''</div><br/> |
− | + | *where, <math>Array</math> is an array of reference to cells containing an array, | |
+ | *<math>PeriodInterval</math> represents the number of intervals, | ||
+ | *<math>ShowChart</math> is a logical value that decides whether to display a chart, | ||
+ | *<math>ShowStandardErrorOptions</math> is a logical value that decides whether to calculate standard errors, | ||
+ | *<math>NewTableFlag</math> 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, ShowChart, ShowStandardErrorOptions, NewTableFlag) | |
− | ''' | + | *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> < 4, Calci returns an #N/A error message. | ||
+ | *If <math>PeriodInterval</math> > 'Length of Array', Calci returns an #N/A error message. | ||
+ | *<math>ShowChart</math> can be a logical value TRUE or FALSE. If omitted, Calci assumes it to be FALSE. | ||
+ | *<math>ShowStandardErrorOptions</math> can be a logical value TRUE or FALSE. If omitted, Calci assumes it to be FALSE. | ||
+ | *<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. | ||
− | + | == Examples == | |
+ | Consider the following table with Columns A as data point and Column B as array input for MOVINGAVERAGE() function. | ||
− | + | <div id="2SpaceContent" class="zcontent" align="left"> | |
− | |||
− | |||
− | |||
− | <div id=" | ||
− | + | {| id="TABLE3" class="SpreadSheet blue" | |
+ | |- class="even" | ||
+ | | class="sshl_f" | '''Period''' | ||
+ | | class=" " | '''Array Input''' | ||
+ | | class=" " | | ||
− | + | |- class="odd" | |
+ | | class="sshl_f" | | ||
+ | | class=" " | | ||
+ | | class=" " | | ||
− | + | |- class="even" | |
+ | | class="sshl_f" | 0 | ||
+ | | class=" " |0 | ||
+ | | class=" " | | ||
− | + | |- class="odd" | |
+ | | class="sshl_f" | 1 | ||
+ | | class=" " |45.5 | ||
+ | | class=" " | | ||
− | + | |- class="even" | |
+ | | class="sshl_f" | 2 | ||
+ | | class=" " |60 | ||
+ | | class=" " | | ||
− | + | |- class="odd" | |
− | - | + | | class="sshl_f" | 3 |
− | + | | class=" " |200 | |
+ | | class=" " | | ||
− | + | |- class="even" | |
+ | | class="sshl_f" | 4 | ||
+ | | class=" " |160 | ||
+ | | class=" " | | ||
− | + | |- class="odd" | |
− | + | | class="sshl_f" | 5 | |
− | + | | class=" " |300 | |
− | + | | class=" " | | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- class="even" | |- class="even" | ||
+ | | class="sshl_f" | 6 | ||
+ | | class=" " |340 | ||
| class=" " | | | class=" " | | ||
− | + | ||
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" | 7 |
− | | class=" " | | + | | class=" " |310 |
− | + | | class=" " | | |
− | | class=" | + | |
− | |||
|- class="even" | |- class="even" | ||
− | |||
− | |||
| class="sshl_f" | 8 | | class="sshl_f" | 8 | ||
− | | class=" | + | | class=" " |500 |
− | | class=" | + | | class=" " | |
+ | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | 9 | |
− | | class=" " | | + | | class=" " |566 |
− | | class=" | + | | class=" " | |
− | + | ||
− | | class=" | ||
|- class="even" | |- class="even" | ||
− | + | | class="sshl_f" | 10 | |
− | + | | class=" " |610 | |
− | + | | class=" " | | |
− | + | ||
− | | class="sshl_f" | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | | class=" " | | ||
− | |||
− | |||
− | |||
|} | |} | ||
− | + | =MOVINGAVERAGE(B3:B13, 6, TRUE, FALSE, TRUE) returns the below table followed by the chart output: | |
− | + | ||
<div id="5SpaceContent" class="zcontent" align="left"> | <div id="5SpaceContent" class="zcontent" align="left"> | ||
Line 109: | Line 106: | ||
! Moving Average | ! Moving Average | ||
|- class="odd" | |- class="odd" | ||
− | | | + | | 0 |
+ | | null | ||
+ | |- class="even" | ||
+ | | 45.5 | ||
+ | | null | ||
+ | |- class="odd" | ||
+ | | 60 | ||
| null | | null | ||
|- class="even" | |- class="even" | ||
− | | | + | | 200 |
+ | | null | ||
+ | |- class="odd" | ||
+ | | 160 | ||
| null | | null | ||
|- class="odd" | |- class="odd" | ||
− | | | + | | 300 |
− | | | + | | 127.58333333333333 |
|- class="even" | |- class="even" | ||
− | | | + | | 340 |
− | | | + | | 184.25 |
|- class="odd" | |- class="odd" | ||
− | | | + | | 310 |
− | | | + | | 228.33333333333334 |
|- class="even" | |- class="even" | ||
− | | | + | | 500 |
− | | | + | | 301.6666666666667 |
+ | |- class="odd" | ||
+ | | 566 | ||
+ | | 362.6666666666667 | ||
+ | |- class="odd" | ||
+ | | 610 | ||
+ | | 437.6666666666667 | ||
|} | |} | ||
− | + | ==Related Videos== | |
− | + | ||
+ | {{#ev:youtube|OuCS-wG0eh4|280|center|MOVING AVERAGE}} | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/HISTOGRAM | HISTOGRAM]] | ||
+ | *[[Manuals/calci/EXPONENTIALSMOOTHING | EXPONENTIALSMOOTHING]] | ||
+ | |||
+ | == References == | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/Moving_average Moving Average] | ||
+ | |||
+ | |||
+ | |||
+ | *[[Z_API_Functions | List of Main Z Functions]] | ||
+ | |||
+ | *[[ Z3 | Z3 home ]] |
Latest revision as of 16:18, 10 August 2018
MOVINGAVERAGE (Array,PeriodInterval,ShowChart,ShowStandardErrorOptions,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 a chart,
- is a logical value that decides whether to calculate standard errors,
- 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, ShowChart, ShowStandardErrorOptions, 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.
- can be a logical value TRUE or FALSE. If omitted, Calci assumes it to be FALSE.
- 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.
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(B3:B13, 6, TRUE, FALSE, TRUE) returns the below table followed by the chart output:
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 |
Related Videos
See Also
References