Gets the covariance of two numerical variables.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function GetCovariance ( _ variable1 As NumericalVariable, _ variable2 As NumericalVariable _ ) As Double |
| C# |
|---|
public static double GetCovariance ( NumericalVariable variable1, NumericalVariable variable2 ) |
| C++ |
|---|
public: static double GetCovariance ( NumericalVariable^ variable1, NumericalVariable^ variable2 ) |
Parameters
- variable1 (Extreme.Statistics.NumericalVariable)
- The first NumericalVariable.
- variable2 (Extreme.Statistics.NumericalVariable)
- The second NumericalVariable.
Return Value
The covariance of the two variables.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | variable1 is nullNothingnullptr.
-or- variable2 is nullNothingnullptr. |
| DimensionMismatchException | The length of variable1 does not equal the length of variable2. |