Grouped data and bar graphs

Ask forty students their weight, or record a month of daily temperatures, and you get a pile of numbers with no shape — just raw data, one value after another. Nobody can read a story out of forty unsorted numbers at a glance. The fix is to sort the values into equal-sized bins called class intervals, count how many fall into each bin, and lay the counts out as a grouped frequency distribution table. Once the counting is done, the table draws itself as a bar graph: one rectangle per interval, height set by frequency, so the eye can instantly spot which range of values is most common. This article builds that pipeline — from raw numbers to a labelled, readable graph — and shows exactly where students lose marks along the way.

The core insight

Grouping raw data into equal-width class intervals and counting the frequency of each turns an unreadable list of numbers into a table you can read at a glance, and a bar graph turns that table into a picture, with class size fixed by upper limit minus lower limit and bar height set equal to frequency.

The core idea

Raw data is data exactly as collected — unsorted, unsummarised, hard to interpret directly. The marks of 30 students, listed in the order the answer sheets were checked, are raw data. The first job in data handling is to organise this pile into something a reader can scan in five seconds.

Class intervals do that job. You divide the full spread of values into equal-sized ranges, such as 0–100\text{–}10, 10–2010\text{–}20, 20–3020\text{–}30, and slot every data value into exactly one range. Each interval has a lower limit and an upper limit; their difference is the class size:

Class size=Upper limit−Lower limit\text{Class size} = \text{Upper limit} - \text{Lower limit}

where: the class size is the width of each bin, and at this level every bin in a table is kept the same width, so one number describes the whole table. By the exclusive convention used in ICSE Class 8, an interval like 20–3020\text{–}30 takes every value from 2020 up to but not including 3030; a value of exactly 3030 belongs to the next bin, 30–4030\text{–}40. Fixing this rule before you tally is what stops a boundary value from being counted twice — or missed altogether. For each interval, count how many raw values fall inside it (a tally-mark column keeps this honest); that count is the frequency of the interval. Listing frequencies against every class interval gives the grouped frequency distribution table — the organised version of the same raw data. A bar graph then draws that table. Every category or class interval becomes a rectangular bar of the same width; the height of a bar is proportional to its frequency, bars sit with equal gaps between them, and both axes carry a label and a scale starting at zero.

Figure
A bar graph with seven bars of equal width and equal gaps rising and falling across class intervals of marks, the tallest bar in the middle interval showing the most frequent range of scores
Bar graph of marks — bar height equals frequency class interval (marks) frequency 0 1 2 3 4 30-40 40-50 50-60 60-70 70-80 80-90 90-100

How many class intervals do you need

The goal of this derivation is to turn two raw facts about a data set — its lowest and highest values, and the class size you choose to work with — into the number of class intervals your table must contain, without missing the highest value or leaving an interval empty of purpose.

Step 1. Find the range of the raw data: Range=Maximum value−Minimum value\text{Range} = \text{Maximum value} - \text{Minimum value}. This is the total spread that every class interval together must cover, with no gaps and no overlap.

Step 2. Choose a class size cc — usually a round number like 55, 1010 or 2020, chosen so the table has a manageable number of rows (roughly 55 to 1010 intervals is the usual target for a school-level table).

Step 3. Divide the range by the class size to get the number of intervals needed: n=Rangecn = \dfrac{\text{Range}}{c}. If this division is not exact, round up to the next whole number, because a partial interval still needs a full bin to hold its values — you cannot cover the highest value with less than a whole interval.

Step 4. Starting from a convenient value at or just below the minimum, mark off nn intervals of width cc each. Check that the last interval's upper limit is strictly greater than the maximum data value — if it is not, add one more interval. This guarantees every single data value, including the extremes, has exactly one interval to belong to.

Worked example

The marks (out of 100) obtained by 20 students in a test are:

