Chapter 10 · Statistics: samples and populations
Bar Graphs, Histograms and Box Plots
Make and read bar graphs, histograms and box plots, and learn what each display shows about a data set and what it hides.
A data display is a picture that helps you see what data say. In this lesson you will make and read three of them.
The first is a bar graph. In a bar graph, each bar stands for one separate category, which is a named group such as a kind of fruit. The bar's height is one value for that category, read on a scale that climbs in equal steps. The table below lists how many pounds of each fruit a farm stand sold on one Saturday.
| Fruit | Pounds sold |
|---|---|
Apples | |
Bananas | |
Oranges | |
Grapes | |
Strawberries |
Worked example
Make and read a bar graph
Make a bar graph of the fruit sold in the table. Then find which fruit sold the most, and how many more pounds of apples sold than oranges.
Choose the step. Every value is a multiple of 5, so a step of 5 pounds makes every bar end exactly on a step. A step of 10 would leave 35 and 45 between steps, which makes them harder to read.
Choose the top. The scale must reach the greatest value, 50 pounds. Divide by the step to see how many steps that takes.
Find each bar's height in steps by dividing its value by the step of 5 pounds.
Name the parts. Draw one bar for each fruit in the table's order: apples, bananas, oranges, grapes, strawberries. The category axis is labeled fruit, and the value axis measures pounds.
Read the graph. Bananas have the tallest bar, 10 steps or 50 pounds. To compare apples with oranges, subtract their values.
Answer
The bar graph uses a step of 5 pounds and a top of 50 pounds. Bananas sold the most at pounds, and more pounds of apples sold than oranges.
Sometimes data are many measurements of one quantity, such as the minutes each student spent on homework. A histogram shows this kind of data. You cut the number line into bins, which are equal intervals that touch with no gaps and no overlaps. Each bar's height is the frequency of its bin: the number of data values that fall in it.
Here is the difference. In a bar graph, each bar is one value for a separate category. In a histogram, each bar is a count of values, and the bars touch because the bins are neighboring pieces of one number line.
When a value lands on an edge, use this rule: each bin includes its lower edge but not its upper edge, and the last bin includes both edges.
Worked example
Make and read a histogram
Sixteen students recorded the minutes they spent on homework one evening: . Make a histogram, then find how many students spent at least minutes.
Order the values from least to greatest so that sorting is easier and the least and greatest values are easy to see: 21, 24, 28, 31, 33, 35, 36, 38, 40, 41, 43, 44, 46, 47, 56, 58. The least is 21 minutes and the greatest is 58 minutes.
Choose a start and a width. Start at 20, a round number just below the least value, so 21 fits in the first bin. The values spread over 37 minutes, so bins 10 minutes wide give a few easy bins. Four bins from 20 reach 60, past the greatest value, 58.
Sort each value into its bin. Each bin includes its lower edge but not its upper edge, and the last bin includes both, so 40 goes in the 40-to-50 bin. 20 to 30: 21, 24, 28. 30 to 40: 31, 33, 35, 36, 38. 40 to 50: 40, 41, 43, 44, 46, 47. 50 to 60: 56, 58.
Count each bin: 3, 5, 6 and 2 students. Check that the counts add to all 16 students, so no value was missed or counted twice.
Read a group of bins. At least 40 minutes means the 40-to-50 bin and the 50-to-60 bin together, so add their counts.
Answer
The histogram has bins 10 minutes wide starting at 20 minutes, with counts of , , and students, and students spent at least minutes.
A bin width is a choice, not a rule. Here are the same 16 values in bins 5 minutes wide, still starting at 20 minutes. With the same edge rule, 35 goes in the 35-to-40 bin and 40 goes in the 40-to-45 bin. From left to right, the counts are 2, 1, 2, 3, 4, 2, 0 and 2, and they still add to .
Compare the two histograms. With 10-minute bins, the 40-to-50 bin holds 6 students, but you cannot tell how those times are spread inside the bin. The narrower bins show more detail: 4 of those 6 students fall in the 40-to-45 bin. Narrower bins can also hold few values or none. The 50-to-55 bin holds no values, so it is drawn as a thin flat bar.
In general, wider bins hide more of the spread, and narrower bins show more detail but may hold few values or none.
Key concept
A box plot splits ordered data into four parts
A box plot shows five values from ordered data: the minimum, the lower quartile , the median, the upper quartile and the maximum. The median is the middle value, or the mean of the two middle values. Split the ordered data at the median into a lower half and an upper half; when the count is odd, the median is in neither half. is the median of the lower half, and is the median of the upper half. The box runs from to , a line marks the median, and whiskers reach the minimum and maximum. Each of the four parts holds about a quarter of the data. The range is maximum minus minimum. The interquartile range (IQR) is the box's length. A box plot hides each value and the count.
Worked example
Make and read a box plot
A basketball player scored these points in 11 games: . Make a box plot and describe the spread of the scores.
Order the scores, because the median and quartiles depend on position in an ordered list: 8, 9, 10, 12, 14, 16, 17, 18, 20, 22, 30. The minimum is 8 points and the maximum is 30 points.
Find the median. With 11 values, the middle one is the 6th, with 5 values on each side.
Split at the median. The count is odd, so 16 is in neither half. The lower half is 8, 9, 10, 12, 14, and its middle value is 10. The upper half is 17, 18, 20, 22, 30, and its middle value is 20.
Pick a scale on which all five values land. All five are even, so use a step of 2 points. A step of 5 would miss 8 and 16. A step of 1 would need 30 steps, which is more than this drawing holds. Then place each value at its number of steps; 15 steps reach the maximum.
Find the spread. The range uses the maximum and minimum. The IQR uses the quartiles and covers about the middle half of the games.
Answer
The five-number summary is , , , and points. The scores have a range of points and an IQR of points, so about the middle half of the games had from to points.
Takeaway: A bar graph shows one value for each separate category. A histogram counts how many values of one measured quantity fall in equal, touching bins, and the bin width you choose changes how much detail you see. A box plot shows five values from ordered data, and each of its four parts holds about a quarter of the data.
Next, you will choose an appropriate data display.