Spearman correlation testΒΆ
The Spearman Test checks if there exists a monotonic relationship between two random
variables and
.
The Spearman test is based on the Spearman correlation coefficient defined in Spearman coefficient. It tests if the Spearman correlation coefficient is significantly different from zero.
The Spearman compares the null hypothesis against the
alternative
hypothesis
.
The Spearman correlation coefficient is evaluated on a sample generated by the
bivariate random vector
of size
and denoted by
as detailed in (1).
The statistics used in the test is defined by:
Under the null hypothesis , the statistics
follows a Student
distribution with
degrees of freedom in the case of a Gaussian vector. In the other
cases, the Student distribution
is equivalent to the asymptotic distribution of
. The library uses the Student distribution
in all the cases.
The p-value is the probability
where
is the realization of
computed on the sample. The null hypothesis
is rejected if
where
is specified
(usually 0.1 or 0.05). The p-value limit
is the probability to wrongly reject the null hypothesis
, which
means to commit a Type I error.
When the null hypothesis is rejected, it means that there is a significant monotonic
relationship between both variables
and
.
OpenTURNS