Click or drag to resize
StreamingStatisticsCovariance Method
Estimates the unbiased population covariance from the provided two sample enumerable sequences, in a single pass without memoization. On a dataset of size N will use an N-1 normalizer (Bessel's correction). Returns NaN if data has less than two entries or if any entry is NaN.

Namespace: MathNet.Numerics.Statistics
Assembly: MathNet.Numerics (in MathNet.Numerics.dll) Version: 3.7
Syntax
C#
public static double Covariance(
	IEnumerable<double> samples1,
	IEnumerable<double> samples2
)

Parameters

samples1
Type: System.Collections.GenericIEnumerableDouble
First sample stream.
samples2
Type: System.Collections.GenericIEnumerableDouble
Second sample stream.

Return Value

Type: Double
See Also