Mode of grouped data

Ask a shopkeeper which shoe size sells the most and you get a single number — the size that occurs most often. That number is the mode, the third of the three measures of central tendency alongside mean and median. For raw, ungrouped data the mode is easy to spot: just look for the value that repeats the most. But once data is bundled into class intervals — ages grouped in tens, marks grouped in bands of twenty — no single value repeats at all, because every entry inside a class has been merged into a range. You can no longer point at "the most common number." Instead, you first locate the modal class, the interval with the highest frequency, and then use an interpolation formula to estimate exactly where inside that class the true peak most likely sits. This article builds that formula from the ground up, applies it to a fully worked frequency table, and flags the mix-ups — modal class versus median class, boundary versus class mark, swapped neighbour frequencies — that cost ICSE students marks. By the end you should be able to pick out a modal class on sight and compute the mode of any equal-width grouped distribution with confidence.

The core insight

The mode of grouped data is found by identifying the modal class (the interval with the highest frequency) and interpolating within it using Mode=l+f1−f02f1−f0−f2×i\text{Mode} = l + \dfrac{f_1-f_0}{2f_1-f_0-f_2}\times i, which leans the estimate toward whichever neighbouring class is less crowded.

The core idea

Why grouping changes the problem. With raw data — say the list of ages 12,15,15,18,15,2012, 15, 15, 18, 15, 20 — the mode is simply the most repeated value, here 1515. Grouped data throws that method away: once you group ages into "10–20," "20–30," and so on, you know how many people fall in each band but not their individual ages, so no value can literally "repeat" anymore. The best you can do is find the band with the most people and then interpolate a single representative value inside it.

Step 1 — find the modal class. Scan the frequency column and pick the class interval with the single highest frequency. That interval, and only that interval, is the modal class — nothing else about it (its position in the table, its width, its class mark) matters for this choice.

Step 2 — interpolate inside it. Once the modal class is fixed, the exact mode is estimated with:

Mode=l+f1−f02f1−f0−f2×i\text{Mode} = l + \frac{f_1-f_0}{2f_1-f_0-f_2}\times i

where: ll is the lower boundary of the modal class, f1f_1 is the frequency of the modal class, f0f_0 is the frequency of the class immediately before the modal class, f2f_2 is the frequency of the class immediately after it, and ii is the class size (width), assumed equal across all intervals. The formula's job is to decide where inside the modal-class interval the true peak most likely lies, rather than just declaring the whole interval or its midpoint as "the mode." It does this by comparing two things: how much the frequency jumped going into the modal class (f1−f0f_1-f_0) against the combined rise-and-fall across both of its neighbours (2f1−f0−f22f_1-f_0-f_2). If the class before is much smaller than the class after (f0f_0 small, f2f_2 large), the numerator stays large relative to the denominator and the mode is pulled further from ll, toward the crowded neighbour — and vice versa. The graphical picture below shows the same idea as a geometric construction.

Figure
Histogram bars for five class intervals with the tallest bar as the modal class and diagonal lines from its top corners to the tops of the neighbouring bars crossing at the mode
Locating the mode inside the modal class modal class Mode l l+i frequency
Derivation AMode Formula from Histogram Geometry

Goal: show why interpolating with f1−f02f1−f0−f2×i\dfrac{f_1-f_0}{2f_1-f_0-f_2}\times i correctly locates the mode inside the modal-class bar of a histogram, using nothing beyond the geometry of two intersecting straight lines.

