Statistics • Topic 1 of 3

Mean, Median, Mode of Grouped Data — Bimodal Excluded

What are mean, median, and mode for grouped data? When data is organized into frequency distributions (class intervals with frequencies), we use special formulas to find the three measures of central tendency. Each measure answers a different question: the mean is the arithmetic balance point, the median is the middle value once the data is ordered, and the mode is the value that occurs most often. For grouped data we never see the individual observations, so each formula works with the class marks (midpoints) and the frequencies instead.

The class mark of an interval is its midpoint: $x_i = \dfrac{\text{lower limit} + \text{upper limit}}{2}$. Every method below treats all the observations of a class as if they were concentrated at this midpoint, which is why the answers are good estimates rather than exact values.

1. Mean of grouped data — three methods

All three methods give the same mean; they differ only in how much arithmetic you do. Let $f_i$ be the frequency of the $i$-th class and $x_i$ its class mark.

(a) Direct method. $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}$. Multiply each class mark by its frequency, add up the products, and divide by the total frequency $\sum f_i = N$. Use this when the class marks are small, friendly numbers.

(b) Assumed-mean (deviation) method. Choose a convenient class mark as the assumed mean $a$ (usually one near the middle, often the modal class mark). Form the deviations $d_i = x_i - a$. Then $\bar{x}=a+\dfrac{\sum f_i d_i}{\sum f_i}$. Here $a$ shifts the origin so the numbers you multiply are smaller — the $\sum f_i d_i$ term is just a correction added back to $a$. Use this when class marks are large but the class width is irregular.

(c) Step-deviation method. When all classes have the same width $h$, set $u_i=\dfrac{x_i-a}{h}$ so the $u_i$ become small whole numbers like $-2,-1,0,1,2$. Then $\bar{x}=a+h\cdot\dfrac{\sum f_i u_i}{\sum f_i}$. This is the fastest method and the one CBSE generally rewards in exams — the multiplication by $h$ at the very end restores the scale. Symbols: $a$ = assumed mean, $h$ = common class width, $u_i$ = step deviation, $N=\sum f_i$.

Class$f_i$$x_i$$f_i x_i$$d_i=x_i-25$$f_i d_i$$u_i=\dfrac{x_i-25}{10}$$f_i u_i$
0–102510-20-40-2-4
10–2051575-10-50-1-5
20–308252000000
30–40435140104014
40–5014545202022
Total20470-30-3

Reading the table all three ways with $a=25$, $h=10$: direct gives $\bar{x}=\dfrac{470}{20}=23.5$; assumed-mean gives $\bar{x}=25+\dfrac{-30}{20}=25-1.5=23.5$; step-deviation gives $\bar{x}=25+10\cdot\dfrac{-3}{20}=25-1.5=23.5$. They agree — that is your built-in check.

Missing-frequency problems. When the mean is given and one frequency $f$ is unknown, write $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}$ with $f$ as a variable, substitute the given mean, and solve the resulting linear equation for $f$. Keep the unknown frequency symbolic in both the numerator and the denominator — forgetting it in $\sum f_i$ is the most common slip.

2. Mode of grouped data

The modal class is the class with the highest frequency. The mode itself is then located inside that class by $\text{Mode}=l+\left(\dfrac{f_1-f_0}{2f_1-f_0-f_2}\right)h$, where $l$ = lower limit of the modal class, $f_1$ = frequency of the modal class, $f_0$ = frequency of the class just before it, $f_2$ = frequency of the class just after it, and $h$ = class width. The fraction measures how far the modal class "leans" toward its busier neighbour. A common mistake is mixing up $f_0$ and $f_2$ — always read them in the order before, modal, after.

3. Median of grouped data

Build a cumulative frequency column first. The median class is the first class whose cumulative frequency is $\ge \dfrac{N}{2}$. Then $\text{Median}=l+\left(\dfrac{\frac{N}{2}-cf}{f}\right)h$, where $l$ = lower limit of the median class, $N$ = total frequency, $cf$ = cumulative frequency of the class before the median class, $f$ = frequency of the median class, and $h$ = class width. Note that we use $\frac{N}{2}$ (not the $\frac{N+1}{2}$ of ungrouped data) because grouped data is treated as continuous.

