Skip to content

median

Computes the approximate median of all grouped values using a t-digest algorithm.

median(xs:list) -> float

The median function returns an approximate median of all numeric values in xs, computed with a t-digest algorithm.

The values to evaluate.

from {x: 1}, {x: 2}, {x: 3}, {x: 4}
summarize median_value=median(x)
{median_value: 2.5}

mean, quantile