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$.
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.
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- Step 1: Class marks $x_i$: $5,15,25,35,45$.
- Step 2: $f_ix_i$: $3\times5=15$, $5\times15=75$, $7\times25=175$, $4\times35=140$, $1\times45=45$.
- Step 3: $\sum f_i = 3+5+7+4+1 = 20$.
- Step 4: $\sum f_ix_i = 15+75+175+140+45 = 450$.
- Step 5: $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}=\dfrac{450}{20}=22.5$.
Answer: Mean $=22.5$.
Find the median for the data in Example 1.
Solution- Step 1: $N=20$, so $\dfrac{N}{2}=10$.
- Step 2: Cumulative frequencies: $3,8,15,19,20$.
- Step 3: First $cf\ge10$ is $15$, so the median class is $20$–$30$.
- Step 4: $l=20$, $cf=8$, $f=7$, $h=10$.
- 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$.
Find the mode for the data in Example 1.
Solution- Step 1: Highest frequency is $7$, so the modal class is $20$–$30$.
- Step 2: $l=20$, $f_1=7$, $f_0=5$, $f_2=4$, $h=10$.
- 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$.
- Step 4: $=20+\left(\dfrac{2}{5}\right)10=20+4=24$.
Answer: Mode $=24$.
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- Step 1: Class marks $x_i$: $5,15,25,35,45$; take $a=25$.
- Step 2: Deviations $d_i=x_i-a$: $-20,-10,0,10,20$.
- Step 3: $f_id_i$: $4(-20)=-80$, $6(-10)=-60$, $10(0)=0$, $8(10)=80$, $2(20)=40$.
- Step 4: $\sum f_i=30$ and $\sum f_id_i=-80-60+0+80+40=-20$.
- 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$.
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- Step 1: $u_i=\dfrac{x_i-a}{h}=\dfrac{x_i-25}{10}$: $-2,-1,0,1,2$.
- Step 2: $f_iu_i$: $4(-2)=-8$, $6(-1)=-6$, $10(0)=0$, $8(1)=8$, $2(2)=4$.
- Step 3: $\sum f_iu_i=-8-6+0+8+4=-2$ and $\sum f_i=30$.
- 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$.
- 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).
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- Step 1: Class marks: $110,130,150,170,190$. Take $a=150$, $h=20$.
- Step 2: $u_i=\dfrac{x_i-150}{20}$: $-2,-1,0,1,2$.
- Step 3: $f_iu_i$: $12(-2)=-24$, $14(-1)=-14$, $8(0)=0$, $6(1)=6$, $10(2)=20$.
- Step 4: $\sum f_i=50$, $\sum f_iu_i=-24-14+0+6+20=-12$.
- Step 5: $\bar{x}=150+20\cdot\dfrac{-12}{50}=150-4.8=145.2$.
Answer: Mean daily wage $=$ ₹$145.20$.
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- Step 1: Class marks: $5,15,25,35,45$.
- Step 2: Keep the unknown in the total: $\sum f_i=5+8+p+4+3=20+p$.
- 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$.
- Step 4: Apply $\bar{x}=\dfrac{\sum f_i x_i}{\sum f_i}$: $\dfrac{420+25p}{20+p}=23$.
- Step 5: Cross-multiply: $420+25p=23(20+p)=460+23p\Rightarrow 2p=40\Rightarrow p=20$.
Answer: Missing frequency $p=20$.
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- Step 1: Highest frequency $=10$, so modal class is $40$–$60$.
- Step 2: $l=40$, $f_1=10$, $f_0=6$, $f_2=7$, $h=20$.
- Step 3: $\text{Mode}=40+\left(\dfrac{10-6}{2(10)-6-7}\right)20=40+\left(\dfrac{4}{20-13}\right)20$.
- Step 4: $=40+\dfrac{4}{7}\times20=40+11.43=51.43$.
Answer: Mode $\approx 51.43$ marks.
Find the median of the distribution in Example 8.
Solution- Step 1: $N=30$, $\dfrac{N}{2}=15$.
- Step 2: Cumulative frequencies: $4,10,20,27,30$.
- Step 3: First $cf\ge15$ is $20$, so median class is $40$–$60$.
- Step 4: $l=40$, $cf=10$, $f=10$, $h=20$.
- Step 5: $\text{Median}=40+\left(\dfrac{15-10}{10}\right)20=40+\dfrac{5}{10}\times20=40+10=50$.
Answer: Median $=50$ marks.
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- Step 1: Left side: $3\,\text{Median}=3\times50=150$.
- Step 2: Right side: $\text{Mode}+2\,\text{Mean}=51.43+2\times50.67=51.43+101.34=152.77$.
- Step 3: The two sides agree to within rounding ($150\approx152.8$), which is expected for an empirical (approximate) relation on real data.
- 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.
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- Step 1: Class marks: $1,3,5,7,9,11,13$.
- 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$.
- Step 3: $\sum f_i=1+2+1+5+6+2+3=20$.
- Step 4: $\sum f_ix_i=1+6+5+35+54+22+39=162$.
- 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.
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- Step 1: Total frequency: $5+x+20+15+y+5=60\Rightarrow x+y=15$. (Equation 1)
- 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$.
- Step 3: $cf$ before the median class $=5+x$.
- 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$.
- 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$.