statistics
Calculate statistical metrics such as mean, median, mode, variance, standard deviation, min, max, range, percentile, and correlation for one or two datasets. Use the summary operation to obtain all basic statistics at once.
Instructions
Calculate statistics on a dataset. Operations: mean, median, mode, variance, stddev, min, max, range, percentile, correlation. For percentile provide the 'percentile' parameter (0-100). For correlation provide a second dataset 'dataY'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The dataset (array of numbers) | |
| dataY | No | Second dataset for correlation. Must be same length as 'data'. | |
| operation | Yes | The statistical operation to perform. Use 'summary' for all basic stats at once. | |
| percentile | No | The percentile to compute (0-100). Required when operation is 'percentile'. | |
| population | No | If true, use population variance/stddev (N). Default is sample (N-1). |