describe(deprecated)/quartile - Help

stats[describe]

 quartile
 Quartiles of a Statistical List

 Calling Sequence stats[describe, quartile[which]](data, gap) describe[quartile[which]](data, gap)

Parameters

 data - statistical list which - quartile required gap - (optional, default=false) The common size of gaps between classes.

Description

 • 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.

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

 > $\mathrm{with}\left(\mathrm{stats}\right):$
 > $\mathrm{data}≔\left[10,20,30,40,50,60,70,80\right]$
 ${\mathrm{data}}{≔}\left[{10}{,}{20}{,}{30}{,}{40}{,}{50}{,}{60}{,}{70}{,}{80}\right]$ (1)
 > $\mathrm{describe}[\mathrm{quartile}[1]]\left(\mathrm{data}\right)$
 ${20}$ (2)

To compute the quartiles, all at once

 > $\mathrm{quartiles}≔\left[\mathrm{seq}\left({\mathrm{describe}}_{{\mathrm{quartile}}_{i}},i=1..3\right)\right]:$
 > $\mathrm{quartiles}\left(\mathrm{data}\right)$
 $\left[{20}{,}{40}{,}{60}\right]$ (3)

The semi-interquartile range is given by

 > $\mathrm{semi_QR}≔x→\frac{\mathrm{describe}[\mathrm{quartile}[3]]\left(x\right)-\mathrm{describe}[\mathrm{quartile}[1]]\left(x\right)}{2}:$
 > $\mathrm{semi_QR}\left(\mathrm{data}\right)$
 ${20}$ (4)