Quartiles of a Statistical List
stats[describe, quartile[which]](data, gap)
(optional, default=false) The common size of gaps between classes.
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
The function quartile of the subpackage stats[describe, ...] finds the item in data that corresponds to the quartile specified by which. If the requested quartile falls between entries, it is interpolated.
The values given by quartile can be thought of as 3 values that partition the data set, once sorted, into 4 data sets of equal weight.
Half of the difference between the third quartile and the first quartile is a measure of the dispersion of the data. This quantity is known as the semi-interquartile range and the quartile deviation. Refer to describe[standarddeviation] for more information about measures of the dispersion of data.
Missing data are ignored.
For information about the parameter gap, see describe[gaps].
The data must be numeric.
The command with(stats[describe],quartile) allows the use of the abbreviated form of this command.
data ≔ 10,20,30,40,50,60,70,80
To compute the quartiles, all at once
quartiles ≔ seq⁡describequartilei,i=1..3:
The semi-interquartile range is given by
semi_QR ≔ x→describe[quartile]⁡x−describe[quartile]⁡x2:
Download Help Document