You are working with the text-only light edition of "H.Lohninger: Teach/Me Data Analysis, Springer-Verlag, Berlin-New York-Tokyo, 1999. ISBN 3-540-14743-8". Click here for further information. |
Table of Contents Univariate Data Measures of Location Quartile | |
See also: Median, Interquartile Range, Fractiles |
The calculation of the quartiles is sometimes not quite clear (especially if the number of observations of a sample is not divisible by four). We therefore provide exact instructions how to calculate the quartiles. Assuming a sample of N observations the quartiles are defined as follows ("round" stands for the rounding to the nearest integer):
Example: | Assume that we have obtained the following 20 observations:
2, 4, 7, -20, 22, -1, 0, -1, 7, 15, 8, 4, -4, 11, 11, 12, 3, 12, 18, 1In order to calculate the quartiles we first have to sort the observations: -20, -4, -1, -1, 0, 1, 2, 3, 4, 4, 7, 7, 8, 11, 11, 12, 12, 15, 18, 22The position of the first quartile is x = round(0.25*(20+1)) = round(5.25) = 5, which means that Q_{1} is the 5^{th} value of the sorted series, namely Q_{1} = 0. The other quartiles are calculated in the same way resulting in Q_{2} = 5.5 and Q_{3} = 12. |
Remark on practical aspects: quartiles are usually calculated only for samples with more than 12 observations (a minimum of 20 observations would be even better).
Last Update: 2005-Jän-25