Skip to content
Worked Examples · Example 5.2

Q.Consider the previous data of height of students used in calculation of mean value. In order to compute the median, the first step is to sort data in ascending or descending order.

Tripura TbseTextbookSubjective· 2mImportance★★★★★est
15% · 3/20 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

The median is the middle value of sorted data — half the observations lie below it, half above. Sorting the nine heights gives 85, 90, 90, 100, 102, 110, 110, 110, 115; the middle (5th) value is 102 cm.

Why sorting is the first step

"Middle value" only makes sense once the data are in order. In the original list [90, 102, 110, 115, 85, 90, 100, 110, 110] the physically-middle element is 85 — the smallest value, not the centre of the data at all. So the procedure is always: sort first, then pick the middle.

Step-by-step

StepWorking
1. Sort ascending85, 90, 90, 100, 102, 110, 110, 110, 115
2. Countn = 9 (odd)
3. Middle position(n + 1) / 2 = (9 + 1) / 2 = 5th value
4. Read it off5th value = 102

Median = 102 cm. Exactly four heights lie below it (85, 90, 90, 100) and four above (110, 110, 110, 115).

If n were even, there would be two middle values, and the median would be their mean — e.g. for 8 values, the average of the 4th and 5th.

In Python

import statistics

heights = [90, 102, 110, 115, 85, 90, 100, 110, 110]
print(sorted(heights))               # step 1: the ordered data
print(statistics.median(heights))    # sorts internally, picks the middle
[85, 90, 90, 100, 102, 110, 110, 110, 115]
102
``` …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.