This method gets the covariance value for two series of data.
This analysis tool and its formula return the average of the product of deviations of data points from their respective means. Covariance is a measure of the relationship between two ranges of data. You can use the Covariance tool to determine whether two ranges of data move together — that is, whether large values of one set are associated with large values of the other (positive covariance), whether small values of one set are associated with large values of the other (negative covariance), or whether values in both sets are unrelated (covariance near zero).
Visual Basic (Declaration) | |
---|---|
Public Function Covariance( _ ByVal firstInputSeriesName As String, _ ByVal secondInputSeriesName As String _ ) As Double |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public double Covariance( string firstInputSeriesName, string secondInputSeriesName ) |
Parameters
- firstInputSeriesName
- The name of the series that stores the first group of data. Data must be stored in the first Y-values of the series' data points.
First Input Series Name - secondInputSeriesName
- The name of the series that stores the second group of data. Data must be stored in the first Y-values of the series' data points. An exception will be raised if both series do not have the same number of data points.
Second Input Series Name
Return Value
Returns CovarianceVisual Basic | Copy Code |
---|---|
Imports Dundas.Charting.WinControl |
C# | Copy Code |
---|---|
using Dundas.Charting.WinControl; |
This method returns the average of the product of deviations of the data points from their respective means.
Covariance is a measure of the relationship between two ranges of data, and can be used to determine whether two ranges of data move together - that is, whether large values of one set are associated with large values of the other (positive covariance), whether small values of one set are associated with large values of the other (negative covariance), or whether values in both sets are unrelated (covariance near zero).
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown. An exception will also be raised if the series do not have the same number of data points.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family