Mean and median

A cricket scoreboard gives one number for "average" — but a newspaper reporting "median income" is deliberately choosing a different number. Both are ways of squeezing a whole list of values down to a single figure that says where the data's centre lies, yet they can disagree, sometimes sharply. The mean adds up every value and shares it out equally; the median simply finds the middle value once the data is lined up in order. For a Class 9 ICSE student, the syllabus asks for exactly this: computing the mean and median of ungrouped data, for both odd and even counts of observations, and understanding why the two do not always match. This article builds both ideas from scratch, using the same two data sets — 9 test scores and 8 temperature readings — worked through fully, and shows why the choice between mean and median actually matters in real reporting.

The core insight

The mean sums all values and divides by their count, xˉ=Σx/n\bar{x} = \Sigma x/n, while the median is the middle value of the data once arranged in order — the mean uses every number's size, the median only its position, which is why the median resists being dragged by one extreme value.

The core idea

Mean. The arithmetic mean of nn observations x1,x2,…,xnx_1, x_2, \ldots, x_n is their total divided by how many there are:

xˉ=Σxn=x1+x2+⋯+xnn\bar{x} = \frac{\Sigma x}{n} = \frac{x_1 + x_2 + \cdots + x_n}{n}

where: Σx\Sigma x ("sigma xx") is the sum of all the observations, nn is the total number of observations, and xˉ\bar{x} ("xx bar") is the mean. Every single value pulls on xˉ\bar{x} in proportion to its own size — a very large or very small value shifts the mean noticeably.

Median. Arrange the data first, in an ascending or descending array. The median is whichever value (or pair of values) sits exactly in the middle of that ordered list.

  • If nn is odd, there is a single middle position: the median is the value at position n+12\dfrac{n+1}{2}.
  • If nn is even, two values sit in the middle, at positions n2\dfrac{n}{2} and n2+1\dfrac{n}{2}+1; the median is their average:
Median=12[(n2)thvalue+(n2+1)thvalue]\text{Median} = \frac{1}{2}\left[\left(\frac{n}{2}\right)^{\text{th}} \text{value} + \left(\frac{n}{2}+1\right)^{\text{th}} \text{value}\right]

where: nn is the number of observations once arranged in order, and the superscript "th" marks a position in that ordered list, not a value. The formula n+12\frac{n+1}{2} never has to be an integer to be useful — for n=8n = 8 it gives 4.54.5, telling you the median sits between the 4th and 5th values, which is exactly the even-nn rule above stated another way. The two "averages" measure different things. The mean is sensitive to magnitude — one wildly different value can drag it a long way. The median is sensitive only to rank — position in the ordered list — so a handful of extreme values barely move it, so long as they stay at the extremes and don't cross the middle. This single difference is the reason both are taught, and the reason a student must be able to tell which one a situation calls for.

Figure
Nine ordered test scores with the fifth value marked as the median beside eight ordered temperatures with the fourth and fifth values averaged for the median
Finding the median: odd n versus even n arrange the data first, then locate the middle n = 9 (odd) 25283032 34 36394145 position 5 = median = 34 n = 8 (even) 272829 30 30 313233 positions 4 and 5, both 30 median = (30 + 30) / 2 = 30
Derivation ALocating the median without listing every position

The goal is to justify the two median rules above from a single idea — splitting an ordered list into two equal halves — so that a student can derive the correct position for any nn instead of memorising two separate formulas, and can explain why odd and even counts must be treated differently rather than just recalling that they are.

Step 1. Picture the data already arranged in ascending array, as nn dots in a row: x(1)≤x(2)≤⋯≤x(n)x_{(1)} \le x_{(2)} \le \cdots \le x_{(n)}, where the bracketed subscript means "the value at this rank," not the original list order. The median's job is to sit at the point that has exactly as many values on its left as on its right.

Step 2. Count how many values lie strictly to the left of a candidate middle position kk: it is k−1k - 1. For the median to split the data evenly, the values to the left, k−1k-1, must equal the values to the right, n−kn - k. Setting them equal gives k−1=n−kk - 1 = n - k, so 2k=n+12k = n + 1, so k=n+12k = \dfrac{n+1}{2}.

Step 3. Check what happens for odd and even nn separately. If nn is odd, n+12\dfrac{n+1}{2} is a whole number — a genuine single position exists exactly in the middle, and the median is simply x(k)x_{(k)}, the value sitting there. For n=9n = 9, k=102=5k = \dfrac{10}{2} = 5, a real position: the median is the 5th value.

Step 4. If nn is even, n+12\dfrac{n+1}{2} lands on a half-integer (for n=8n=8, k=4.5k = 4.5) — there is no single "4.5th" value, because positions in a list are whole numbers only. The balance condition is instead satisfied by the two neighbouring whole positions n2\dfrac{n}{2} and n2+1\dfrac{n}{2}+1, which together straddle the true balance point, and the median is defined as their average, Median=12[x(n/2)+x(n/2+1)]\text{Median} = \frac{1}{2}\left[x_{(n/2)} + x_{(n/2+1)}\right]. This is not an arbitrary convention: it is the unique value that keeps exactly half the data below it and half above. Both rules therefore come from the same balancing idea; only whether n+12\frac{n+1}{2} happens to be a whole number decides which form to apply.

