Quartile

This function returns the quartiles of a data sample.

quartile(Random_variable)

It returns a vector of three components: the k-th component correspond to the k-th quartile.

Option Description Format Default value
type We can choose the method to calculate the quartiles. There are 11 different types. From 1 to 9 correspond to the quartile calculation methods described by Hyndman and Fan in their article Sample quantiles in statistical packages (1996). The numbering is the same as theirs. Type 10 takes the median for quartile 2, and the median of the corresponding half of the data set for quartiles 1 and 3. Does not include the median in the computation of the first and third quartiles if the number of elements is odd. Type 11 takes the median for quartile 2, and the median of the corresponding half of the data set for quartiles 1 and 3. Includes the median in the computation of the first and third quartiles if the number of elements is odd. {type=8}{type=11}