math_statistics_calculator
Compute descriptive statistics, z-scores, Pearson/Spearman correlation, or simple linear regression for numeric datasets. Choose from four modes to analyze single or paired data.
Instructions
Statistics Calculator (Descriptive Stats, Z-Scores, Correlation, Regression). Compute descriptive statistics, z-scores, Pearson/Spearman correlation, or simple linear regression for a numeric dataset you supply. The 'operation' field selects one of four modes: 'describe' (single dataset), 'zScores' (single dataset), 'correlation' (two equal-length datasets), or 'linearRegression' (two equal-length datasets). Use this for analysing a list of numbers; use math_percentage_calculator for percent-of and percent-change math, or math_ratio_calculator for proportions. Runs locally on the numbers you provide: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Returns a JSON envelope (success, operation, result) whose 'result' shape depends on the chosen operation; quartiles and percentiles use Type-7 linear interpolation, and excess kurtosis is reported (a normal distribution gives roughly 0).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Mode selector. describe and zScores each need the values array; correlation and linearRegression each need both x and y arrays. | |
| values | No | Numeric dataset for describe and zScores (required for those, ignored otherwise). 1 to 100000 finite numbers; numeric strings are coerced. NaN and Infinity are rejected. | |
| x | No | First numeric dataset for correlation and linearRegression (the independent variable for regression). 2 to 100000 finite numbers; must be the same length as y. | |
| y | No | Second numeric dataset for correlation and linearRegression (the dependent variable for regression). 2 to 100000 finite numbers; must be the same length as x. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Always true on a 200 response. | |
| operation | No | Echo of the requested operation. | |
| result | No | Operation-specific output (fields below are grouped by the operation that returns them). |