Tutorials › Introduction to Statistics › Finding the Median in an Even-Sized Data Set

Center, Spread and Position · Tutorial 150 of 996

Finding the Median in an Even-Sized Data Set

Learn to locate the two central observations in an even-sized data set, calculate their average, and interpret the result in context.

Beginner 9 min read

What You'll Learn

  • Put an even number of observations in order before locating the median.
  • Find the two central positions using the sample size.
  • Calculate the median as the average of the central values.
  • Explain why the median can fall between observed values.
  • Check position counts, repeated values, and units in context.

Why an Even-Sized Data Set Has Two Middle Values

A median marks the center of an ordered data set. When the number of observations is odd, one observation occupies the central position. When the number is even, the center falls between two positions instead. The standard convention is to average the values in those two positions. As a result, the median is a measure of center, but it need not be one of the values recorded.

The key is to separate two tasks: first, put the observations in order; then, use the sample size to find the central positions. Averaging the wrong pair, or averaging before sorting, can produce an incorrect result.

Definition: For an even number \(n\) of quantitative observations, arrange the values in nondecreasing order and write them as \(x_{(1)}, x_{(2)}, \ldots, x_{(n)}\), where \(x_{(i)}\) is the value in position \(i\). The median is the average of the values in positions \(n/2\) and \(n/2+1\):
$$ \text{Median}=\frac{x_{(n/2)}+x_{(n/2+1)}}{2}. $$

The sample size \(n\) is even, so \(n/2\) is a whole number. The central observations are therefore the values immediately on either side of the midpoint between positions \(n/2\) and \(n/2+1\). This rule applies whether the two values are distinct or equal.

Finding the Central Positions

It can help to write the sample size as \(n=2m\), where \(m\) is a whole number. The two middle positions are then \(m\) and \(m+1\). There are \(m-1\) observations before the middle pair, and \(m-1\) after it. If the data are divided into two groups of \(m\) observations each, the first group ends with the lower middle value and the second group begins with the upper middle value.

For example, if \(n=10\), the middle positions are 5 and 6. Four observations precede this pair, in positions 1 through 4, and four follow it, in positions 7 through 10. If the ordered data are split into positions 1 through 5 and positions 6 through 10, each group contains five observations: the lower middle value is the last value in the first group, and the upper middle value is the first value in the second group.

1
Order the observations.
List every value from smallest to largest, keeping repeated values in the list.
2
Count the observations.
Confirm that \(n\) is even and identify positions \(n/2\) and \(n/2+1\).
3
Average those two values.
Add the values in the central positions and divide by 2; then report the result with the variable’s units.

Worked Example: Finding the Median of Eight Travel Times

A hypothetical group of eight cyclists records how many minutes each took to complete a short route. Their times, in minutes, are 20, 12, 28, 17, 23, 15, 19, and 14. Find and interpret the median.

First, arrange the times in order:

12, 14, 15, 17, 19, 20, 23, 28 minutes.

There are \(n=8\) observations, so the middle positions are \(8/2=4\) and \(8/2+1=5\). The values in those positions are 17 and 19 minutes. Apply the formula:

$$ \text{Median}=\frac{17+19}{2} =\frac{36}{2} =18\text{ minutes}. $$

The median completion time is 18 minutes. This is the midpoint of the two central recorded times, not a time that one of these cyclists necessarily recorded. In this data set, no cyclist took exactly 18 minutes.

Why Averaging the Middle Pair Is a Meaningful Convention

Suppose the ordered observations are \(x_{(1)}, \ldots, x_{(2m)}\), and let the two central values be \(a=x_{(m)}\) and \(b=x_{(m+1)}\). Since the observations are ordered, \(a\leq b\). The median is the midpoint \((a+b)/2\), which lies between \(a\) and \(b\), including the endpoints when they are equal.

This midpoint has a useful central property. The first \(m\) observations are all at or below \(a\), and \(a\) is at or below the median. Thus at least \(m\) observations are at or below the median. The last \(m\) observations are all at or above \(b\), and \(b\) is at or above the median. Thus at least \(m\) observations are at or above the median. Since \(n=2m\), the median has at least half the observations on each side when values equal to it are included.

This argument also explains why the median does not have to be an observed value. If \(a<b\), their midpoint may be a value strictly between them. The data themselves have no observation in the gap, but the median still identifies the center between the two middle observations. If \(a=b\), the average equals that shared value, so the median is observed.

