Online Tools » Mathematics » Quartiles |
en sv |

The quartiles are three values that divide an ordered set of numbers into four equally sized parts. These values are usually called the *upper quartile*, *median*, and *lower quartile*, and are abbreviated as Q_{1}, Q_{2} and Q_{3}. The difference between the upper and lower quartile is called the *interquartile range*.

The median (Q_{2}) is calculated as usual by first ordering the values, from smallest to largest, and then looking at the middle values. If the number of values is odd there is only one middle number, which is the median. If the number of values is even there are two middle numbers, in which case the median is the mean (average) of these two values.

The lower and upper quartiles (Q_{1} and Q_{3}) can be calculated by using the median to divide the values into two equally sized groups. The first group contains values that are smaller than or equal to the median. The second group contains values that are larger than or equal to the median. Note that for an odd number of values the middle value, representing the median, should not be part of any of these groups. The lower quartile is the median of the first group. Similarly, the upper quartile is the median of the second group.

Example:
*Calculate the quartiles for the values 8, 1, 18, 3, 8, 12 and 10.*

First the values need to be sorted.

1 3 8 __8__ 10 12 18

The middle value is the median. This means that the median (Q_{2}) is equal to **8**.

The lower and upper quartiles are found by calculating the median of the values on each side of the median.

1 __3__ 8 __8__ 10 __12__ 18

This means that the lower quartile (Q_{1}) is equal to **3** and the upper quartile (Q_{3}) is equal to **12**.