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}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_x | Yes | ||
| data_y | Yes |