Difference between revisions of "Manuals/calci/COVARIANCE"
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
*If <math>NewTableFlag</math> is TRUE, output is displayed on a new ZSpace cube. If <math>NewTableFlag</math> is FALSE, output is displayed on the same spreadsheet where command is written. | *If <math>NewTableFlag</math> is TRUE, output is displayed on a new ZSpace cube. If <math>NewTableFlag</math> is FALSE, output is displayed on the same spreadsheet where command is written. | ||
*If data is invalid, Calci displays NaN error message. | *If data is invalid, Calci displays NaN error message. | ||
+ | |||
+ | ==ZOS== | ||
+ | |||
+ | *The syntax is to calculate this function in ZOS is <math>COVARIANCEDATAANALYSIS (2D-Array,GroupBy,NewTableFlag)</math> | ||
+ | *<math>GroupBy</math> is a method that performs the analysis by Columns or Rows, | ||
+ | *<math>NewTableFlag</math> is a flag that determines how the output should be displayed which is either TRUE or FALSE. | ||
+ | *For e.g., COVARIANCEDATAANALYSIS([[10,13,16,19,22],[29,27,34,41,56]],"columns",true) | ||
+ | *COVARIANCEDATAANALYSIS([[33..39],[57..63]],"columns",false) | ||
== Examples == | == Examples == |
Revision as of 13:02, 5 June 2015
COVARIANCEDATAANALYSIS(Array, GroupBy, NewTableFlag)
where,
- is array of integers or reference to the cells containing array,
- is a method that performs the analysis by Columns or Rows,
- is a flag that determines how the output should be displayed.
COVARIANCEDATAANALYSIS() calculates the average of product of deviations of values from the means of each data set.
Description
COVARIANCEDATAANALYSIS(Array, GroupBy, NewTableFlag)
- Covariance is a method used to determine the relationship between two data sets.
- can be numbers or can be names, arrays or references containing numbers.
- Values containing text, logical values or empty cells are ignored.
- Argument can be "Rows" or "Columns".
- can be a logical value TRUE or FALSE. If omitted, Calci assumes it to be TRUE.
- If is TRUE, output is displayed on a new ZSpace cube. If is FALSE, output is displayed on the same spreadsheet where command is written.
- If data is invalid, Calci displays NaN error message.
ZOS
- The syntax is to calculate this function in ZOS is
- is a method that performs the analysis by Columns or Rows,
- is a flag that determines how the output should be displayed which is either TRUE or FALSE.
- For e.g., COVARIANCEDATAANALYSIS([[10,13,16,19,22],[29,27,34,41,56]],"columns",true)
- COVARIANCEDATAANALYSIS([[33..39],[57..63]],"columns",false)
Examples
Consider the following table with two arrays as input data.
Column1 | Column2 | Column3 | Column4 | |
Row1 | 5 | 3 | ||
Row2 | 7 | 8 | ||
Row3 | 12 | 8 | ||
Row4 | 17 | 18 | ||
Row5 | 41 | 34 | ||
Row6 |
=COVARIANCEDATAANALYSIS(A2:B5,"Columns",TRUE) =COVARIANCEDATAANALYSIS(A2:B6,"Rows",TRUE)
Output for the above examples is displayed respectively.
Column1 | Column2 | |
---|---|---|
Column1 | 21.6875 | 23.4375 |
Column2 | 23.4375 | 29.6875 |
Row1 | Row2 | Row3 | Row4 | Row5 | |
---|---|---|---|---|---|
Row1 | 1 | -0.5 | 2 | -0.5 | 3.5 |
Row2 | -0.5 | 0.25 | -1 | 0.25 | -1.75 |
Row3 | 2 | -1 | 4 | -1 | 7 |
Row4 | -0.5 | 0.25 | -1 | 0.25 | -1.75 |
Row5 | 3.5 | -1.75 | 7 | -1.75 | 12.25 |