52, 68, 74, 45, 81, 39, 62, 58, 90, 71, 48, 55, 66, 77, 83, 60, 42, 95, 50, 6452,\ 68,\ 74,\ 45,\ 81,\ 39,\ 62,\ 58,\ 90,\ 71,\ 48,\ 55,\ 66,\ 77,\ 83,\ 60,\ 42,\ 95,\ 50,\ 64

Group this data into class intervals of size 10, starting from 30, draw the frequency table, and state how many intervals are needed.

Step 1. Find the range: minimum =39= 39, maximum =95= 95, so Range=95−39=56\text{Range} = 95 - 39 = 56. With class size c=10c = 10, the derivation above gives n=56/10=5.6n = 56/10 = 5.6, rounded up to 66 intervals — but since we must also start cleanly at 3030 (below the minimum), the working table uses 77 intervals from 3030 to 100100 to keep round numbers: 30–40,40–50,50–60,60–70,70–80,80–90,90–10030\text{–}40, 40\text{–}50, 50\text{–}60, 60\text{–}70, 70\text{–}80, 80\text{–}90, 90\text{–}100.

Step 2. Tally each value using the exclusive convention (a value equal to an interval's upper limit goes to the next class): 3939 is in 30–4030\text{–}40; 45,48,4245, 48, 42 are in 40–5040\text{–}50; 52,58,55,5052, 58, 55, 50 are in 50–6050\text{–}60; 68,62,66,64,6068, 62, 66, 64, 60 are in 60–7060\text{–}70; 74,71,7774, 71, 77 are in 70–8070\text{–}80; 81,8381, 83 are in 80–9080\text{–}90; 90,9590, 95 are in 90–10090\text{–}100.

Class intervalFrequency
30–401
40–503
50–604
60–705
70–803
80–902
90–1002

Step 3. Verify the total: 1+3+4+5+3+2+2=201+3+4+5+3+2+2 = 20, matching the 20 students exactly. This check is the single most reliable way to catch a mistallied value before the table is used to draw anything.

Step 4. Draw the bar graph: class intervals along the horizontal axis, frequency on the vertical axis (scale: 1 unit = 1 student), one bar per interval, all bars the same width with equal gaps. The tallest bar, height 5, sits over 60–70 — the most common scoring range in this test.

Common traps

  • Boundary confusion — forgetting which interval a value like exactly 50 belongs to; fix one convention (lower limit stays, upper limit moves to the next class) and apply it every time.
  • Unequal bar widths in the bar graph, which visually exaggerates or hides differences — every bar must be the same width, with frequency shown only through height.
  • Skipping the frequency-total check — always add the frequency column and confirm it equals the total number of observations before trusting the table.
  • Starting the frequency axis above zero or leaving gaps uneven, both of which make bar heights misleading to read at a glance.

Ask the tutor: if you are stuck choosing class intervals for your own raw data set, or want your bar graph checked for equal widths and correct labels, ask the AI tutor to walk through it with you step by step.

Why must all class intervals be the same width

Equal width keeps the comparison between bars fair. If one interval were 10 marks wide and another 20 marks wide, a taller bar might just mean it swept up a wider range of values, not that scores were genuinely more common there. Keeping every class size identical means the only thing changing from bar to bar is the count of values, so bar height becomes a true, comparable measure of frequency.

What happens if a data value is smaller than the first class interval's lower limit

It means the class intervals were not chosen to cover the actual range of the data, and the table needs to be redone. Always check the minimum and maximum values of the raw data first, then choose a starting point at or below the minimum and enough intervals to reach past the maximum, exactly as the derivation above works out. A value left outside every interval is a sign the table-building step was rushed.

Do I have to use tally marks, or can I just count directly

Tally marks are not compulsory, but they exist because counting a scattered raw list directly is error-prone — it is easy to recount a value or skip one. Marking a tally stroke for each value as you scan the raw data once, left to right, then adding up strokes per interval, is the safest method, especially with 20 or more values. Whichever method you use, always finish with the frequency-total check against the number of observations.

Before this

Where this leads