Test whether two samples x and y come from uncorrelated populations.
The optional argument string alt describes the alternative
hypothesis, and can be "!="
or "<>"
(nonzero), ">"
(greater than 0), or "<"
(less than 0). The default is the
two-sided case.
The optional argument string method specifies which correlation
coefficient to use for testing. If method is "pearson"
(default), the (usual) Pearson’s product moment correlation coefficient is
used. In this case, the data should come from a bivariate normal
distribution. Otherwise, the other two methods offer nonparametric
alternatives. If method is "kendall"
, then Kendall’s rank
correlation tau is used. If method is "spearman"
, then
Spearman’s rank correlation rho is used. Only the first character is
necessary.
The output is a structure with the following elements:
The p-value of the test.
The value of the test statistic.
The distribution of the test statistic.
The parameters of the null distribution of the test statistic.
The alternative hypothesis.
The method used for testing.
If no output argument is given, the p-value is displayed.
Package: octave