covariancep() (aggregation function)
Learn how to use the covariancep() aggregation function to calculate the population covariance of two random variables.
Calculates the population covariance of two random variables expr1 and expr2.
The following formula is used:

Syntax
covariancep(expr1 , expr2 )
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| expr1 | real | ✔️ | First random variable expression. |
| expr2 | real | ✔️ | Second random variable expression. |
Returns
Returns the covariance value of expr1 and expr2.
Examples
The example in this section shows how to use the syntax to help you get started.
datatable(x:real, y:real) [
1.0, 14.0,
2.0, 10.0,
3.0, 17.0,
4.0, 20.0,
5.0, 50.0,
]
| summarize covariancep(x, y)
Output
| covariancep_x_y | |
|---|---|
| 16.4 |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.