Step 1. Draw the histogram of the grouped frequency distribution and focus on the modal-class bar, whose top-left corner sits at height f0f_0 (matching the top of the preceding bar's shared side, extended) and whose top-right corner sits at a similarly matched height with f2f_2. Concretely, join the top-left corner of the modal-class bar to the top-right corner of the preceding bar with a straight line, and join the top-right corner of the modal-class bar to the top-left corner of the following bar with another straight line. These two diagonals cross at a single point inside the modal-class bar; call its horizontal distance from ll the value xx.

Step 2. Set up the two diagonal lines algebraically, measuring horizontal distance tt from ll (so tt runs from 00 to ii across the modal class). The first diagonal falls from height f1−f0f_1 - f_0 at t=0t=0 (the excess of the modal class over its predecessor) down to height 00 at t=it = i; its height at position tt is (f1−f0)(1−ti)(f_1-f_0)\left(1 - \dfrac{t}{i}\right). The second diagonal rises from height 00 at t=0t=0 to height f1−f2f_1-f_2 at t=it=i (the excess of the modal class over its successor); its height at tt is (f1−f2)ti(f_1-f_2)\dfrac{t}{i}.

Step 3. The intersection point is where these two heights are equal: (f1−f0)(1−ti)=(f1−f2)ti(f_1-f_0)\left(1-\dfrac{t}{i}\right) = (f_1-f_2)\dfrac{t}{i}. Expanding gives (f1−f0)−(f1−f0)ti=(f1−f2)ti(f_1-f_0) - (f_1-f_0)\dfrac{t}{i} = (f_1-f_2)\dfrac{t}{i}, so (f1−f0)=ti[(f1−f2)+(f1−f0)]=ti(2f1−f0−f2)(f_1-f_0) = \dfrac{t}{i}\left[(f_1-f_2)+(f_1-f_0)\right] = \dfrac{t}{i}\left(2f_1-f_0-f_2\right).

Step 4. Solve for tt: t=f1−f02f1−f0−f2×it = \dfrac{f_1-f_0}{2f_1-f_0-f_2}\times i. Since tt was measured as horizontal distance from ll, the actual mode is l+tl + t, which is exactly Mode=l+f1−f02f1−f0−f2×i\text{Mode} = l + \dfrac{f_1-f_0}{2f_1-f_0-f_2}\times i — the formula stated above, now justified by the geometry of the two intersecting diagonals rather than assumed.

Worked example

Find the mode of the following distribution of ages (in years) of 100 people.

Age (years)10–2020–3030–4040–5050–60
No. of people (ff)123034186

Step 1. Scan the frequency row for the highest value: 3434, occurring in the class 30–40. This is the modal class.

Step 2. Read off the values needed by the formula. l=30l = 30 (lower boundary of the modal class), f1=34f_1 = 34 (frequency of the modal class), f0=30f_0 = 30 (frequency of the preceding class, 20–30), f2=18f_2 = 18 (frequency of the following class, 40–50), and i=10i = 10 (common class width).

Step 3. Substitute into the formula and simplify the fraction first.

Mode=30+34−302(34)−30−18×10=30+468−48×10=30+420×10\text{Mode} = 30 + \frac{34-30}{2(34)-30-18}\times 10 = 30 + \frac{4}{68-48}\times 10 = 30 + \frac{4}{20}\times 10

Step 4. Complete the arithmetic: 420×10=2\dfrac{4}{20}\times 10 = 2, so the mode is 30+2=3230 + 2 = 32. The mode of this distribution is 32 years.

Competitive stretch

Suppose instead the modal class had been the last interval, 50–60, with no class beyond it. There is no f2f_2 to read off the table — but the correct move is not to leave it blank or skip the term. Treat the missing neighbour as having frequency 00, so f2=0f_2 = 0 in the formula, and proceed exactly as before. The same rule applies symmetrically if the modal class is the first interval: take f0=0f_0 = 0.

Common traps

  • Confusing the modal class with the median class. The modal class is chosen purely by highest frequency; the median class is chosen using cumulative frequency reaching N/2N/2. They are frequently different classes in the same table.
  • Using the class mark instead of the lower boundary ll. Just as with the median formula, ll is the lower limit of the modal class, not its midpoint — plugging in the class mark shifts the whole answer.
  • Swapping f0f_0 and f2f_2. f0f_0 is always the frequency of the class before the modal class; f2f_2 is always the frequency of the class after it. Reversing them changes both the sign pattern and the final value.
  • Leaving f0f_0 or f2f_2 undefined at the table's edge. If the modal class is the first or last interval, the missing neighbour is taken as frequency 00, never omitted from the formula.

Ask the tutor: if you're stuck deciding which frequency is f0f_0 and which is f2f_2, or want to practise a combined mean-median-mode problem on one data set, ask the AI tutor to walk through it with you.

How is the modal class different from the class with the highest class mark

The modal class has nothing to do with the size of the numbers in the interval — it is chosen only by which class has the largest frequency, that is, the most data points falling inside it. A class with a high class mark, like 90–100 in a marks distribution, could easily have very few students in it and would not be the modal class at all. Always scan the frequency column, not the interval labels, to find it.

Can the mode formula give an answer outside the modal class interval

It should not, if the data and the modal class are chosen correctly, because the fraction f1−f02f1−f0−f2\dfrac{f_1-f_0}{2f_1-f_0-f_2} always works out to lie between 0 and 1 when f1f_1 is genuinely the largest frequency and its neighbours are non-negative. If your calculated mode falls below ll or above l+il+i, re-check that you picked the correct modal class and did not swap f0f_0 and f2f_2.

Why do mean, median, and mode of the same data usually come out different

Each measure answers a different question: the mean balances all the values by total sum, the median splits the data exactly in half by position, and the mode picks out the single most frequent region. Unless the distribution is perfectly symmetric, these three questions have three different answers, which is exactly why ICSE problems often ask you to find and compare all three for one data set.

Before this

Where this leads