quantile
Single quantile as a degenerate summary (y, ymin: y, ymax: y).
Quantiles use the type-7 / numpy default linear interpolation rule, the same convention as median-hilow and src/stat/boxplot.typ.
Usage
quantile(
values,
q: 0.5,
)Parameters
| Parameter | Default | Description |
|---|---|---|
values |
Array of numbers; non-numeric entries are dropped. | |
q |
0.5 |
Probability in the closed interval [0, 1]. |
Returns
Dict (y, ymin, ymax) with ymin == ymax == y; all-none if values has no numerics.
Examples
Lower quartile.
#let s = quantile((1, 2, 3, 4), q: 0.25)