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.

18 min read

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 sold at a farm stand on one Saturday
FruitPounds sold
Apples
3535
Bananas
5050
Oranges
2020
Grapes
4545
Strawberries
3030

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.

  1. 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.

    step=5 pounds\text{step} = 5 \text{ pounds}
  2. Choose the top. The scale must reach the greatest value, 50 pounds. Divide by the step to see how many steps that takes.

    50÷5=10 steps50 \div 5 = 10 \text{ steps}
  3. Find each bar's height in steps by dividing its value by the step of 5 pounds.

    35÷5=7, 50÷5=10, 20÷5=4, 45÷5=9, 30÷5=635 \div 5 = 7,\ 50 \div 5 = 10,\ 20 \div 5 = 4,\ 45 \div 5 = 9,\ 30 \div 5 = 6
  4. 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.

  5. Read the graph. Bananas have the tallest bar, 10 steps or 50 pounds. To compare apples with oranges, subtract their values.

    35−20=1535 - 20 = 15

Answer

The bar graph uses a step of 5 pounds and a top of 50 pounds. Bananas sold the most at 5050 pounds, and 1515 more pounds of apples sold than oranges.

Bar graphBar graph. Bars run up the page. Categories: Fruit. Value axis: each step is 5 pounds, up to 50 pounds. Apples, 35 pounds. Bananas, 50 pounds. Oranges, 20 pounds. Grapes, 45 pounds. Strawberries, 30 pounds.01020304050poundsApplesBananasOrangesGrapesStrawberries
Bar graph · Fruit
Each bar is the pounds of one fruit sold, in steps of 5 pounds: 3535, 5050, 2020, 4545 and 3030.

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: 43,28,56,35,40,21,47,38,31,44,24,58,36,41,33,4643, 28, 56, 35, 40, 21, 47, 38, 31, 44, 24, 58, 36, 41, 33, 46. Make a histogram, then find how many students spent at least 4040 minutes.

  1. 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.

  2. 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.

    58−21=37,20+4×10=6058 - 21 = 37,\quad 20 + 4 \times 10 = 60
  3. 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.

  4. 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.

    3+5+6+2=163 + 5 + 6 + 2 = 16
  5. 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.

    6+2=86 + 2 = 8

Answer

The histogram has bins 10 minutes wide starting at 20 minutes, with counts of 33, 55, 66 and 22 students, and 88 students spent at least 4040 minutes.

HistogramHistogram. Value axis: each step is 1 student, up to 6 students. Measure axis: each step is 5 minutes, up to 60 minutes. Every bin is 10 minutes wide. 20 to 30 minutes, 3 students. 30 to 40 minutes, 5 students. 40 to 50 minutes, 6 students. 50 to 60 minutes, 2 students.0123456students2030405060minutes
Histogram
Bins 10 minutes wide start at 20 minutes; the counts are 33, 55, 66 and 22 students, and the 40-to-50 bin holds the most.

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 1616.

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.

HistogramHistogram. Value axis: each step is 1 student, up to 6 students. Measure axis: each step is 5 minutes, up to 60 minutes. Every bin is 5 minutes wide. 20 to 25 minutes, 2 students. 25 to 30 minutes, 1 student. 30 to 35 minutes, 2 students. 35 to 40 minutes, 3 students. 40 to 45 minutes, 4 students. 45 to 50 minutes, 2 students. 50 to 55 minutes, 0 students. 55 to 60 minutes, 2 students.0123456students202530354045505560minutes
Histogram
The same 16 times in bins 5 minutes wide: counts 2,1,2,3,4,2,0,22, 1, 2, 3, 4, 2, 0, 2, with the empty 50-to-55 bin as a thin flat bar.

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 Q1Q_1, the median, the upper quartile Q3Q_3 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. Q1Q_1 is the median of the lower half, and Q3Q_3 is the median of the upper half. The box runs from Q1Q_1 to Q3Q_3, 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.

IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

Worked example

Make and read a box plot

A basketball player scored these points in 11 games: 17,9,22,14,30,8,16,20,10,18,1217, 9, 22, 14, 30, 8, 16, 20, 10, 18, 12. Make a box plot and describe the spread of the scores.

  1. 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.

  2. Find the median. With 11 values, the middle one is the 6th, with 5 values on each side.

    median=16\text{median} = 16
  3. 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.

    Q1=10,Q3=20Q_1 = 10,\quad Q_3 = 20
  4. 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.

    8÷2=4, 10÷2=5, 16÷2=8, 20÷2=10, 30÷2=158 \div 2 = 4,\ 10 \div 2 = 5,\ 16 \div 2 = 8,\ 20 \div 2 = 10,\ 30 \div 2 = 15
  5. Find the spread. The range uses the maximum and minimum. The IQR uses the quartiles and covers about the middle half of the games.

    30−8=22,20−10=1030 - 8 = 22,\quad 20 - 10 = 10

Answer

The five-number summary is 88, 1010, 1616, 2020 and 3030 points. The scores have a range of 2222 points and an IQR of 1010 points, so about the middle half of the games had from 1010 to 2020 points.

Box plotBox plot. Value axis: each step is 2 points, up to 30 points. Minimum, 8 points. Lower quartile, 10 points. Median, 16 points. Upper quartile, 20 points. Maximum, 30 points.0612182430points
Box plotMinimum 8 · Lower quartile 10 · Median 16 · Upper quartile 20 · Maximum 30 points
The box runs from Q1=10Q_1 = 10 to Q3=20Q_3 = 20 points with the median line at 1616; the whiskers reach 88 and 3030.

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.