Spearman's rho - overview
This page offers structured overviews of one or more selected methods. Add additional methods for comparisons (max. of 3) by clicking on the dropdown button in the right-hand column. To practice with a specific method click the button at the bottom row of the table
Spearman's rho | McNemar's test |
|
---|---|---|
Variable 1 | Independent variable | |
One of ordinal level | 2 paired groups | |
Variable 2 | Dependent variable | |
One of ordinal level | One categorical with 2 independent groups | |
Null hypothesis | Null hypothesis | |
H0: $\rho_s = 0$
Here $\rho_s$ is the Spearman correlation in the population. The Spearman correlation is a measure for the strength and direction of the monotonic relationship between two variables of at least ordinal measurement level. In words, the null hypothesis would be: H0: there is no monotonic relationship between the two variables in the population. | Let's say that the scores on the dependent variable are scored 0 and 1. Then for each pair of scores, the data allow four options:
Other formulations of the null hypothesis are:
| |
Alternative hypothesis | Alternative hypothesis | |
H1 two sided: $\rho_s \neq 0$ H1 right sided: $\rho_s > 0$ H1 left sided: $\rho_s < 0$ | The alternative hypothesis H1 is that for each pair of scores, P(first score of pair is 0 while second score of pair is 1) $\neq$ P(first score of pair is 1 while second score of pair is 0). That is, the probability that a pair of scores switches from 0 to 1 is not the same as the probability that a pair of scores switches from 1 to 0. Other formulations of the alternative hypothesis are:
| |
Assumptions | Assumptions | |
|
| |
Test statistic | Test statistic | |
$t = \dfrac{r_s \times \sqrt{N - 2}}{\sqrt{1 - r_s^2}} $ Here $r_s$ is the sample Spearman correlation and $N$ is the sample size. The sample Spearman correlation $r_s$ is equal to the Pearson correlation applied to the rank scores. | $X^2 = \dfrac{(b - c)^2}{b + c}$
Here $b$ is the number of pairs in the sample for which the first score is 0 while the second score is 1, and $c$ is the number of pairs in the sample for which the first score is 1 while the second score is 0. | |
Sampling distribution of $t$ if H0 were true | Sampling distribution of $X^2$ if H0 were true | |
Approximately the $t$ distribution with $N - 2$ degrees of freedom | If $b + c$ is large enough (say, > 20), approximately the chi-squared distribution with 1 degree of freedom. If $b + c$ is small, the Binomial($n$, $P$) distribution should be used, with $n = b + c$ and $P = 0.5$. In that case the test statistic becomes equal to $b$. | |
Significant? | Significant? | |
Two sided:
| For test statistic $X^2$:
| |
n.a. | Equivalent to | |
- |
| |
Example context | Example context | |
Is there a monotonic relationship between physical health and mental health? | Does a tv documentary about spiders change whether people are afraid (yes/no) of spiders? | |
SPSS | SPSS | |
Analyze > Correlate > Bivariate...
| Analyze > Nonparametric Tests > Legacy Dialogs > 2 Related Samples...
| |
Jamovi | Jamovi | |
Regression > Correlation Matrix
| Frequencies > Paired Samples - McNemar test
| |
Practice questions | Practice questions | |