You are here: Symbol Reference > Statistics Namespace > Functions > Statistics.SpearmanRankCorr Function
Stats Master VCL
ContentsIndex
PreviousUpNext
Statistics.SpearmanRankCorr Function

Spearman rank correlation test.

Pascal
procedure SpearmanRankCorr(const X: TVec; const Y: TVec; out Rs: double; out hRes: THypothesisResult; out Signif: double; var ConfInt: TTwoElmReal; hType: THypothesisType = htTwoTailed; Alpha: double = 0.05);
Parameters 
Description 
X dataset. 
Y dataset. 
Rs 
Returns Spearman rank correlation coefficient. 
hRes 
Returns the result of the null hypothesis (default assumption is there is no monotonic relation between the variables => Rs=0). 
Signif 
(Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true. 
ConfInt 
Returns the 100*(1-Alpha) percent confidence interval for the Rs coefficient. 
hType 
Defines the type of the null hypothesis (one or two - tailed, default value two-tailed). 
Alpha 
Defines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected. 

Performs the Spearman rank correlation test. Spearman rank correlation is a distribution-free analog of correlation analysis mentioned. Like regression, it can be applied to compare two independent random variables, each at several levels (which may be discrete or continuous). Unlike regression, Spearman's rank correlation works on ranked (relative) data, rather than directly on the data itself. Like the R2 value produced by regression, the Spearman's Rs coefficient indicates agreement. A value of rs near one indicates good agreement; a value near zero, poor agreement. Of course, as a distribution-free method, the Spearman rank correlation does not make any assumptions about the distribution of the underlying data. 

Spearman test is a distribution free test that determines whether there is a monotonic relation between two variables (X , Y). A monotonic relation exists when any increase in one variable is invariably associated with either an increase or a decrease in the other variable.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!