SECTION 4.4: Presenting Quantitative Data Graphically
Quantitative, or numerical, data can also be summarized into frequency tables.
Example 8
A teacher records scores on a 20-point quiz for 30 students in his class. Create a frequency.
The scores are:
19 20 18 18 17 18 19 17 20 18 20 16 20 15 17 12 18 19 18 19 17 20 18 16 15 18 20 5 0 0
Solution: The scores could be summarized into frequency table by grouping like values:
Score | Frequency |
0 | 2 |
5 | 1 |
12 | 1 |
15 | 2 |
16 | 2 |
17 | 4 |
18 | 8 |
19 | 4 |
20 | 6 |
Using this table, it seems like we could create a standard bar chart from this summary, like we did for categorical data:
However, since the scores are numerical values, the bar graph above doesn’t really make sense; the first and second bars are five values apart, while the later bars are only one value apart. It would be more correct to treat the horizontal axis as a number line. This type of graph is called a histogram.
Histogram
A histogram is like a bar graph, but where the horizontal axis is a number line. The vertical axis still represents frequency, and the horizontal axis still represents the variable of interest.
Example 9
For the quiz score values in example 8, draw a histogram.
Solution: The histogram for the quiz score data is below:
Notice that in the histogram, a bar represents values on the horizontal axis from that on the left hand-side of the bar up to, but not including, the value on the right hand side of the bar. Some people choose to have bars start at ½ values to avoid this ambiguity as shown below.
Unfortunately, not a lot of common software packages can correctly graph a histogram. Fortunately, your graphing calculator can quickly create an accurate histogram using the STAT PLOT option.
If we have a large number of widely varying data values, creating a frequency table that lists every possible value as a category would lead to an exceptionally long frequency table, and probably would not reveal any patterns. For this reason, it is common with quantitative data to group data into class intervals.
Class Intervals
Class intervals are groupings of the data. In general, we define class intervals so that:
- Each interval is equal in size. For example, if the first class contains values from 120-129, the second class should include values from 130-139.
- We have somewhere between 5 and 20 classes, typically, depending upon the number of data we’re working with.
Example 10
Suppose that we have collected weights from 100 male subjects as part of a nutrition study.
Interval | Frequency |
120 – 124 | 4 |
135 – 149 | 14 |
150 – 164 | 16 |
165 – 179 | 28 |
180 – 194 | 12 |
195 – 209 | 8 |
210 – 224 | 7 |
225 – 239 | 6 |
240 – 254 | 2 |
255 – 269 | 3 |
Use the frequency table above to answer the following questions:
a) Draw a histogram of this data.
b) How many men had weights between 195 and 209 pounds?
c) How many men had weights that were at least 225 pounds?
d) What percent of men weighed less than 150 pounds?
Solution:
a) The histogram for the weights of these 100 men is shown below:
In many software packages, you can create a graph similar to a histogram by putting the class intervals as the labels on a bar chart.
b) There are 8 men with weights between 195 and 209 pounds.
c) To find the number of men with weights that were at least 225 pounds, we consider which columns represent weights of 225 pounds or more. This is the last 3 columns in the histogram. The number of men with weights that were at least 225 pounds is 6 + 2 + 3 = 11. There are 11 men that have weights that are at least 225 pounds.
d) To find the percentage of men weighing less than 150 pounds, we first need to find the number of men weighing less than 150 pounds. This is represented by the first two bars in the histogram. There are 4 + 14 = 18 men weighing less than 150 pounds. Next, we need the total number of men, which we are given as 100. The percentage of men weighing less than 150 pounds is 18/100 = .18 = 18%.
The total cost of textbooks for the term was collected from 36 students.
$140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285
$285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320
$330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
a) Create a histogram for this data.
b) How many students had textbook costs less than $200?
c) What percentage of students had textbook costs over $400?
Calculator Instructions for Drawing a Histogram Using a TI-83/84:
1) Turn on the calculator
2) Press the “STAT” key
3) Hit “Enter” on option 1: “Edit” This will bring you to a screen that contains lists: L1, L2, L3, etc.
4) Enter the data values (one value per row) into L1. For any negative values you need to use the (-) key, not the subtraction key. Continue until all data is entered into L1.
5) Press the 2nd key and then “STAT PLOT” (top left of calculator)
6) Press “Enter” on 1: “Plot 1”
7) Use the arrows to “ON” to turn on Plot 1. Hit “Enter”.
8) Use the arrows to go to the histogram picture and hit “Enter”.
9) Make sure that Xlist displays L1
10) Press the 2nd key and then “STAT PLOT” again. Make sure to turn off all other stat plots, and clear all equations before graphing the histogram.
11) Press the ZOOM menu.
12) Scroll down to option 9: “ZoomStat” and hit “Enter”.