correlation_coefficient
Calculates the Pearson correlation between two numeric lists to measure their linear relationship and returns the coefficient.
Instructions
Computes the Pearson correlation coefficient between two lists of numbers.
Args: data_x: The first list of numerical values. data_y: The second list of numerical values.
Returns: On success: {"result": } On error: {"error": }
Examples: >>> correlation_coefficient([1, 2, 3], [4, 5, 6]) {'result': 1.0}
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": {
"data_x": "<data_x>",
"data_y": "<data_y>"
},
"name": "correlation_coefficient"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_x | Yes | ||
| data_y | Yes |