Worked example

The marks (out of 50) of 9 students in a class test were 32,28,41,36,25,39,45,30,3432, 28, 41, 36, 25, 39, 45, 30, 34, and the noon temperatures (in degrees Celsius) recorded over the next 8 days were 29,31,27,33,30,28,32,3029, 31, 27, 33, 30, 28, 32, 30. Find the mean and median of each set.

Step 1. Sum and mean of the marks: Σx=32+28+41+36+25+39+45+30+34=310\Sigma x = 32+28+41+36+25+39+45+30+34 = 310, and n=9n = 9, so xˉ=3109=34.4\bar{x} = \dfrac{310}{9} = 34.4 (to 1 decimal place).

Step 2. Median of the marks: arrange in ascending array, 25,28,30,32,34,36,39,41,4525, 28, 30, 32, 34, 36, 39, 41, 45. Since n=9n = 9 is odd, the median sits at position n+12=5\dfrac{n+1}{2} = 5; counting along the array, the 5th value is 3434. So the median mark is 3434, close to the mean of 34.434.4 — a sign the marks are fairly symmetric, without extreme outliers.

Step 3. Sum and mean of the temperatures: Σx=29+31+27+33+30+28+32+30=240\Sigma x = 29+31+27+33+30+28+32+30 = 240, and n=8n = 8, so xˉ=2408=30 ∘C\bar{x} = \dfrac{240}{8} = 30\,^\circ\text{C}.

Step 4. Median of the temperatures: arrange in ascending array, 27,28,29,30,30,31,32,3327, 28, 29, 30, 30, 31, 32, 33. Since n=8n = 8 is even, the two middle positions are n2=4\dfrac{n}{2} = 4 and n2+1=5\dfrac{n}{2}+1 = 5, whose values are both 3030. So Median=30+302=30 ∘C\text{Median} = \dfrac{30+30}{2} = 30\,^\circ\text{C}, exactly equal to the mean here, again pointing to evenly spread data.

The marks have mean 34.434.4 and median 3434; the temperatures have mean and median both equal to 30 ∘C30\,^\circ\text{C}.

Competitive stretch

Suppose the lowest mark in the 9-student set, 2525, had instead been an error entered as 22. The new sum is 310−25+2=287310 - 25 + 2 = 287, so the new mean is 2879≈31.9\dfrac{287}{9} \approx 31.9 — a drop of about 2.52.5 marks from one bad entry. But the new ordered array is 2,28,30,32,34,36,39,41,452, 28, 30, 32, 34, 36, 39, 41, 45, and the 5th value is still 3434: the median does not move at all, because the outlier stayed at the low end of the order and never crossed the middle. This is exactly why the median is called resistant to outliers, while the mean is not.

Common traps

  • Reading the median straight off an unordered list — the data must be arranged in ascending or descending array first; the median of an unsorted list is meaningless.
  • Using n+12\dfrac{n+1}{2} as if it were the median's value — it gives the position in the array, and for even nn it is not even a whole number, so the two-middle-values rule must be used instead.
  • For even nn, averaging the positions (treating "4.5" as an instruction to find a 4.5th item) instead of averaging the two actual values at positions n2\frac{n}{2} and n2+1\frac{n}{2}+1.
  • Dividing the sum by the number of distinct values rather than by nn, the total count of observations, when some values repeat (as the 3030s do in the temperature data).

Ask the tutor: want to check your working on a mean-and-median problem, or see exactly how much the median resists a single extreme value compared with the mean — bring your data set to the AI tutor.

Why do mean and median sometimes give completely different answers for the same data?

Because they measure different things. The mean adds up every value's actual size and divides by the count, so it is pulled toward whichever values are largest or smallest. The median only cares about a value's rank in the ordered list, ignoring how large or small it actually is once its position is fixed. If a data set has one or two extreme values sitting far from the rest — like one very high income in an otherwise ordinary group — the mean shifts a lot toward that extreme while the median barely moves, because ranks near the middle stay the same. When a data set is fairly symmetric, as in both examples above, the two end up close together.

Do I always have to rewrite the data in order before finding the median?

Yes, always. The median is defined by position after sorting, so there is no shortcut that skips the ordering step — picking the "middle" entry of the data exactly as it was given (say, the order marks were recorded in class) gives a meaningless number, since that order has nothing to do with size. Write the array first, ascending or descending (either works, since the middle position is the same either way), then apply the odd or even rule. This is the single most common place marks are lost in this topic.

Is the mode part of this Class 9 topic too?

No. The Class 9 ICSE Statistics chapter covers the arithmetic mean and the median of ungrouped data only. The mode, along with the mean of grouped data (and the direct, short-cut and step-deviation methods used to compute it), belongs to Class X. Keep this topic's scope to raw or arrayed lists of individual values — no frequency tables, no class intervals — and you are working within exactly what the syllabus asks for.

Before this

Where this leads