Skip to content

iqr

iqr(numbers) → number · Math

Calculate the interquartile range (IQR = Q3 - Q1) of a numeric array.

  • numbers (required): array of numbers
bash
echo '{"data": [1, 3, 5, 7, 9, 11, 13]}' | utlx -e 'iqr($input.data)'
# 8
utlx
{
  spread: iqr($input.values),
  outlierThreshold: iqr($input.values) * 1.5
}

Released under AGPL-3.0.