Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
Mathematics LibreTexts

11.3: Presenting Quantitative Data Graphically

  • Page ID
    34241
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    Quantitative, or numerical, data can also be summarized into frequency tables.

    Example 9

    A teacher records scores on a 20-point quiz for the 30 students in his class. 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

    These scores could be summarized into a frequency table by grouping like values:

    \(\begin{array}{|c|c|}
    \hline \textbf { Score } & \textbf { Frequency } \\
    \hline 0 & 2 \\
    \hline 5 & 1 \\
    \hline 12 & 1 \\
    \hline 15 & 2 \\
    \hline 16 & 2 \\
    \hline 17 & 4 \\
    \hline 18 & 8 \\
    \hline 19 & 4 \\
    \hline 20 & 6 \\
    \hline
    \end{array}\)

    Using this table, it would be possible to create a standard bar chart from this summary, like we did for categorical data:

    A bar chart, with horizontal axis labeled Score and the vertical axis labeled Frequency.  The horizontal axis has bars labeled 0 5 12 15 16 17 18 19 20, with heights from the previous table.

    However, since the scores are numerical values, this chart 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

    Example 10

    For the values above, a histogram would look like:

    This is a histogram. The x-axis is labeled score and goes from 0 to 21, with a scale of 1. The y-axis is labeled frequency and goes from 0 to 9 with a scale of 1. There are no spaces between the bars.  The first bar spans the horizontal axis from 0 to 1.

    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.

    This is a histogram of the same data but this time the spaces are labeled 0 to 20 instead of the tick marks.

    Unfortunately, not a lot of common software packages can correctly graph a histogram. About the best you can do in Excel or Word is a bar graph with no gap between the bars and spacing added to simulate a numerical horizontal axis.

    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 11

    Suppose that we have collected weights from 100 male subjects as part of a nutrition study. For our weight data, we have values ranging from a low of 121 pounds to a high of 263 pounds, giving a total span of 263-121 = 142. We could create 7 intervals with a width of around 20, 14 intervals with a width of around 10, or somewhere in between. Often time we have to experiment with a few possibilities to find something that represents the data well. Let us try using an interval width of 15. We could start at 121, or at 120 since it is a nice round number.

    \(\begin{array}{|c|c|}
    \hline \textbf { Interval } & \textbf { Frequency } \\
    \hline 120-134 & 4 \\
    \hline 135-149 & 14 \\
    \hline 150-164 & 16 \\
    \hline 165-179 & 28 \\
    \hline 180-194 & 12 \\
    \hline 195-209 & 8 \\
    \hline 210-224 & 7 \\
    \hline 225-239 & 6 \\
    \hline 240-254 & 2 \\
    \hline 255-269 & 3 \\
    \hline
    \end{array}\)

    A histogram of this data would look like:

    This is a histogram of the data in the table; the x-axis is labeled weights (pounds) and goes from 120 to 270, with a scale of 15; The y-axis is labeled frequency and goes from 0 to 30 with a scale of 5. There are no spaces between the bars.  The heights of the bars corresponds with the frequency of the class between the tick marks.

    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.

    A histogram of the same data as above, but instead of the tick marks being labeled, the bars are labeled with the class definition, like 120 - 134 for the first bar, and 135 - 149 for the second.

    Other graph types such as pie charts are possible for quantitative data. The usefulness of different graph types will vary depending upon the number of intervals and the type of data being represented. For example, a pie chart of our weight data is difficult to read because of the quantity of intervals we used.

    A pie chart of the previous data, with one slice for each class.  The size of each slice is the relative frequency of that class.

    Try it Now 3

    The total cost of textbooks for the term was collected from 36 students. Create a histogram for this data.

    $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

    Answer

    Using a class intervals of size 55, we can group our data into six intervals:

    \(\begin{array}{|l|r|}
    \hline \textbf { cost interval } & \textbf { Frequency } \\
    \hline \$ 140-194 & 5 \\
    \hline \$ 195-249 & 3 \\
    \hline \$ 250-304 & 9 \\
    \hline \$ 305-359 & 12 \\
    \hline \$ 360-414 & 4 \\
    \hline \$ 415-469 & 3 \\
    \hline
    \end{array}\)

    We can use the frequency distribution to generate the histogram.

    When collecting data to compare two groups, it is desirable to create a graph that compares quantities.

    Example 12

    The data below came from a task in which the goal is to move a computer mouse to a target on the screen as fast as possible. On 20 of the trials, the target was a small rectangle; on the other 20, the target was a large rectangle. Time to reach the target was recorded on each trial.

    \(\begin{array}{|c|c|c|}
    \hline \begin{array}{c}
    \textbf { Interval } \\
    \textbf { (milliseconds) }
    \end{array} & \begin{array}{c}
    \textbf { Frequency } \\
    \textbf { small target }
    \end{array} & \begin{array}{c}
    \textbf { Frequency } \\
    \textbf { large target }
    \end{array} \\
    \hline 300-399 & 0 & 0 \\
    \hline 400-499 & 1 & 5 \\
    \hline 500-599 & 3 & 10 \\
    \hline 600-699 & 6 & 5 \\
    \hline 700-799 & 5 & 0 \\
    \hline 800-899 & 4 & 0 \\
    \hline 900-999 & 0 & 0 \\
    \hline 1000-1099 & 1 & 0 \\
    \hline 1100-1199 & 0 & 0 \\
    \hline
    \end{array}\)

     

    One option to represent this data would be a comparative histogram or bar chart, in which bars for the small target group and large target group are placed next to each other.

    A comparitive bar graph.  The horizontal axis is labeled Reaction time (milliseconds) and the vertical is labeled Frequency.  The horizontal axis is divided into spaces labled with the class definitions, like 300-399 for the first, and 400-499 for the second.  In each space, there are two bars next to each other; the first is labeled small target and the second is labeled large target, and the heights correspond to the frequency values for each group.

    Frequency polygon

    An alternative representation is a frequency polygon. A frequency polygon starts out like a histogram, but instead of drawing a bar, a point is placed in the midpoint of each interval at height equal to the frequency. Typically the points are connected with straight lines to emphasize the distribution of the data.

    Example 13

    This graph makes it easier to see that reaction times were generally shorter for the larger target, and that the reaction times for the smaller target were more spread out.

    A comparitive frequency polygon.  The horizontal axis is labeled Reaction time (milliseconds) and the vertical is labeled Frequency.  The horizontal axis ranges from 300 to 1200 with scale of 100.  At the middle of each class group, like 350, 450, etc. there are two dots:  the first is labeled small target and the second is labeled large target, and the heights correspond to the frequency values for each group.  The dots are connected with line segments.


    11.3: Presenting Quantitative Data Graphically is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by David Lippman & Jeff Eldridge via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.