Skip to the page
Home Campus
Start free

Histograms for Grouped Data

Data with many different values, grouped into classes of equal width: frequency tables, histograms numbered at the class boundaries, the modal class, and choosing the class width.

What You Should Already Know

  • A histogram for ungrouped data (lesson 12.3) has one bar for each value; the bars touch, and the frequency axis starts at 0 in equal steps.
  • The inequality 150≤h<160150 \le h < 160 means that hh is at least 150 and less than 160: 150 is included, 160 is not.

Why Group Data?

The heights of 40 pupils go from 142 cm to 178 cm. A histogram with one bar for each centimetre would need 37 bars, most of them 0, 1 or 2 high, and no pattern would show. When data have many different values and few repeats, we group them into classes and draw one bar for each class.

Classes

A class such as 150≤h<160150 \le h < 160 holds every value from 150 up to, but not including, 160. Its lower boundary is 150 and its upper boundary 160.

The classes follow on from one another with no gaps and no overlaps: the upper boundary of one class is the lower boundary of the next, so every value belongs to exactly one class. A value on a boundary, such as 160, goes in the class that starts there, 160≤h<170160 \le h < 170.

Class width == upper boundary −- lower boundary. In this lesson every class has the same width.

Example 1: Classes and boundaries

The heights of 40 pupils are grouped into the classes 140≤h<150140 \le h < 150, 150≤h<160150 \le h < 160, 160≤h<170160 \le h < 170 and 170≤h<180170 \le h < 180, where hh cm is a height. (a) What is the class width? (b) In which class does each height go: 149.5 cm, 150 cm, 167.0 cm, 170 cm?

Solution

(a) Class width =150−140=10= 150 - 140 = 10 cm (the same for every class).

(b) 149.5 is at least 140 and less than 150: class 140≤h<150140 \le h < 150.

150 is on a boundary. It is included in the class that starts at 150, 150≤h<160150 \le h < 160, and not in 140≤h<150140 \le h < 150.

167.0 is in 160≤h<170160 \le h < 170, and 170 starts the class 170≤h<180170 \le h < 180.

(a) 10 cm (b) 149.5 cm: 140≤h<150140 \le h < 150; 150 cm: 150≤h<160150 \le h < 160; 167.0 cm: 160≤h<170160 \le h < 170; 170 cm: 170≤h<180170 \le h < 180.

Other ways of writing classes

Some books write classes the other way round, 140<h≤150140 < h \le 150, with the upper boundary included. Always read which end a table includes. Writing "140–150, 150–160" is unclear, because 150 seems to be in both.

Grouped Frequency Tables and Histograms

Histogram for grouped data

Each class has one bar, as wide as the class and as tall as its frequency. The classes have equal widths, so the bars do too, and the bars touch.

The horizontal axis is a number scale, numbered at the class boundaries. If the first boundary is far from 0, a zigzag on the axis shows that part of the scale is left out.

The frequency axis starts at 0 and is numbered in equal steps.

Example 2: Grouping, drawing and the modal class

The waiting times, in whole minutes, of 36 patients at a pharmacy were: 26, 28, 16, 30, 10, 7, 12, 20, 3, 39, 41, 31, 24, 15, 14, 25, 36, 5, 11, 6, 9, 13, 17, 8, 35, 21, 23, 18, 19, 29, 2, 15, 38, 46, 34, 32. (a) Group the times into a frequency table with the classes 0≤t<100 \le t < 10, 10≤t<2010 \le t < 20, …, 40≤t<5040 \le t < 50. (b) Draw a histogram. (c) Which class has the highest frequency?

Solution

(a) Tally each time into its class. A time on a boundary goes in the class that starts there: 10 in 10≤t<2010 \le t < 20, 20 in 20≤t<3020 \le t < 30, 30 in 30≤t<4030 \le t < 40.

Time, tt minTallyFrequency
0≤t<100 \le t < 10tally of 777
10≤t<2010 \le t < 20tally of 111111
20≤t<3020 \le t < 30tally of 888
30≤t<4030 \le t < 40tally of 888
40≤t<5040 \le t < 50tally of 222
Total3636

Check: 7+11+8+8+2=36,7 + 11 + 8 + 8 + 2 = 36\text{,} the number of patients.

(b) Five touching bars of equal width, the axis numbered 0, 10, 20, 30, 40, 50 at the boundaries.

Histogram of the waiting times of 36 patients: 0 to 10 minutes frequency 7, 10 to 20 frequency 11, 20 to 30 frequency 8, 30 to 40 frequency 8, 40 to 50 frequency 2Waiting times at a pharmacy02468101201020304050Waiting time (minutes)Frequency

