The interquartile range of a data set is the difference between its first and third quartiles,
Several conventions are used to compute sample quartiles. When the sample size is odd, some conventions include the statistical
median in both the lower and upper halves, while others exclude it; still others
define quartiles by interpolated sample quantiles. These choices can give different
interquartile ranges for a small data set, so the convention should be stated when
it is not otherwise fixed. The convention traditionally used in this work divides
an even-sized sample into equal lower and upper halves, and for an odd-sized sample
includes the statistical median in both halves
before taking their statistical medians as
and
.
The Wolfram Language function InterquartileRange[data]
uses linearly interpolated quantiles with parameters
.
Equivalently, it subtracts the two values returned by Quantile[data,
3/4,1/4
,
1/2,0
,
0,1
].