37
Plug-In Package Functions
MicroStrategy Functions Reference
4
342
Statistical functions
© 2011 MicroStrategy, Inc.
Where:
• FactID is a parameter that forces a calculation to take place on a fact
table that contains the selected fact.
• Argument1 and Argument2 are lists of values represented by facts or
metrics.
Usage notes
• The correlation coefficient is measured on a scale that varies from + 1
through 0 to - 1. So only a value between -1 and 1 is returned.
• Complete correlation between two variables is expressed by either + 1 or
-1. When one variable increases as the other increases, the correlation is
positive; when one decreases as the other increases, the correlation is
negative. Complete absence of correlation is represented by 0.
• If an array or reference argument contains text, logical values, or empty
cells, those values are ignored; however, cells with the value zero are
included.
• If Argument1 and Argument2 have a different number of data points,
Correlation returns an error.
• If either Argument1 or Argument2 is empty, or if the standard deviation
of their values equals zero, Correlation returns an error.
Covariance
Covariance is used to examine the relationship between two data sets. For
instance, the covariance could be used to examine whether an increase in
income is related to higher education levels. A covariance greater or less than
zero indicate a relationship, while a value of zero indicates no relationship.
Syntax
Covariance <FactID> (Argument1, Argument2)
Where:
• Argument1 and Argument2 are facts or metrics representing lists of
values.
• FactID is a parameter that forces a calculation to take place on a fact
table that contains the selected fact.