Three Boundaries across an Ordered Dataset
The median marks the middle of an ordered dataset at . Quartiles extend that idea by marking three positions across the ordered data.
Those positions divide the distribution by rank into four parts, each representing about one quarter of the observations. With a finite dataset or tied values, the parts need not contain four visibly distinct sets of equal size.
There are three quartile boundaries:
- Lower Quartile (): The boundary at approximately the rank.
- Middle Quartile (): The median, at approximately the rank.
- Upper Quartile (): The boundary at approximately the rank.
Together, , , and describe the lower quarter, center, and upper quarter of an ordered distribution.
How to Find the Position of Quartiles
How do we find the rank positions of , , and in ordered data?
Assume we have data points that we have sorted from smallest to largest.
Quartiles can be defined by several valid ranking conventions, so software packages may return slightly different values for the same small dataset. The calculations below consistently use the interpolated position , where is , , or . A position below is clamped to the minimum and a position above to the maximum. For a valid comparison, calculate every result with the same convention.
Lower Quartile
For the lower quartile:
- If the result is a whole number, for example , then is the value at position .
- If the result has a decimal, for example , then lies between positions and . We will calculate its interpolated value later. For now, we are only locating it.
Example:
Suppose we have data points ().
The position of is the data point at , which is data point or .
This means lies between positions and .
Middle Quartile
The middle quartile is the median:
The rules are the same as for :
- If the result is a whole number, say , is the value of data point .
- If the result has a decimal, say , is between data points and .
Example ():
The position of is the data point at , which is data point or .
This means (the median) is between data points and .
Upper Quartile
The formula is similar again:
The same interpolation rule applies:
- If the result is a whole number, say , is the value of data point .
- If the result has a decimal, say , is between data points and .
Example ():
The position of is the data point at , which is data point or .
A position of places between data points and .
Worked exercise
Try to find the position of , , and from the math test scores of these children:
Scores:
Try the problem yourself first. Then compare your reasoning with the complete solution below.
Step 1: Sort the data first!
Sorted data:
Number of data points:
Step 2: Find the quartile positions using the formulas
-
Position of :
The result is a whole number (), so is the nd data point.
-
Position of (Median):
The result is a whole number (), so is the th data point.
-
Position of :
The result is a whole number (), so is the th data point.
Step 3: Determine the quartile values
Using the sorted data from Step 1:
- is nd data point =
- is th data point =
- is th data point =
The Fourth Quartile
Quartiles divide ordered data into four parts. , , and mark the boundaries at , , and . The outer boundary at is the maximum value.
The maximum is sometimes labeled , and the minimum is sometimes labeled . Most statistical summaries name the minimum and maximum directly and reserve quartile notation for , , and .