public static TestResult PearsonRTest( IReadOnlyList<double> x, IReadOnlyList<double> y )
Public Shared Function PearsonRTest ( x As IReadOnlyList(Of Double), y As IReadOnlyList(Of Double) ) As TestResult
public: static TestResult^ PearsonRTest( IReadOnlyList<double>^ x, IReadOnlyList<double>^ y )
static member PearsonRTest : x : IReadOnlyList<float> * y : IReadOnlyList<float> -> TestResult
This test measures the strength of the linear correlation between two variables. The test statistic r is simply the covariance of the two variables, scaled by their respective standard deviations so as to obtain a number between -1 (perfect linear anti-correlation) and +1 (perfect linear correlation).
The Pearson test cannot reliably detect or rule out non-linear associations. For example, variables with a perfect quadratic association may have only a weak linear correlation. If you wish to test for associations that may not be linear, consider using the Spearman or Kendall tests instead.
The Pearson correlation test requires O(N) operations.
The Pearson test requires at least three bivariate values.