Dundas Chart for ASP.NET
Covariance Method
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > Statistics Class : Covariance Method


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

Enterprise Edition Only Feature. 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).

Syntax

Visual Basic (Declaration)  
Public Function Covariance( _
   ByVal firstInputSeriesName As String, _
   ByVal secondInputSeriesName As String _
) As Double
Visual Basic (Usage) Copy Code
Dim instance As Statistics
Dim firstInputSeriesName As String
Dim secondInputSeriesName As String
Dim value As Double
 
value = instance.Covariance(firstInputSeriesName, secondInputSeriesName)
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 Covariance

Example

The following sample gets the covariance between two groups of data (Series1 and Series2) and returns the covariance between the two groups as a double.
Visual Basic Copy Code
Imports Dundas.Charting.WebControl<CRLF>...<CRLF><CRLF>' Get covariance<CRLF>Dim result As double = Chart1.DataManipulator.Statistics.Covariance("Series1", "Series2")
C# Copy Code
using Dundas.Charting.WebControl;<CRLF>...<CRLF><CRLF>// Get covariance<CRLF>double result = Chart1.DataManipulator.Statistics.Covariance("Series1", "Series2");

Remarks

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.

Requirements

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

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.