When to use which? Use the mean when every value matters and there are no extreme outliers; it is the only measure that uses all the data. Use the median when the distribution is skewed or has outliers (incomes, for instance) because it is unaffected by extreme values. Use the mode when you need the most typical/popular value (shoe sizes, most-frequent marks).

Empirical relationship. For a moderately skewed distribution the three measures are tied together by $3\,\text{Median}=\text{Mode}+2\,\text{Mean}$, equivalently $\text{Mode}=3\,\text{Median}-2\,\text{Mean}$. This lets you find any one of the three if the other two are known — and it is a quick sanity check on a full calculation.

Histogram of grouped frequencies with the mean formula for grouped dataMean of grouped data — histogram (f vs class)Frequency f24682584101020304050class mark x: 5, 15, 25, 35, 45 → mean = Σf·x / Σf = 470 / 20 = 23.5Histogram highlighting the modal class with the cross-construction lines locating the modeMode — cross construction in the modal classmodal class 20–3002030Mode ≈ 24.3
1
Worked Example
Find the mean for the following data using the direct method: | Class | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | |-------|------|-------|-------|-------|-------| | Frequency | 3 | 5 | 7 | 4 | 1 |
Solution
  1. Step 1: Class marks $x_i$: $5,15,25,35,45$.
  2. Step 2: $f_ix_i$: $3\times5=15$, $5\times15=75$, $7\times25=175$, $4\times35=140$, $1\times45=45$.
  3. Step 3: $\sum f_i = 3+5+7+4+1 = 20$.
  4. Step 4: $\sum f_ix_i = 15+75+175+140+45 = 450$.
  5. Step 5: $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}=\dfrac{450}{20}=22.5$.

Answer: Mean $=22.5$.

2
Worked Example
Find the median for the data in Example 1.
Solution
  1. Step 1: $N=20$, so $\dfrac{N}{2}=10$.
  2. Step 2: Cumulative frequencies: $3,8,15,19,20$.
  3. Step 3: First $cf\ge10$ is $15$, so the median class is $20$–$30$.
  4. Step 4: $l=20$, $cf=8$, $f=7$, $h=10$.
  5. Step 5: $\text{Median}=l+\left(\dfrac{\frac{N}{2}-cf}{f}\right)h=20+\left(\dfrac{10-8}{7}\right)10=20+\dfrac{20}{7}=22.86$.

Answer: Median $\approx 22.86$.

3
Worked Example
Find the mode for the data in Example 1.
Solution
  1. Step 1: Highest frequency is $7$, so the modal class is $20$–$30$.
  2. Step 2: $l=20$, $f_1=7$, $f_0=5$, $f_2=4$, $h=10$.
  3. Step 3: $\text{Mode}=l+\left(\dfrac{f_1-f_0}{2f_1-f_0-f_2}\right)h=20+\left(\dfrac{7-5}{14-5-4}\right)10$.
  4. Step 4: $=20+\left(\dfrac{2}{5}\right)10=20+4=24$.

Answer: Mode $=24$.

4
Worked Example
Find the mean using the assumed-mean method with $a=25$: | Class | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | |-------|------|-------|-------|-------|-------| | Frequency | 4 | 6 | 10 | 8 | 2 |
Solution
  1. Step 1: Class marks $x_i$: $5,15,25,35,45$; take $a=25$.
  2. Step 2: Deviations $d_i=x_i-a$: $-20,-10,0,10,20$.
  3. Step 3: $f_id_i$: $4(-20)=-80$, $6(-10)=-60$, $10(0)=0$, $8(10)=80$, $2(20)=40$.
  4. Step 4: $\sum f_i=30$ and $\sum f_id_i=-80-60+0+80+40=-20$.
  5. Step 5: $\bar{x}=a+\dfrac{\sum f_i d_i}{\sum f_i}=25+\dfrac{-20}{30}=25-0.67=24.33$.

Answer: Mean $\approx 24.33$.

