Visual walkthrough — Measures of central tendency — mean (grouped - ungrouped), median (grouped), mode (grouped)
Step 1 — The thing we are actually hunting
WHAT. The median is the value with half the data below it and half above. If I have people, I want to find where the middle person stands.
WHY. With ungrouped data I could just sort and point at the middle. But grouped data hides the individuals — I only know how many fall in each price/height/mark band, not their exact values. So "point at the middle person" needs a trick.
PICTURE. Imagine everyone lined up shortest to tallest. The median is the height of the person standing at the halfway mark of the line.

Step 2 — Slice the line into class-boxes
WHAT. Group data doesn't give us one long ordered line; it gives us boxes. Each box (class) is a stretch on the value-axis of width , holding people.
WHY. This is all the information we have. The box says "somewhere between value and value there are people" — but not where inside the box each one stands. That missing detail is exactly what we will have to assume later.
PICTURE. The same line, now chopped into labelled boxes sitting along the value-axis.

Step 3 — Build the running total (cumulative frequency)
WHAT. Walk the boxes left to right, keeping a running total of how many people you have passed. That running total is the cumulative frequency .
WHY. The running total is a position counter. When it first reaches , I have just walked past the middle person. Whatever box I am standing in at that moment is where the median lives.
PICTURE. Boxes with a rising staircase of cumulative counts on top. The dashed line marks .

Name the pieces of that box, and its predecessor:
Step 4 — How many more people until the middle?
WHAT. When I arrive at the left edge of the median box, my counter reads . I have not yet reached the middle. The number of people still needed is
WHY. counts everyone in the earlier boxes. The middle person sits at . The gap between them, , is how far into this box I must still walk.
PICTURE. Zoomed onto the median box: the left edge is where the counter reads ; a short red arrow of length points to the middle person still ahead inside the box.

Step 5 — The one assumption: spread the box evenly
WHAT. Inside the median box we don't know where each of the people stands. So we assume they are spaced evenly across the width .
WHY. This is the only honest guess when detail is missing — treat the crowd as uniform. It turns "which value?" into simple proportion. This assumption is exactly what makes the median formula a linear interpolation.
PICTURE. The median box with evenly spaced tick-people. Each person takes up a slice of width .

Step 6 — Walk in, and read off the value
WHAT. To reach the middle person I step past people, each occupying width . So I advance from the left edge .
WHY. Distance = (number of people) × (width each person owns). Add that distance to the starting value and you land exactly on the median value.
PICTURE. Left edge at ; a green advance arrow of the length above; the tip lands on the median value.

Step 7 — Edge and degenerate cases
WHAT. Check the corners so no scenario surprises you.
WHY. A formula you trust must survive its own extremes.
PICTURE. The median box shown three times: middle-person at the left door (a), at the right wall (b), and a fractional position for odd (c).

The one-picture summary
Everything above collapses into a single ogive-style picture: climb the staircase to height , drop down inside the median box, and read the value off the axis. That drop is the formula.

Recall Feynman retelling — say it back in plain words
Line everybody up short-to-tall and ask, "who's standing at the exact middle of the queue?" Grouped data won't tell me each person's spot — it only tells me how many are in each price-band box. So I walk the boxes left to right, tallying a running count. The moment my count crosses halfway, , I know the middle person is in this box. I check how many more people I needed after entering the box, . I don't know how they're arranged inside, so I fairly assume they're evenly spread — each owning a slice of width . I step past exactly the number I still needed, each step being one slice wide, and wherever I stop is the median value. Written down, that stroll is — start at the door , walk the fraction of the way in, scaled by the box width .
Recall Quick self-check
Why do we use and not for grouped data? ::: Grouped data is treated as a continuous crowd, so the halfway position is ; fractional positions are natural, no integer rounding needed. What does the numerator represent physically? ::: The number of people you still have to walk past after entering the median class before reaching the middle. If exactly, what is the median? ::: — the middle sits right at the left boundary of the median class.
Where this leads: the median's cousin, the skew of the distribution, tells you whether mean and median part ways; the spread tells you how tight the crowd is around this centre.