Histograms for Ungrouped Data
From a dot diagram to a histogram: frequency tables with tally marks, histograms with one bar for each value, and how a histogram differs from a bar graph.
What You Should Already Know
- A dot diagram (lesson 12.1) puts one dot above a number line for each value; the height of a column is how many times the value occurs.
- The frequency of a value is the number of times it occurs. In a tally, every fifth stroke is drawn across the four before it, so the strokes can be counted in fives.
From a Dot Diagram to a Histogram
With a large set of data, drawing every dot is slow. Instead, draw a rectangle (a bar) over each column of dots, as tall as the column. The vertical axis is numbered so that each bar's height can be read as its frequency. The result is a histogram.
Example 1: The same data, two ways
The dot diagram shows the scores of 20 pupils in a quiz. Draw a histogram of the same data.
Solution
Each column of dots becomes a bar of the same height: 1, 3, 4, 6, 3, 2, 1. The scores go along the bottom, each in the middle of its bar, and the frequency goes up the side, from 0.
Each bar is as wide as the step from one score to the next, so the bars meet: there is no gap between 4 and 5 on a number scale.
The histogram has 7 touching bars of heights 1, 3, 4, 6, 3, 2 and 1 over the scores 2 to 8.
Histogram for ungrouped data
A histogram shows the frequency of each value of numerical data with a bar.
The horizontal axis is a number scale. Each value is written under the middle of its bar, and every value from the smallest to the largest has a place: a value that does not occur has a bar of height 0 (no bar), with its number still written.
The vertical axis shows the frequency. It starts at 0 and is numbered in equal steps.
The bars touch, all have the same width, and the height of each bar is the frequency.
Both axes of a histogram are named; give it a title when it stands on its own.
Frequency Tables and Drawing Histograms
Before drawing a histogram from a list, count the data in a frequency table. Go through the list once, making a tally stroke for each value and crossing each value off as you go. The total of the frequencies must be the number of values.
Example 2: Tally, table and histogram
The scores, out of 10, of 40 participants in a shooting competition were: 3, 8, 4, 5, 4, 4, 7, 6, 3, 4, 10, 2, 7, 4, 10, 5, 6, 7, 7, 6, 5, 7, 3, 7, 8, 4, 2, 2, 8, 5, 7, 8, 6, 3, 8, 2, 2, 6, 3, 6. (a) Make a frequency table with tally marks. (b) Draw a histogram. (c) What was the most common score?
Solution
(a) The scores go from 2 to 10, so the table has a row for every score from 2 to 10, including 9, which no one scored.
| Score | Tally | Frequency |
|---|---|---|
| Total |
Check: the number of participants.
(b) The largest frequency is 7, so the frequency axis goes from 0 to 7 in steps of 1. Score 9 keeps its place, with no bar.
(c) The tallest bar is over 7, with a frequency of 7.
(a) The table is above, with a total of 40. (b) The histogram is above. (c) 7 (scored by 7 participants).
The mode
The value with the highest frequency is the mode: the most common value. On a histogram it is the value under the tallest bar.
If every bar is the same height, there is no mode (5, 7, 9; or 3, 3, 5, 5). Otherwise, if two bars are equally the tallest, each of their values is a mode; if more than two bars share the top, there is no mode (lesson 12.9). The mode is a value, not a frequency: in Example 3 below, the modes are 2 books and 3 books, not 8 (the number of pupils who read each).
Reading a Histogram
Example 3: Reading frequencies
The histogram shows the number of books read during the school holidays by each pupil of a class. (a) How many pupils read exactly 4 books? (b) How many read at least 3 books? (c) How many pupils are in the class? (d) What is the mode? (e) What percentage of the class read fewer than 2 books? Give your answer to 1 decimal place.
Solution
(a) The bar over 4 reaches 4.
(b) At least 3 means 3, 4, 5 or 6 books: pupils.
(c) Add every bar: pupils.
(d) The bars over 2 and 3 are equally the tallest (8 each), so there are two modes, 2 books and 3 books.
(e) Fewer than 2 means 0 or 1 book: pupils. Percentage
(a) 4 (b) 15 (c) 30 (d) 2 books and 3 books (e) 23.3%
Example 4: A missing frequency
A survey of 50 families recorded how many children each family has. The frequency for 3 children is shown as . (a) Find . (b) Draw a histogram, numbering the frequency axis from 0 to 18 in steps of 2.
| Number of children | Frequency |
|---|---|
| Total |
Solution
(a) The frequencies add up to the number of families:
, so .
(b) A bar for each number of children from 0 to 5, touching, with heights 6, 12, 17, 9, 4 and 2.
(a) (b) The histogram is drawn above.
Histograms and Bar Graphs
A histogram looks like a bar graph, but its horizontal axis is a number scale: each bar covers the scale from halfway below its value to halfway above (the bar for 4 covers 3.5 to 4.5), so the bars touch. A bar graph's bars stand for separate categories, in any order, so they stand apart.
| Histogram | Bar graph | |
|---|---|---|
| Data | numbers (scores, counts, lengths) | categories (subjects, CCAs) |
| Axis | a number scale, every value in the range kept | names, in any order |
| Bars | touching, equal widths | equal widths, with gaps |
Example 5: Which diagram, and why?
A class of 30 pupils was asked (A) how many times each pupil was late for school last term, and (B) which CCA each pupil takes. Results for A: 0 times 9 pupils, 1 time 8, 2 times 6, 3 times 4, 4 times 2, 5 times 1. Results for B: Choir 7, Football 9, Robotics 6, Scouts 5, Art Club 3. Which kind of diagram suits each set? Draw both.
Solution
A is numerical: the number of times is a count, so it is shown with a histogram, its bars touching over a number scale from 0 to 5.
B is categorical: a CCA is a name. It is shown with a bar graph, its bars apart; the CCAs could be put in any order.
A (a count) needs a histogram, with touching bars over a number scale. B (CCA names) needs a bar graph, with gaps between the bars.
Spotting Errors
Example 6: What is wrong?
Three pupils drew histograms of the books data of Example 3 (0 books 2 pupils, 1 book 5, 2 books 8, 3 books 8, 4 books 4, 5 books 0, 6 books 3). What is wrong with each?
Histogram A:
Histogram B:
Histogram C:
Solution
Histogram A has gaps between its bars. That makes it a bar graph, as if 0, 1, 2, … books were separate categories; on a number scale the bars touch.
Histogram B leaves out 5 books because no pupil read 5. Then 6 sits straight after 4, and the gap in the data disappears. The value 5 must keep its place, with a bar of height 0.
Histogram C's frequency axis starts at 2, not 0. The bar for 0 books (frequency 2) vanishes, and the bar for 2 books (8) looks 6 times as tall as the bar for 6 books (3), although 8 is not even 3 times 3 ().
Example 3's histogram is the correct one: touching bars, every value from 0 to 6, and an axis from 0.
A: gaps between the bars. B: the value 5 is left out. C: the frequency axis does not start at 0.
Common Mistakes
- Drawing gaps between the bars. That is a bar graph; a histogram's bars touch.
- Leaving out a value that does not occur. It keeps its place on the axis, with a bar of height 0.
- Starting the frequency axis above 0, or numbering it in uneven steps, so that the bars' heights cannot be compared.
- Giving the frequency as the mode. The mode is the value under the tallest bar (2 books or 3 books in Example 3), not its height (8 pupils).
- Giving one mode when two bars are equally the tallest: both values are modes (unless every bar is the same height, when there is no mode).
- Tally marks that are not grouped: the fifth stroke is drawn across the four before it, never as a fifth upright stroke.
- Forgetting to check that the frequencies add up to the number of values.
Practice Questions
Try each question first, then open the solution to check your working.
Question 1
The numbers of pets owned by 20 pupils are: 0, 1, 2, 1, 0, 3, 1, 2, 1, 0, 2, 1, 4, 1, 2, 1, 3, 2, 1, 1. (a) Make a frequency table with tally marks. (b) Draw a histogram. (c) What is the mode?
ShowHide solution
(a) The values go from 0 to 4.
| Pets | Tally | Frequency |
|---|---|---|
| Total |
Check:
(b)
(c) The tallest bar is over 1 (frequency 9).
(a) Frequencies 3, 9, 5, 2, 1 (total 20). (b) Drawn above. (c) The mode is 1 pet.
Question 2
The dot diagram shows the number of goals scored by a school football team in 15 matches. Draw a histogram of the same data.
ShowHide solution
Each column of dots becomes a bar of the same height: 3, 4, 5, 2 and 1, touching, over the values 0 to 4.
Bars of heights 3, 4, 5, 2 and 1 over 0 to 4 goals, touching.
Question 3
The histogram shows the scores of the pupils of a class in a quiz marked out of 8. (a) How many pupils scored 6? (b) How many scored at least 7? (c) How many pupils took the quiz? (d) What percentage scored less than 5?
ShowHide solution
(a) The bar over 6 reaches 7.
(b) 7 or 8: pupils.
(c) pupils.
(d) 3 or 4: pupils. Percentage
(a) 7 (b) 7 (c) 25 (d) 20%
Question 4
The histogram shows how many times each of 24 pupils went swimming last month. (a) What is the mode? (b) Ravi says, "The mode is 6, because the tallest bars reach 6." Explain his mistake.
ShowHide solution
(a) The bars over 1 and 3 are equally the tallest, each with frequency 6. Both values are modes.
(b) 6 is the frequency (the height of the tallest bars), not a value. The mode is the value under the tallest bar.
(a) Two modes: 1 trip and 3 trips. (b) He gave the frequency, 6, instead of the values under the tallest bars.
Question 5
40 pupils took a test with 6 questions. The table shows how many questions they answered correctly, but one frequency is shown as . (a) Find . (b) What is the mode?
| Questions correct | Frequency |
|---|---|
| Total |
ShowHide solution
(a) so and .
(b) The highest frequency is now 10, for 4 questions correct (9 is less than 10).
(a) (b) The mode is 4 questions correct.
Question 6
The table shows the number of siblings of 32 pupils. Draw a histogram, numbering the frequency axis from 0 to 12 in steps of 2.
| Number of siblings | Frequency |
|---|---|
| Total |
ShowHide solution
One bar for each value from 0 to 5, touching. No pupil has 4 siblings, so 4 keeps its place with no bar.
Drawn above: bars of 5, 11, 9, 4, 0 and 3, touching, with 4 kept in its place.
Question 7
Would you draw a histogram or a bar graph for each set of data? Give a reason. (a) The number of goals scored in each of 20 matches. (b) The favourite subject of each pupil in a class. (c) The number of rooms in each flat of an HDB block.
ShowHide solution
(a) Histogram: the number of goals is a count, a number on a number scale.
(b) Bar graph: a subject is a name (categorical data), and the subjects can be in any order.
(c) Histogram: the number of rooms is a count (2, 3, 4, 5, …).
(a) histogram (b) bar graph (c) histogram: numerical data are best shown on a histogram; categories must go on a bar graph.
Question 8
Bala drew this histogram of the quiz scores of Question 3. He says that five times as many pupils scored 6 as scored 4. What is wrong with his histogram, and is he right?
ShowHide solution
His frequency axis starts at 2, not 0, so every bar loses 2 units of height and the bar for score 3 disappears.
On his drawing the bar for 6 is 5 units tall and the bar for 4 only 1 unit, which is why it looks five times as many.
Read from the axis numbers, 7 pupils scored 6 and 3 scored 4: , so about 2.3 times as many, not five times.
The frequency axis does not start at 0. He is wrong: 7 pupils scored 6 and 3 scored 4, about 2.3 times as many.
Question 9
A survey counted the passengers in each of 50 taxis passing a junction: 18 taxis had 1 passenger, 15 had 2, 10 had 3 and 7 had 4. (a) Draw a histogram. (b) How many taxis had more than 2 passengers? (c) How many passengers were there altogether?
ShowHide solution
(a)
(b) 3 or 4 passengers: taxis.
(c) 18 taxis carried 1 passenger each, 15 carried 2, and so on:
(a) Drawn above. (b) 17 taxis (c) 106 passengers
Question 10
A dice was rolled 30 times. The results were: 5, 5, 1, 2, 3, 4, 5, 3, 2, 3, 6, 4, 2, 3, 2, 6, 1, 1, 6, 6, 3, 2, 5, 5, 5, 1, 2, 5, 6, 4. (a) Make a frequency table with tally marks. (b) Draw a histogram. (c) Which number came up most often?
ShowHide solution
(a)
| Dice score | Tally | Frequency |
|---|---|---|
| Total |
Check:
(b)
(c) The tallest bar is over 5 (frequency 7).
(a) Frequencies 4, 6, 5, 3, 7, 5 (total 30). (b) Drawn above. (c) 5, which came up 7 times.
Key Points
- A histogram shows the frequency of each value with a bar; it is a dot diagram with each column replaced by a bar.
- Count the data first in a frequency table with tally marks (the fifth stroke across the four); the frequencies add up to the number of values.
- The horizontal axis is a number scale: each value under the middle of its bar, every value in the range kept, even with frequency 0.
- The frequency axis starts at 0 and goes up in equal steps; the bars touch and have equal widths.
- The mode is the value under the tallest bar; there can be two modes, or none (none when every bar is the same height, or more than two share the top).
- Numerical data are best shown on a histogram (bars touching); categories must go on a bar graph (bars apart).