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]).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x": "<x>",
"y": "<y>"
},
"name": "spearman_correlation"
}
}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 |