(c) The tallest bar is 10≤t<2010 \le t < 20, with 11 patients.

(a) Frequencies 7, 11, 8, 8, 2 (total 36). (b) Drawn above. (c) 10≤t<2010 \le t < 20: more patients waited 10 to under 20 minutes than in any other class.

The modal class

The modal class is the class with the highest frequency: the tallest bar of a grouped histogram.

It is the most common class, not where most of the data lie. In Example 2, 11 of the 36 patients are in the modal class; 25 are not.

Grouped data do not show the single values, so the mode itself cannot be read from them.

Reading a Grouped Histogram

A grouped histogram answers questions about whole classes. It cannot answer a question that cuts a class in two, because it does not show where in its class each value lies.

Example 3: Reading a grouped histogram

The histogram shows the time, in minutes, that each Secondary 2 pupil in a survey spent on homework one evening. (a) How many pupils spent from 60 to under 90 minutes? (b) How many spent at least 90 minutes? (c) How many pupils are shown? (d) What percentage spent less than 60 minutes? (e) What is the modal class? (f) Can you tell how many pupils spent more than 100 minutes?

Histogram of homework times: 0 to 30 minutes frequency 6, 30 to 60 frequency 14, 60 to 90 frequency 22, 90 to 120 frequency 12, 120 to 150 frequency 6048121620240306090120150Time (minutes)Frequency

Solution

(a) The bar 60≤t<9060 \le t < 90 reaches 22.

(b) At least 90 minutes is the classes 90≤t<12090 \le t < 120 and 120≤t<150120 \le t < 150: 12+6=1812 + 6 = 18 pupils.

(c) 6+14+22+12+6=606 + 14 + 22 + 12 + 6 = 60 pupils.

(d) Less than 60 minutes: 6+14=206 + 14 = 20 pupils. Percentage =2060×100%=33.33…%≈33.3%= \frac{20}{60} \times 100\% = 33.33\ldots\% \approx 33.3\% (to 1 decimal place).

(e) The tallest bar: 60≤t<9060 \le t < 90.

(f) No. All 6 pupils of 120≤t<150120 \le t < 150 spent more than 100 minutes, but the histogram does not show how many of the 12 in 90≤t<12090 \le t < 120 spent more than 100. The answer is somewhere from 6 to 18.

(a) 22 (b) 18 (c) 60 (d) 33.3% (e) 60≤t<9060 \le t < 90 (f) No: it is between 6 and 18, but the exact number cannot be read.

Choosing the Class Width

The same data can be grouped in different ways, and each way gives a different picture. Here are the 40 heights of lesson 12.2 grouped with widths 20 cm, 10 cm and 5 cm. Every histogram has 40 pupils.

Example 4: The same data, three widths

The heights of 40 pupils (from 142 cm to 178 cm) are drawn below in classes of width 20 cm, 10 cm and 5 cm. What does each histogram show, and which class width shows the data best?

Width 20 cm: 140 to 160 frequency 17, 160 to 180 frequency 23Width 20 cm04812162024140160180Height (cm)FrequencyWidth 10 cm: 140 to 150 frequency 3, 150 to 160 frequency 14, 160 to 170 frequency 16, 170 to 180 frequency 7Width 10 cm0246810121416140150160170180Height (cm)Frequency
Width 5 cm: 140 to 145 frequency 2, 145 to 150 frequency 1, 150 to 155 frequency 4, 155 to 160 frequency 10, 160 to 165 frequency 8, 165 to 170 frequency 8, 170 to 175 frequency 3, 175 to 180 frequency 4Width 5 cm0246810140145150155160165170175180Height (cm)Frequency

Solution

Width 20 cm: only two bars, 17 and 23. All we learn is that a little more than half the pupils are 160 cm or taller; the shape is hidden.

Width 10 cm: four bars, 3, 14, 16 and 7. The heights rise to the class 160≤h<170160 \le h < 170 and fall after it.

Width 5 cm: eight bars, 2, 1, 4, 10, 8, 8, 3 and 4. Now the tallest bar is 155≤h<160155 \le h < 160, a detail the width 10 histogram hid, and the heights from 155 cm to 170 cm are seen to hold 26 of the 40 pupils.

Each histogram is true to the data, but they tell different stories. A good width gives enough classes to show the shape, but not so many that most classes hold only one or two values.

