Tutorials › AP Statistics › Finding the Median for Odd and Even Samples

Summary statistics · Tutorial 102 of 1000

Finding the Median for Odd and Even Samples

Order the observations to find the middle of a data set, using one central value for an odd sample and the average of two for an even sample.

Beginner 9 min read

What You'll Learn

  • Put observations in numerical order before locating the median.
  • Find the middle position when the sample size is odd.
  • Average the two middle observations when the sample size is even.
  • Account for repeated observations when working from a frequency table.
  • Interpret a median in context, with the variable and its units.

Finding the Middle of Ordered Data

In Computing the Mean and Interpreting It, you learned that the mean uses every observation in an arithmetic calculation. This tutorial focuses on a different measure of center: the median. To find it, first arrange the observations from least to greatest. Then locate the middle of that ordered list.

The order matters because the median is determined by positions, not by the sum of the observations. For an odd number of observations, there is one observation in the middle. For an even number, the two central observations share the middle positions, so the median is their average. Repeated values count as separate observations.

Definition: The median is the middle value of an ordered set of observations. It is the single central observation when the sample size is odd, and the average of the two central observations when the sample size is even.

The median divides the ordered data into two sides. At least half of the observations are less than or equal to the median, and at least half are greater than or equal to it. The median has the same units as the data, such as minutes, centimeters, or kilograms. It does not have to be one of the observed values: with an even sample, averaging the two middle values can produce a value that was not recorded.

Locate the Middle Position

After ordering the data, use the sample size \(n\) to find the central position or positions. If \(n\) is odd, the one middle observation is in position \((n+1)/2\). If \(n\) is even, the middle observations are in positions \(n/2\) and \(n/2+1\). Positions are counted from the smallest value, starting at 1.

$$ \begin{aligned} n\text{ odd:} \quad &\text{median is the observation in position }\frac{n+1}{2}\\ n\text{ even:} \quad &\text{median}=\frac{\text{observation in position }n/2+\text{observation in position }n/2+1}{2} \end{aligned} $$

For example, with 7 observations, the middle position is \((7+1)/2=4\). With 8 observations, the middle positions are \(8/2=4\) and \(8/2+1=5\). In the even case, average the values in those positions; do not average every observation or simply choose one of the two central values.

A reliable routine is to write the values in order, count the positions, and then use the appropriate rule. If a frequency table is provided instead of raw data, the frequencies tell how many times to count each value. You can locate the middle position by adding frequencies cumulatively, without writing out a long list of repeated values.

1
Identify the variable, units, and sample size.
Count all observations, including repeated values. For a frequency table, add the frequencies to get \(n\).
2
Order the observations.
Arrange raw values from least to greatest, or use the order of values in a frequency table.
3
Find the middle position or positions.
Use \((n+1)/2\) for odd \(n\), or \(n/2\) and \(n/2+1\) for even \(n\).
4
Read the median and interpret it.
For odd \(n\), take the value in the middle position. For even \(n\), average the two middle values. State what the result describes and include units.

Worked Examples: Odd, Even, and Repeated Data

Worked Example: Time to Complete a Puzzle

A fictional group of seven students records how many minutes they take to finish a puzzle: 14, 9, 18, 12, 11, 16, and 10. Find and interpret the median completion time.

Solution—Order the values. From least to greatest, the times are 9, 10, 11, 12, 14, 16, and 18 minutes. There are \(n=7\) observations.

Find the middle position. Since 7 is odd, there is one middle observation:

$$ \frac{n+1}{2}=\frac{7+1}{2}=4 $$

The fourth ordered value is 12. Therefore, the median completion time is 12 minutes.

Interpret in context. “The median puzzle completion time for these seven fictional students was 12 minutes.” Three students’ times are below 12 minutes, three are above it, and the student in the middle position recorded 12 minutes.

Notice that the observations were not in order as first listed. Choosing the fourth value from the original list would give 12 in this particular example by coincidence; ordering first is still essential. In a different list, the value in the fourth written position might not be the middle value.

Worked Example: Masses of Reusable Containers

A fictional sample records the mass, in kilograms, of eight reusable containers: 2.1, 1.8, 2.4, 2.0, 1.9, 2.7, 2.3, and 2.2. Find and interpret the median mass.

Solution—Order the values. The ordered masses are 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, and 2.7 kilograms. Here, \(n=8\), which is even.

Find the two middle positions. They are positions \(8/2=4\) and \(8/2+1=5\). The fourth value is 2.1 kilograms, and the fifth is 2.2 kilograms. Average those two values:

$$ \text{median}=\frac{2.1+2.2}{2} =\frac{4.3}{2} =2.15\text{ kilograms} $$

