Quartiles and box plots
In short: Quartiles divide sorted data into four equal parts. A box plot shows this division as a chart and makes location, spread and outliers visible at a glance.
In more detail: The lower quartile Q1 is placed so that about a quarter of the values lie below it, and the upper quartile Q3 so that about three quarters lie below it. The median is the middle quartile Q2.
In detail
- Example data: Take the sorted values 2, 4, 4, 5, 7, 8, 9, 10, 12. The median is the middle value, i.e. 7.
- Finding the quartiles: A common method takes the median of the lower and upper halves, leaving out the overall median. The lower half 2, 4, 4, 5 gives Q1 = 4; the upper half 8, 9, 10, 12 gives Q3 = 9.5.
- Different methods: Textbooks and software use slightly different rules for calculating quartiles. With small data sets the results can therefore differ a little.
- Interquartile range: The range IQR = Q3 − Q1 covers the middle 50 % of the data, in the example 9.5 − 4 = 5.5. It hardly reacts to extreme values and is therefore a robust measure of spread.
- Structure of a box plot: The box runs from Q1 to Q3, and a line inside the box marks the median. The lines to the left and right, called whiskers, extend to the most extreme values that do not yet count as outliers.
- Spotting outliers: Values are often treated as outliers if they lie more than 1.5 times the IQR below Q1 or above Q3. In the example the limits are 4 − 8.25 = −4.25 and 9.5 + 8.25 = 17.75, so there is no outlier.
- Reading skewness: If the median is not in the middle of the box, or one whisker is clearly longer, the distribution is skewed.
- Comparing groups: Several box plots side by side are well suited to comparing, for example, incomes, measurements or exam results of different groups.
- Context: Quartiles complement the median and standard deviation and are part of the basics of reading charts (mittelwert-median-und-modus, standardabweichung-und-streuung, diagramme-lesen-und-verstehen).