Width 20 cm hides the shape; width 10 cm shows it in outline, with 160≤h<170160 \le h < 170 the modal class; width 5 cm shows the most, including the modal class 155≤h<160155 \le h < 160. For 40 heights, width 5 cm or 10 cm is a sensible choice, 20 cm is not.

Spotting Errors

Example 5: What is wrong?

Find the fault in each of these. (a) A table with the classes "10–20, 20–30, 30–40" for the ages of a group of people. (b) A histogram of the masses of 25 parcels, in classes of 2 kg from 0 to 10 kg, with 6, 9, 5, 0 and 5 parcels, drawn as below. (c) A histogram of the times of 30 runners, in classes of 10 minutes from 0 to 40 minutes with 4, 9, 11 and 6 runners, drawn as below.

(b)

Faulty histogram (b): four touching bars with frequencies 6, 9, 5 and 5, the axis numbered 0, 2, 4, 8, 10 at their edges, evenly spaced; no place for 6 to 80246810024810Mass (kg)Frequency

(c)

Faulty histogram (c): four touching bars of equal width with frequencies 4, 9, 11 and 6, labelled 0 to 10, 10 to 20, 20 to 30 and 30 to 40 under the middle of each bar, with no numbers at the edges0246810120 to 1010 to 2020 to 3030 to 40Time (minutes)Frequency

Solution

(a) The classes overlap: a person aged 20 could go in "10–20" or in "20–30". Write them as 10≤a<2010 \le a < 20, 20≤a<3020 \le a < 30, 30≤a<4030 \le a < 40, so that every age has exactly one class.

(b) The class from 6 kg to 8 kg has no parcels, so it was left out: the axis jumps from 4 to 8 in one step, and the bar for 8 to 10 kg stands straight after 4 to 6 kg. The empty class must keep its place, with a bar of height 0, so that the gap in the data shows.

(c) The classes are written under the middle of each bar, as if they were the names of categories, and the boundaries are not numbered. The horizontal axis of a histogram is a number scale: number it at the class boundaries, 0, 10, 20, 30 and 40, at the edges of the bars, where one class meets the next. Written under the bars, "10 to 20" and "20 to 30" both name 20, and the axis does not show which class holds it.

(a) Overlapping classes. (b) An empty class left out. (c) The axis labelled under the bars instead of numbered at the class boundaries.

Common Mistakes

  • Putting a value on a boundary in the wrong class: with a≤x<ba \le x < b, 20 goes in 20≤x<3020 \le x < 30, not in 10≤x<2010 \le x < 20.
  • Writing classes that overlap ("10–20, 20–30") or leave gaps ("10–19, 21–30").
  • Saying the modal class is "where most of the data are". It is only the class with the highest frequency: in Example 2, 11 of 36.
  • Numbering the horizontal axis under the middle of each bar instead of at the class boundaries.
  • Leaving out a class with frequency 0, or drawing gaps between the bars.
  • Answering a question that cuts a class in two (more than 100 minutes, when the class is 90 to 120) as if the histogram could tell.
  • Using classes of different widths. Keep every class the same width (lesson 12.6 shows how a class of a different width misleads).

Practice Questions

Try each question first, then open the solution to check your working.

Question 1

Masses, mm kg, are grouped into the classes 20≤m<2520 \le m < 25, 25≤m<3025 \le m < 30, 30≤m<3530 \le m < 35 and 35≤m<4035 \le m < 40. (a) What is the class width? (b) In which class does each mass go: 24.9 kg, 25 kg, 35.0 kg? (c) What are the lower and upper boundaries of the third class?

ShowHide solution

(a) 25−20=525 - 20 = 5 kg.

(b) 24.9 is less than 25: 20≤m<2520 \le m < 25. 25 starts the next class: 25≤m<3025 \le m < 30. 35.0 starts the class 35≤m<4035 \le m < 40.

(c) The third class is 30≤m<3530 \le m < 35: lower boundary 30, upper boundary 35.

(a) 5 kg (b) 20≤m<2520 \le m < 25; 25≤m<3025 \le m < 30; 35≤m<4035 \le m < 40 (c) 30 and 35

Question 2

The marks, out of 100, of 30 pupils in a test were: 45, 67, 82, 91, 56, 73, 88, 62, 75, 59, 84, 70, 77, 81, 68, 92, 58, 79, 86, 63, 74, 89, 65, 78, 71, 83, 60, 76, 87, 69. (a) Group the marks into a frequency table with the classes 40≤x<5040 \le x < 50, 50≤x<6050 \le x < 60, …, 90≤x<10090 \le x < 100. (b) What is the modal class? (c) Is it true that most pupils scored from 70 to under 80?

