corr
Returns the coefficient of correlation of a set of number pairs. This is computed as follows: COVAR_POP(numeric_expression1, numeric_expression2) / (STDDEV_POP(numeric_expression1) * STDDEV_POP(numeric_expression2))
Note: Supported only in dynamic query mode.
Syntax
corr ( numeric_expression1 , numeric_expression2 [ auto ] )
corr ( numeric_expression1 , numeric_expression2 for [ all|any ]
expression { , expression } )
corr ( numeric_expression1 , numeric_expression2 for report )
Example
corr ( Cost , Margin for report)
Result
The coefficient of correlation between Cost and Margin.
Result data
Cost | Margin | corr (Cost, Margin for report) |
---|---|---|
4 | 0.33 | 0.0872648 |
5 | 0.28 | 0.0872648 |
9.22 | 0.23 | 0.0872648 |
15.93 | 0.28 | 0.0872648 |
34.97 | 0.3 | 0.0872648 |