Example 1
Question: The ages (in years) of 80 patients admitted to a hospital in a month were recorded. The frequency distribution is given below:
Age (in years): 10–20, 20–30, 30–40, 40–50, 50–60, 60–70
Number of patients: 6, 11, 21, 23, 14, 5
Find the mean age, median age, and modal age of the patients.
Solution: We have the following data:
Class: 10–20, Frequency (f): 6, Midpoint (x): 15
Class: 20–30, Frequency (f): 11, Midpoint (x): 25
Class: 30–40, Frequency (f): 21, Midpoint (x): 35
Class: 40–50, Frequency (f): 23, Midpoint (x): 45
Class: 50–60, Frequency (f): 14, Midpoint (x): 55
Class: 60–70, Frequency (f): 5, Midpoint (x): 65
Total: \(n = \sum f_i = 80\)
Step 1 — MEAN (Step-deviation method)
Let assumed mean \(a = 45\), class width \(h = 10\).
Compute \(u_i = \frac{x_i - 45}{10}\): \(u_1 = \frac{15-45}{10} = -3\), so \(f_1 u_1 = 6 \times (-3) = -18\) \(u_2 = \frac{25-45}{10} = -2\), so \(f_2 u_2 = 11 \times (-2) = -22\) \(u_3 = \frac{35-45}{10} = -1\), so \(f_3 u_3 = 21 \times (-1) = -21\) \(u_4 = \frac{45-45}{10} = 0\), so \(f_4 u_4 = 23 \times 0 = 0\) \(u_5 = \frac{55-45}{10} = 1\), so \(f_5 u_5 = 14 \times 1 = 14\) \(u_6 = \frac{65-45}{10} = 2\), so \(f_6 u_6 = 5 \times 2 = 10\)
Now, \(\sum f_i u_i = -18 + (-22) + (-21) + 0 + 14 + 10 = -37\)
Mean: \[ \bar{x} = 45 + \frac{-37}{80} \times 10 = 45 - 4.625 = 40.375 \text{ years} \]
Step 2 — MEDIAN
Cumulative frequencies (cf):
Up to 20: 6
Up to 30: 6+11 = 17
Up to 40: 17+21 = 38
Up to 50: 38+23 = 61
Up to 60: 61+14 = 75
Up to 70: 75+5 = 80
We need \(\frac{n}{2} = \frac{80}{2} = 40\).
The cumulative frequency just exceeding 40 is 61 (class 40–50). So the median class is 40–50.
Here \(l = 40\), \(cf = 38\) (cf before median class), \(f = 23\), \(h = 10\). \[ M = 40 + \left(\frac{40 - 38}{23}\right) \times 10 = 40 + \frac{20}{23} \approx 40 + 0.87 = 40.87 \text{ years} \]
Step 3 — MODE
The class with the highest frequency is 40–50 (frequency = 23). So the modal class is 40–50.
Here \(l = 40\), \(f_1 = 23\), \(f_0 = 21\) (preceding class freq), \(f_2 = 14\) (succeeding class freq), \(h = 10\). \[ Z = 40 + \left(\frac{23 - 21}{2(23) - 21 - 14}\right) \times 10 = 40 + \left(\frac{2}{46 - 35}\right) \times 10 \] \[ Z = 40 + \frac{2}{11} \times 10 = 40 + 1.82 \approx 41.82 \text{ years} \]
Answer: Mean age \(\approx 40.38\) years, Median age \(\approx 40.87\) years, Modal age \(\approx 41.82\) years
Example 2
Question: A survey of 60 students in a school recorded the number of hours spent on self-study per week. The distribution is as follows:
Hours: 0–5, 5–10, 10–15, 15–20, 20–25, 25–30
Number of students: 4, 8, 15, 20, 9, 4
Find the mean, median, and mode of hours spent on self-study.
Solution: We have:
Class: 0–5, f: 4, midpoint x: 2.5
Class: 5–10, f: 8, midpoint x: 7.5
Class: 10–15, f: 15, midpoint x: 12.5
Class: 15–20, f: 20, midpoint x: 17.5
Class: 20–25, f: 9, midpoint x: 22.5
Class: 25–30, f: 4, midpoint x: 27.5
Total: \(n = 4+8+15+20+9+4 = 60\)
Step 1 — MEAN (Step-deviation method)
Let assumed mean \(a = 17.5\), class width \(h = 5\).
Compute \(u_i = \frac{x_i - 17.5}{5}\): \(u_1 = \frac{2.5-17.5}{5} = -3\), \(f_1 u_1 = 4 \times (-3) = -12\) \(u_2 = \frac{7.5-17.5}{5} = -2\), \(f_2 u_2 = 8 \times (-2) = -16\) \(u_3 = \frac{12.5-17.5}{5} = -1\), \(f_3 u_3 = 15 \times (-1) = -15\) \(u_4 = \frac{17.5-17.5}{5} = 0\), \(f_4 u_4 = 20 \times 0 = 0\) \(u_5 = \frac{22.5-17.5}{5} = 1\), \(f_5 u_5 = 9 \times 1 = 9\) \(u_6 = \frac{27.5-17.5}{5} = 2\), \(f_6 u_6 = 4 \times 2 = 8\)
Now, \(\sum f_i u_i = -12 + (-16) + (-15) + 0 + 9 + 8 = -26\)
Mean: \[ \bar{x} = 17.5 + \frac{-26}{60} \times 5 = 17.5 - \frac{130}{60} = 17.5 - 2.17 \approx 15.33 \text{ hours} \]
Step 2 — MEDIAN
Cumulative frequencies:
Up to 5: 4
Up to 10: 4+8 = 12
Up to 15: 12+15 = 27
Up to 20: 27+20 = 47
Up to 25: 47+9 = 56
Up to 30: 56+4 = 60
We need \(\frac{n}{2} = \frac{60}{2} = 30\).
The cumulative frequency just exceeding 30 is 47 (class 15–20). So the median class is 15–20.
Here \(l = 15\), \(cf = 27\), \(f = 20\), \(h = 5\). \[ M = 15 + \left(\frac{30 - 27}{20}\right) \times 5 = 15 + \frac{15}{20} = 15 + 0.75 = 15.75 \text{ hours} \]
Step 3 — MODE
The class with the highest frequency is 15–20 (frequency = 20). So the modal class is 15–20.
Here \(l = 15\), \(f_1 = 20\), \(f_0 = 15\) (preceding class freq), \(f_2 = 9\) (succeeding class freq), \(h = 5\). \[ Z = 15 + \left(\frac{20 - 15}{2(20) - 15 - 9}\right) \times 5 = 15 + \left(\frac{5}{40 - 24}\right) \times 5 \] \[ Z = 15 + \frac{5}{16} \times 5 = 15 + \frac{25}{16} = 15 + 1.5625 \approx 16.56 \text{ hours} \]
Answer: Mean \(\approx 15.33\) hours, Median \(= 15.75\) hours, Mode \(\approx 16.56\) hours