ShowHide solution

(a) Tally each mark; 60 and 70 start their classes.

Mark, xxTallyFrequency
40≤x<5040 \le x < 50tally of 111
50≤x<6050 \le x < 60tally of 333
60≤x<7060 \le x < 70tally of 777
70≤x<8070 \le x < 80tally of 999
80≤x<9080 \le x < 90tally of 888
90≤x<10090 \le x < 100tally of 222
Total3030

Check: 1+3+7+9+8+2=30.1 + 3 + 7 + 9 + 8 + 2 = 30\text{.}

(b) The highest frequency is 9, in 70≤x<8070 \le x < 80.

(c) No. 9 of the 30 pupils is less than half. It is the most common class, not where most pupils scored.

(a) Frequencies 1, 3, 7, 9, 8, 2 (total 30). (b) 70≤x<8070 \le x < 80 (c) No: only 9 of 30 pupils are in it.

Question 3

The lengths of 40 leaves were measured. Draw a histogram of the table, numbering the frequency axis from 0 to 16 in steps of 2.

Length, xx cmFrequency
4≤x<64 \le x < 633
6≤x<86 \le x < 899
8≤x<108 \le x < 101515
10≤x<1210 \le x < 121010
12≤x<1412 \le x < 1433
Total4040
ShowHide solution

Five touching bars, the axis numbered 4, 6, 8, 10, 12, 14 at the boundaries, with a zigzag before 4 because the scale does not start at 0.

Histogram of the lengths of 40 leaves: 4 to 6 cm frequency 3, 6 to 8 frequency 9, 8 to 10 frequency 15, 10 to 12 frequency 10, 12 to 14 frequency 30246810121416468101214Length (cm)Frequency

Drawn above.

Question 4

The histogram shows the ages of the 80 people at a community centre event. (a) How many people were at least 45 years old? (b) What percentage were under 30? (c) What is the modal class?

Histogram of ages: 0 to 15 years frequency 10, 15 to 30 frequency 18, 30 to 45 frequency 22, 45 to 60 frequency 16, 60 to 75 frequency 140481216202401530456075Age (years)Frequency
ShowHide solution

(a) 45≤a<6045 \le a < 60 and 60≤a<7560 \le a < 75: 16+14=3016 + 14 = 30 people.

(b) 0≤a<150 \le a < 15 and 15≤a<3015 \le a < 30: 10+18=2810 + 18 = 28. Percentage =2880×100%=35%.= \frac{28}{80} \times 100\% = 35\%\text{.}

(c) The tallest bar: 30≤a<4530 \le a < 45 (22 people).

(a) 30 (b) 35% (c) 30≤a<4530 \le a < 45

Question 5

Using the histogram of Question 4, can you find how many people were 50 or older? Explain, and say what you can tell.

ShowHide solution

No. The class 45≤a<6045 \le a < 60 has 16 people, but the histogram does not show how many of them are 50 or older.

All 14 people in 60≤a<7560 \le a < 75 are 50 or older, and at most all 16 of 45≤a<6045 \le a < 60 are too. So the number is at least 14 and at most 14+16=3014 + 16 = 30.

It cannot be found exactly; it is from 14 to 30.

Question 6

A survey of 100 shoppers found that the modal class of the time spent in a shopping centre was 20≤t<4020 \le t < 40 minutes, with 35 shoppers. A newsletter says, "Most shoppers spend 20 to 40 minutes in the centre." Explain why this is wrong, and write a correct sentence.

ShowHide solution

"Most" means more than half. 35 of 100 shoppers is less than half; 65 shoppers spent less than 20 or at least 40 minutes.

The modal class only says that more shoppers were in this class than in any other class.

35 of 100 is not most. Correct: "More shoppers spent from 20 to under 40 minutes than in any other class of the survey (35 of the 100)."

Question 7

The marks, out of 100, of 200 pupils are to be grouped. Explain why each of these class widths is a poor choice, and suggest a better one. (a) Width 1. (b) Width 50.

ShowHide solution

(a) With width 1 there would be about 100 classes, one for each mark, which is the same as not grouping: most bars would be only a few pupils high and many would be 0, so the pattern would be lost in the ups and downs.

(b) With width 50 there would be only 2 classes, and the shape of the marks would be hidden.

Width 10 gives 10 classes: 0≤x<100 \le x < 10, …, 80≤x<9080 \le x < 90, and a last class 90≤x≤10090 \le x \le 100, which includes 100 so that a full mark has a class.