5
Worked Example
Find the mean of the data in Example 4 using the step-deviation method with $a=25$, $h=10$, and verify it matches Example 4.
Solution
  1. Step 1: $u_i=\dfrac{x_i-a}{h}=\dfrac{x_i-25}{10}$: $-2,-1,0,1,2$.
  2. Step 2: $f_iu_i$: $4(-2)=-8$, $6(-1)=-6$, $10(0)=0$, $8(1)=8$, $2(2)=4$.
  3. Step 3: $\sum f_iu_i=-8-6+0+8+4=-2$ and $\sum f_i=30$.
  4. Step 4: $\bar{x}=a+h\cdot\dfrac{\sum f_i u_i}{\sum f_i}=25+10\cdot\dfrac{-2}{30}=25-0.67=24.33$.
  5. Step 5: This equals the $24.33$ found in Example 4 — the methods agree.

Answer: Mean $\approx 24.33$ (same as the assumed-mean answer).

6
Worked Example
The daily wages (in ₹) of 50 workers are tabulated below. Find the mean daily wage using the step-deviation method. | Wages (₹) | 100-120 | 120-140 | 140-160 | 160-180 | 180-200 | |-------|------|------|------|------|------| | Workers | 12 | 14 | 8 | 6 | 10 |
Solution
  1. Step 1: Class marks: $110,130,150,170,190$. Take $a=150$, $h=20$.
  2. Step 2: $u_i=\dfrac{x_i-150}{20}$: $-2,-1,0,1,2$.
  3. Step 3: $f_iu_i$: $12(-2)=-24$, $14(-1)=-14$, $8(0)=0$, $6(1)=6$, $10(2)=20$.
  4. Step 4: $\sum f_i=50$, $\sum f_iu_i=-24-14+0+6+20=-12$.
  5. Step 5: $\bar{x}=150+20\cdot\dfrac{-12}{50}=150-4.8=145.2$.

Answer: Mean daily wage $=$ ₹$145.20$.

7
Worked Example
The mean of the following distribution is $23$. Find the missing frequency $p$. | Class | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | |-------|------|-------|-------|-------|-------| | Frequency | 5 | 8 | p | 4 | 3 |
Solution
  1. Step 1: Class marks: $5,15,25,35,45$.
  2. Step 2: Keep the unknown in the total: $\sum f_i=5+8+p+4+3=20+p$.
  3. Step 3: Keep it in the products too: $\sum f_ix_i=5(5)+8(15)+p(25)+4(35)+3(45)=25+120+25p+140+135=420+25p$.
  4. Step 4: Apply $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}$: $\dfrac{420+25p}{20+p}=23$.
  5. Step 5: Cross-multiply: $420+25p=23(20+p)=460+23p\Rightarrow 2p=40\Rightarrow p=20$.

Answer: Missing frequency $p=20$.

8
Worked Example
The marks of 30 students are given. Find the modal marks. | Marks | 0-20 | 20-40 | 40-60 | 60-80 | 80-100 | |-------|------|------|------|------|------| | Students | 4 | 6 | 10 | 7 | 3 |
Solution
  1. Step 1: Highest frequency $=10$, so modal class is $40$–$60$.
  2. Step 2: $l=40$, $f_1=10$, $f_0=6$, $f_2=7$, $h=20$.
  3. Step 3: $\text{Mode}=40+\left(\dfrac{10-6}{2(10)-6-7}\right)20=40+\left(\dfrac{4}{20-13}\right)20$.
  4. Step 4: $=40+\dfrac{4}{7}\times20=40+11.43=51.43$.

Answer: Mode $\approx 51.43$ marks.

9
Worked Example
Find the median of the distribution in Example 8.
Solution
  1. Step 1: $N=30$, $\dfrac{N}{2}=15$.
  2. Step 2: Cumulative frequencies: $4,10,20,27,30$.
  3. Step 3: First $cf\ge15$ is $20$, so median class is $40$–$60$.
  4. Step 4: $l=40$, $cf=10$, $f=10$, $h=20$.
  5. Step 5: $\text{Median}=40+\left(\dfrac{15-10}{10}\right)20=40+\dfrac{5}{10}\times20=40+10=50$.

Answer: Median $=50$ marks.

