New Tool Radar

AI Research & Fact-Checking

How to Find the Median of an Even Count of Values

Sort the values and average the two middle ones before you trust a median an AI picked from an even count.

Schematic diagram: an AI answer says aI says the median is 9, while the correct value is Correct median is 10.5; the verdict is Wrong.

When a data set has an even number of values there is no single middle value. Khan Academy states the rule plainly: if the number of data values is even, the median is the average of the two middle data values. An AI answer often picks one of the two middle values instead of averaging them.

Use the practice table

The table below is synthetic. It is about a fictional walking club, and it was not produced by any AI tool. It is the only source for the exercise.

Practice table — minutes walked, six fictional members:

  • Values as given: 20, 4, 12, 15, 7, 9.

Practice AI answer: “The median is 9 minutes.”

Check the answer

Expected result. We checked Khan Academy’s median rule. We did not run an AI tool on the practice table. The checked list below is what to expect if the median is correct; run the same check yourself on the table above.

What was checked AI answer says Correct value Verdict
Values sorted not shown 4, 7, 9, 12, 15, 20 Correct — sorted smallest to largest
Count of values not shown 6 Correct — an even count, so there are two middle values
Two middle values 9 9 and 12 Wrong — the 3rd and 4th values are 9 and 12
Median 9 10.5 Wrong — (9 + 12) / 2 = 10.5

One middle value is not the median

The AI answer picked the lower of the two middle values and stopped. With an even count, the median sits halfway between the two middle values, so it can be a number that never appears in the data. Sort first, count the values, then average the middle pair.

See also: check-ai-average-against-small-table.

What to do with each verdict

  • Correct: keep the median, and keep the sorted list with it so the next reader can find the middle pair.
  • Wrong: replace it with the average of the two middle values.
  • A value is missing: say which value is missing; a median from an incomplete list can shift by a whole position.

Limits

  • This guide checks the median of a small set. It does not check whether the values themselves are right.
  • The median can be a half value such as 10.5 even when every value is a whole number. That is normal, not an error.
  • No AI tool was run for this guide. The practice table and answer are synthetic.

Sources

See all