(a) Too many classes (about 100): no grouping at all. (b) Too few (2): the shape is hidden. Width 10 is better, the last class being 90≤x≤10090 \le x \le 100.

Question 8

Wei Jie grouped the times of a 2.4 km run into the classes "10–12, 12–14, 14–16, 16–18" minutes. His friend ran exactly 14 minutes. What is wrong with the classes, and how should they be written?

ShowHide solution

The classes overlap: 14 minutes could go in "12–14" or in "14–16", so it is not clear where his friend's time belongs.

Written with inequalities, every time has exactly one class: 10≤t<1210 \le t < 12, 12≤t<1412 \le t < 14, 14≤t<1614 \le t < 16, 16≤t<1816 \le t < 18. Then 14 minutes goes in 14≤t<1614 \le t < 16.

The classes overlap at their ends. Write them as 10≤t<1210 \le t < 12, 12≤t<1412 \le t < 14, 14≤t<1614 \le t < 16, 16≤t<1816 \le t < 18; 14 minutes is in 14≤t<1614 \le t < 16.

Question 9

The masses, in kg, of 20 school bags were: 5.9, 3.5, 4.3, 3.0, 4.8, 4.1, 3.2, 5.0, 4.9, 2.8, 6.0, 2.4, 5.5, 3.5, 6.3, 4.0, 3.9, 6.8, 4.6, 5.2. (a) Group them with the classes 2≤m<32 \le m < 3, 3≤m<43 \le m < 4, …, 6≤m<76 \le m < 7. (b) Draw a histogram. (c) What is the modal class?

ShowHide solution

(a) 3.0, 4.0, 5.0 and 6.0 each start their classes.

Mass, mm kgTallyFrequency
2≤m<32 \le m < 3tally of 222
3≤m<43 \le m < 4tally of 555
4≤m<54 \le m < 5tally of 666
5≤m<65 \le m < 6tally of 444
6≤m<76 \le m < 7tally of 333
Total2020

(b)

Histogram of the masses of 20 school bags: 2 to 3 kg frequency 2, 3 to 4 frequency 5, 4 to 5 frequency 6, 5 to 6 frequency 4, 6 to 7 frequency 30123456234567Mass (kg)Frequency

(c) The tallest bar is 4≤m<54 \le m < 5, with 6 bags.

(a) Frequencies 2, 5, 6, 4, 3 (total 20). (b) Drawn above. (c) 4≤m<54 \le m < 5

Question 10

45 pupils timed how long they took to solve a puzzle. One frequency is shown as kk. (a) Find kk. (b) Draw a histogram. (c) What is the modal class?

Time, tt secondsFrequency
0≤t<100 \le t < 1044
10≤t<2010 \le t < 2099
20≤t<3020 \le t < 30kk
30≤t<4030 \le t < 401212
40≤t<5040 \le t < 5066
Total4545
ShowHide solution

(a) 4+9+k+12+6=45,4 + 9 + k + 12 + 6 = 45\text{,} so 31+k=4531 + k = 45 and k=14k = 14.

(b)

Histogram of puzzle times of 45 pupils: 0 to 10 seconds frequency 4, 10 to 20 frequency 9, 20 to 30 frequency 14, 30 to 40 frequency 12, 40 to 50 frequency 6024681012141601020304050Time (seconds)Frequency

(c) The highest frequency is 14, in 20≤t<3020 \le t < 30.

(a) k=14k = 14 (b) Drawn above. (c) 20≤t<3020 \le t < 30

Key Points

  • Group data into classes when they have many different values and few repeats.
  • A class a≤x<ba \le x < b includes aa but not bb; a value on a boundary goes in the class that starts there.
  • Classes follow on with no gaps and no overlaps; class width == upper boundary −- lower boundary, the same for every class.
  • Tally the data into a grouped frequency table and check that the frequencies add up to the number of values.
  • A grouped histogram has touching bars of equal width, the horizontal axis numbered at the class boundaries and the frequency axis from 0 in equal steps.
  • The modal class is the class with the highest frequency, not "where most of the data are".
  • A grouped histogram answers questions about whole classes only.
  • The class width changes the picture: too wide hides the shape, too narrow leaves most classes nearly empty.

‹ 12.3 Histograms for Ungrouped Data 12.5 Comparing Statistical Diagrams ›

All Secondary 2 (Grade 8) lessons

Home Campus has lessons for Primary 3 to Secondary 2, and practice questions with worked solutions and worksheets for Primary 3 to Secondary 1. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 2 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.