diff --git a/src/Numerics/Statistics/Correlation.cs b/src/Numerics/Statistics/Correlation.cs index 918cf93ce..cc8e6c00a 100644 --- a/src/Numerics/Statistics/Correlation.cs +++ b/src/Numerics/Statistics/Correlation.cs @@ -161,7 +161,7 @@ static double[] AutoCorrelationFft(double[] x, int kLow, int kHigh) /// /// Sample data A. /// Sample data B. - /// The Pearson product-moment correlation coefficient. + /// The Pearson product-moment correlation coefficient. Returns NaN if either series has zero variance (e.g. fewer than two elements, or all values equal). public static double Pearson(IEnumerable dataA, IEnumerable dataB) { int n = 0; @@ -217,7 +217,7 @@ public static double Pearson(IEnumerable dataA, IEnumerable data /// Sample data A. /// Sample data B. /// Corresponding weights of data. - /// The Weighted Pearson product-moment correlation coefficient. + /// The Weighted Pearson product-moment correlation coefficient. Returns NaN if either series has zero weighted variance. public static double WeightedPearson(IEnumerable dataA, IEnumerable dataB, IEnumerable weights) { double meanA = 0; @@ -310,7 +310,7 @@ public static Matrix PearsonMatrix(IEnumerable vectors) /// /// Sample data series A. /// Sample data series B. - /// The Spearman ranked correlation coefficient. + /// The Spearman ranked correlation coefficient. Returns NaN if either series has zero variance after ranking (e.g. fewer than two elements, or all values tied). public static double Spearman(IEnumerable dataA, IEnumerable dataB) { return Pearson(Rank(dataA), Rank(dataB));