spearman_correlation
Measures monotonic association between paired variables using rank-based Spearman rho, detecting relationships without assuming linearity or being distorted by outliers.
Instructions
Test for a monotonic association between two paired variables, via the Pearson correlation of their ranks -- doesn't assume linearity and is far less sensitive to outliers' exact magnitude than pearson_correlation. Same return shape as pearson_correlation (statistic is rho itself, in [-1, 1]).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | first variable, one value per observation | |
| y | Yes | second variable, same length and pairing order as x | |
| alpha | No | significance level for the test (and any confidence interval); default 0.05 |