covarSampStable
Calculates the value of Σ((x - x̅)(y - y̅)) / (n - 1). Similar to covarSamp but works slower while providing a lower computational error.
Syntax
Arguments
Returned Value
- The sample covariance between
xandy. Forn <= 1,infis returned. Float64.
Example
Query:
Result:
Query:
Result:
covarSampStable
Introduced in: v1.1
Calculates the sample covariance:
It is similar to covarSamp but uses a numerically stable algorithm.
As a result, covarSampStable is slower than covarSamp but provides a lower computational error.
Syntax
Arguments
Returned value
Returns the sample covariance between x and y. For n <= 1, inf is returned. Float64
Examples
Basic sample covariance calculation with stable algorithm
Single value returns inf