Skip to content

Interquartile Range (IQR) ​

Use p25, p50, and p75 together to show the interquartile range - a measure of statistical dispersion.

Interactive Example ​

Try It
TABLE ROWS occupation * income.(p25 | p50 | p75);
Dataset:samplesoccupation, education, gender, income
Try Variations

Query Breakdown ​

  • income.(p25 | p50 | p75) - Multi-binding syntax: applies three percentile aggregations to income
  • p25 - First quartile (25th percentile)
  • p50 - Median (50th percentile)
  • p75 - Third quartile (75th percentile)

The IQR (p75 - p25) contains the middle 50% of the data. It's useful for understanding data spread and identifying outliers.

Percentile Reference ​

SyntaxPercentileDescription
p2525thFirst quartile
p5050thMedian (also available as median)
p7575thThird quartile
p9090thCommon for performance metrics
p9595thCommon for SLA/latency reporting
p9999thTail latency metric

Powered by Malloy and DuckDB