Interpret in context. “The median mass of these eight fictional reusable containers was 2.15 kilograms.” Four observed masses are at or below 2.1 kilograms, and four are at or above 2.2 kilograms. The median, 2.15 kilograms, is between the two central observations and is not itself one of the recorded masses.

The average is used only for the two middle values. The median is not the mean of all eight masses; that would be a different calculation.

Worked Example: Locating the Median in a Frequency Table

A fictional gardening club measures the height of ten seedlings, in centimeters. Its frequency table summarizes the measurements. Find and interpret the median height.

Height (centimeters)Frequency (seedlings)
42
52
61
83
92

Solution—Find the sample size. Add the frequencies: \(n=2+2+1+3+2=10\) seedlings. The values are already listed in increasing order.

Locate both middle observations. Because 10 is even, the middle positions are \(10/2=5\) and \(10/2+1=6\). Track where each value falls in the ordered list. The two 4-centimeter seedlings occupy positions 1 and 2. The two 5-centimeter seedlings occupy positions 3 and 4. The 6-centimeter seedling occupies position 5. The three 8-centimeter seedlings occupy positions 6, 7, and 8. The two 9-centimeter seedlings occupy positions 9 and 10.

Thus, the fifth value is 6 centimeters and the sixth is 8 centimeters. Average them:

$$ \text{median}=\frac{6+8}{2}=7\text{ centimeters} $$

Interpret in context. “The median height among these ten fictional seedlings was 7 centimeters.” The two central observations are 6 and 8 centimeters, so the median lies between them. It does not mean that a seedling in the sample was exactly 7 centimeters tall.

When working from a frequency table, do not treat the five rows as five observations. The frequencies represent ten seedlings, and each repeated height takes up its own position in the ordered data.

Worked Example: Finding the Median With a Repeated Middle Value

A fictional sample records the number of books borrowed by seven members of a reading group in one week: 3, 1, 2, 2, 5, 4, and 2 books. Find and interpret the median.

Solution—Order and count. The ordered observations are 1, 2, 2, 2, 3, 4, and 5 books, so \(n=7\). Since the sample size is odd, the middle position is:

$$ \frac{7+1}{2}=4 $$

The fourth observation is 2 books. The median is therefore 2 books.

Interpret in context. “The median number of books borrowed by these seven fictional reading-group members was 2 books.” Three members borrowed fewer than 2 books, one borrowed exactly 2, and three borrowed more than 2. Each occurrence of 2 counts as a separate observation, so repeated values do not change the rule for finding the middle position.

Common Mistakes and AP Exam Tips

  • Using the original order. The middle value must be found after arranging the observations from least to greatest. The first-listed values are not necessarily the smallest or the middle ones.
  • Miscounting positions. The smallest observation is position 1, not position 0. For an odd sample, count to \((n+1)/2\); for an even sample, identify both \(n/2\) and \(n/2+1\).
  • Taking the wrong number of values. For an odd sample, use the one middle observation. For an even sample, average the two middle observations—not the two values at the ends, and not all the data.
  • Ignoring frequencies. In a frequency table, a value with frequency 3 appears in three positions. Add the frequencies to find \(n\), then account for every repeated observation as you locate the middle.
  • Assuming the median must be observed. That is true for an odd sample, but not necessarily for an even one. In the container example, the median was 2.15 kilograms even though no container had that recorded mass.
  • Leaving out context or units. A numerical answer alone does not tell the reader what was measured. State the group, variable, median, and units in a sentence.

For a full-credit response, show that the data have been ordered, identify the sample size and the relevant middle position or positions, and show the average when \(n\) is even. Then interpret the result in context. For example: “The two middle masses are 2.1 and 2.2 kilograms, so the median mass for these eight containers is \((2.1+2.2)/2=2.15\) kilograms.”

As in Five-Number Summary and Boxplot Construction, the median is a central location within ordered data. This tutorial focuses on finding that value from a list or frequency table; calculating the median correctly begins with counting all observations and keeping their order straight.

Key takeaway: Order the observations and count every value, including repeats. For odd \(n\), the median is the observation in position \((n+1)/2\). For even \(n\), average the observations in positions \(n/2\) and \(n/2+1\). Interpret the result with the variable, group, and units.

Check Your Understanding

For each question, show the ordering and position work. Include units and context when a situation is given.

  1. A fictional sample of five daily step counts, in thousands, is 6, 9, 5, 8, and 7. Find and interpret the median.
  2. Four fictional delivery times are 18, 24, 20, and 26 minutes. Find the median and explain why you average two observations.
  3. A frequency table has values 2, 3, and 6, with frequencies 2, 3, and 1, respectively. Find the sample size and median.
  4. Can the median of an even-sized sample be different from every observation? Give a short example or explain why not.
  5. Explain why a value with frequency 4 takes up four positions when finding the median from a frequency table.