Worked Example: A Median Between Two Recorded Values

A hypothetical set of six waiting times, in minutes, is already ordered as 2, 4, 4, 7, 9, 11. Find the median.

Here \(n=6\), so the central positions are 3 and 4. The corresponding values are 4 and 7 minutes. Their average is:

$$ \text{Median}=\frac{4+7}{2} =\frac{11}{2} =5.5\text{ minutes}. $$

The median waiting time is 5.5 minutes. No recorded waiting time is 5.5 minutes; the median lies between the two central observations, 4 and 7 minutes. There are three observations at or below 5.5 and three at or above 5.5, as expected for six ordered observations.

Work From the Original Data Carefully

In many problems, the observations are not supplied in order. Sorting is essential because the middle positions refer to rank, not to the order in which values happen to be written. Repeated values remain separate observations: if a value occurs three times, it occupies three positions in the ordered list.

Worked Example: Sorting Before Calculating

A hypothetical instructor records quiz scores for eight students: 76, 91, 84, 68, 91, 73, 88, and 80 points. Find the median score.

Sort the scores while retaining both occurrences of 91:

68, 73, 76, 80, 84, 88, 91, 91 points.

With \(n=8\), the two central positions are 4 and 5. Their values are 80 and 84 points, so:

$$ \text{Median}=\frac{80+84}{2} =\frac{164}{2} =82\text{ points}. $$

The median quiz score is 82 points. It is the midpoint of the fourth and fifth ordered scores, even though no student in this group scored exactly 82.

A repeated middle value is also possible. For example, in the ordered data 5, 7, 7, 7, 10, 12, the middle positions are 3 and 4, and both values are 7. The median is \((7+7)/2=7\), which is an observed value. Repetition does not change the procedure; it simply affects which values occupy the central positions.

Worked Example: Checking the Middle-Pair Counts for Ten Values

Consider the hypothetical ordered measurements 3, 4, 6, 8, 10, 12, 13, 15, 18, and 21 centimeters. Identify the middle pair, check how many observations precede and follow it, and calculate the median.

Here \(n=10\), so the middle positions are 5 and 6. Those positions contain 10 and 12 centimeters. Positions 1 through 4 contain four observations before the pair, and positions 7 through 10 contain four observations after it. The central pair itself occupies positions 5 and 6.

The median is:

$$ \text{Median}=\frac{10+12}{2} =\frac{22}{2} =11\text{ centimeters}. $$

The median measurement is 11 centimeters. It is not one of the ten recorded measurements. The first five positions and the last five positions each contain five observations only when the central pair is split between these two groups: position 5 ends the first group, and position 6 begins the second.

Common Mistakes and Checks

  • Choosing a middle value without ordering the data. The central positions are defined by rank. Sort the observations before identifying them.
  • Averaging the observations in the middle of the written list. Their locations in the original list do not matter; use positions \(n/2\) and \(n/2+1\) in the ordered list.
  • Using only one of the two central values. With an even sample size, the median is the average of both central values, not just the lower or upper one.
  • Dropping repeated observations. Each recorded value counts, even if several observations have the same value.
  • Assuming the median must be observed. When the central values differ, their average may fall between recorded values. Report it as the median, with units.
  • Miscounting what lies before and after the middle pair. For ten observations, positions 5 and 6 are the middle pair; only positions 1–4 precede it and positions 7–10 follow it.

A quick check is to confirm that the chosen values are in the two central positions and that the calculated median lies between them. If the values are 10 and 12 centimeters, for instance, their average must be 11 centimeters, not a value outside that range.

Key takeaway: For an even-sized data set, order the observations and average the values in positions \(n/2\) and \(n/2+1\). The result is the median even when it is not itself an observation.

Check Your Understanding

For each question, identify the central positions before calculating or interpreting the median.

  1. Find the median of the ordered data 4, 6, 9, 12, 15, 19.
  2. The sorted values are 3, 5, 7, 8, 10, 14, 16, 20. Which positions contain the middle pair, and what is the median?
  3. Explain why a data set with an even number of observations can have a median that is not one of its recorded values.
  4. For ten ordered observations, how many observations precede the middle pair in positions 5 and 6, and how many follow it?
  5. Why should repeated values be kept when arranging observations to find the median?