Skip to content
LQM Registry / statistical

Pearson Correlation

Deterministic Pearson product-moment correlation for two aligned numeric series.

Model keylq.statistics.pearson-correlation
Version1.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
    ]
}
Capabilities
cpudeterministicgoverned