Percentiles y cuantiles
stats-percentileCalcula percentiles (0-100) con método seleccionable (lineal, exclusivo, rango más cercano). 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 one or more percentiles (0-100) of a list of numbers with a selectable method (linear = Excel PERCENTILE.INC / numpy default, exclusive, nearest_rank). 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 |
|---|---|---|---|
| method | No | Percentile method: linear (Excel PERCENTILE.INC, numpy default), exclusive (PERCENTILE.EXC), nearest_rank (optional; one of: linear, exclusive, nearest_rank; default "linear"). | linear |
| values | Yes | Numbers (array of number; required; at least 1 items). | |
| percentiles | No | Percentiles 0-100 (array of number; optional; default [25,50,75,90,95,99]; at least 1 items; up to 100 items). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | No |