Medias aritmética, geométrica y armónica
stats-meansCalcula media aritmética, geométrica, armónica, cuadrática y ponderada. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: calcular la estadística descriptiva de una lista de números (stats-describe). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes arithmetic, geometric and harmonic means (the latter two only for positive values), root mean square, and a weighted mean when weights are supplied. When: a numeric result has to be exact or reproducible instead of estimated. Not for: computing descriptive statistics of a list of numbers (stats-describe). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Numbers (array of number; required; at least 1 items). | |
| weights | No | Optional weights, same length (array of number; optional). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| harmonic | No | ||
| weighted | No | ||
| geometric | No | ||
| quadratic | No | ||
| arithmetic | No |