LQM Registry / statistical
Pearson Correlation
Deterministic Pearson product-moment correlation for two aligned numeric series.
Model key
lq.statistics.pearson-correlationVersion1.0.0
Runtimephp-native
Model contract
Inputs are explicit.
{
"type": "object",
"required": [
"x",
"y"
],
"properties": {
"x": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"y": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}Output contract
Outputs are explicit.
{
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"correlation": {
"type": "number"
},
"covariance_population": {
"type": "number"
}
}
}Default parameters
[]
Example input
{
"x": [
1,
2,
3,
4,
5
],
"y": [
2,
4,
5,
8,
10
]
}