10
Worked Example
For the data of Examples 8–9, the mean works out to $50.67$, the median is $50$ and the mode is $51.43$. Verify the empirical relationship $3\,\text{Median}=\text{Mode}+2\,\text{Mean}$.
Solution
  1. Step 1: Left side: $3\,\text{Median}=3\times50=150$.
  2. Step 2: Right side: $\text{Mode}+2\,\text{Mean}=51.43+2\times50.67=51.43+101.34=152.77$.
  3. Step 3: The two sides agree to within rounding ($150\approx152.8$), which is expected for an empirical (approximate) relation on real data.
  4. Step 4: Rearranged, the relation also reads $\text{Mode}=3\,\text{Median}-2\,\text{Mean}=150-101.34=48.66\approx$ the computed $51.43$.

Answer: The empirical relation $3\,\text{Median}=\text{Mode}+2\,\text{Mean}$ holds approximately, as expected.

11
Worked Example
A survey records the number of plants in 20 houses. Find the mean number of plants per house. | Plants | 0-2 | 2-4 | 4-6 | 6-8 | 8-10 | 10-12 | 12-14 | |-------|------|------|------|------|------|------|------| | Houses | 1 | 2 | 1 | 5 | 6 | 2 | 3 |
Solution
  1. Step 1: Class marks: $1,3,5,7,9,11,13$.
  2. Step 2: $f_ix_i$: $1(1)=1$, $2(3)=6$, $1(5)=5$, $5(7)=35$, $6(9)=54$, $2(11)=22$, $3(13)=39$.
  3. Step 3: $\sum f_i=1+2+1+5+6+2+3=20$.
  4. Step 4: $\sum f_ix_i=1+6+5+35+54+22+39=162$.
  5. Step 5: $\bar{x}=\dfrac{162}{20}=8.1$ (direct method preferred here since class marks are small).

Answer: Mean $=8.1$ plants per house.

12
Worked Example
The median of the following data is $28.5$ and $N=60$. Find the missing frequencies $x$ and $y$. | Class | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | 50-60 | |-------|------|------|------|------|------|------| | Frequency | 5 | x | 20 | 15 | y | 5 |
Solution
  1. Step 1: Total frequency: $5+x+20+15+y+5=60\Rightarrow x+y=15$. (Equation 1)
  2. Step 2: Median $=28.5$ lies in $20$–$30$, so that is the median class; $l=20$, $f=20$, $h=10$, $\dfrac{N}{2}=30$.
  3. Step 3: $cf$ before the median class $=5+x$.
  4. Step 4: $\text{Median}=l+\left(\dfrac{\frac{N}{2}-cf}{f}\right)h\Rightarrow 28.5=20+\left(\dfrac{30-(5+x)}{20}\right)10$.
  5. Step 5: $8.5=\dfrac{25-x}{2}\Rightarrow 17=25-x\Rightarrow x=8$. From Equation 1, $y=15-8=7$.

Answer: $x=8$ and $y=7$.

Key Points

  • Mean = Σfᵢxᵢ / Σfᵢ (xᵢ = class midpoint)
  • Median uses cumulative frequency: Median = L + [(N/2 − cf)/f] × h
  • Mode uses frequencies of modal and adjacent classes: Mode = L + [(\(f_{1}-f_{0}\))/(\(2f_{1}-f_{0}-f_{2}\))] × h
  • Modal class = class with highest frequency
  • Median class = class where cumulative frequency first exceeds N/2
  • Empirical relation: Mode ≈ 3 Median − 2 Mean (not exact but useful for checking)
  • Three mean methods give the same answer: direct $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}$, assumed-mean $\bar{x}=a+\dfrac{\sum f_i d_i}{\sum f_i}$, step-deviation $\bar{x}=a+h\cdot\dfrac{\sum f_i u_i}{\sum f_i}$
  • Step-deviation needs equal class widths $h$; it is fastest and CBSE-preferred
  • Missing frequency: keep the unknown in BOTH numerator $\sum f_i x_i$ and denominator $\sum f_i$, then solve the linear equation
  • Use mean when no outliers, median when skewed/outliers, mode for the most typical value
Tap an option to check your answer0 / 4
Q1.The mean of grouped data is:
Explanation: Weighted average.
Q2.The empirical relation is:
Explanation: $\text{Mode}=3\,\text{Median}-2\,\text{Mean}$.
Q3.The class with the highest frequency is the:
Explanation: Modal class.
Q4.The mid-value of a class is the:
Explanation: Class mark $=$ midpoint.