public static TestResult SpearmanRhoTest(
IReadOnlyList<double> x,
IReadOnlyList<double> y
)
Public Shared Function SpearmanRhoTest (
x As IReadOnlyList(Of Double),
y As IReadOnlyList(Of Double)
) As TestResult
public:
static TestResult^ SpearmanRhoTest(
IReadOnlyList<double>^ x,
IReadOnlyList<double>^ y
)
static member SpearmanRhoTest :
x : IReadOnlyList<float> *
y : IReadOnlyList<float> -> TestResult
The Spearman rank-order test of association is a non-parametric test for association between two variables. The test statistic rho is the correlation coefficient of the rank of each entry in the sample. It is thus invariant over monotonic re-parameterizations of the data, and will, for example, detect a quadratic or exponential association just as well as a linear association.
The Spearman rank-order test requires O(N log N) operations.
ArgumentNullException | x or y is . |
DimensionMismatchException | x and y do not contain the same number of entries. |
InsufficientDataException | There are fewer than three data points. |