Editare

Partajați prin


StatisticFormula.Correlation(String, String) Method

Definition

Returns the correlation value for two data series.

public:
 double Correlation(System::String ^ firstInputSeriesName, System::String ^ secondInputSeriesName);
public double Correlation (string firstInputSeriesName, string secondInputSeriesName);
member this.Correlation : string * string -> double
Public Function Correlation (firstInputSeriesName As String, secondInputSeriesName As String) As Double

Parameters

firstInputSeriesName
String

The first input series name.

secondInputSeriesName
String

The second input series name.

Returns

A double value that represents the correlation between two data series.

Remarks

Correlation measures the relationship between two data sets that are scaled to be independent of the unit of measurement. The Correlation method returns the covariance of two data sets divided by the product of their standard deviations, and always ranges from -1 to 1.

Use correlation 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 correlation), whether small values of one set are associated with large values of the other (negative correlation), or whether values in both sets are unrelated (correlation near zero).

If a specified input series does not exist in the series collection at the time of the method call, an exception will be thrown. An exception will also be raised if the specified series do not have the same number of data points.

Applies to