Statistics
Spearman rank correlation API
Computes Spearman's rho (rank correlation, tie-corrected) with a t-based significance test, capturing monotonic association robust to outliers and non-linearity. Answers 'What is the rank correlation between two variables?', 'Is the monotonic relationship significant?'.
Price$0.06per request
MethodPOST
Route/v1/stats/spearman-correlation
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
statisticscorrelationspearmanranknonparametricmonotonicsignificanceinference
API URL
Integration docshttps://x402.hexl.dev/v1/stats/spearman-correlationExample request
{
"x": [
1,
2,
3,
4,
5
],
"y": [
2,
1,
4,
3,
5
]
}Example response
{
"rho": 0.8,
"n": 5,
"df": 3,
"t": 2.309401,
"pValue": 0.104088,
"alpha": 0.05,
"direction": "positive",
"rating": "very strong",
"significant": false,
"interpretation": "Spearman ρ=0.8 (very strong positive monotonic), p=0.1041."
}Input schema
{
"type": "object",
"required": [
"x",
"y"
],
"properties": {
"x": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
1,
2,
3,
4,
5
]
]
},
"y": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
2,
1,
4,
3,
5
]
]
},
"alpha": {
"type": "number",
"examples": [
0.05
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}