Quantitative Variables
Represented with Graphs
Learn to choose and construct histograms, dotplots, stemplots, and boxplots to display the distribution of quantitative data.
What Is a Quantitative Variable?
A quantitative variable takes numerical values for which arithmetic operations like adding and averaging make sense. Examples: height in centimeters, exam scores, household income.
Describing the Distribution
When you describe a distribution, always address these four features using the mnemonic SOCS:
Why Graph Your Data?
A table of numbers hides patterns. A well-chosen graph reveals them instantly. Consider these 15 exam scores:
Immediately we see the distribution is unimodal, centered in the 70s, with scores spread from 62 to 97.
Four Key Graph Types
Building a Histogram
The Dotplot
Each observation gets its own dot, stacked above a number line. Here are quiz scores for 20 students:
The Stemplot (Stem-and-Leaf)
A stemplot preserves the actual data values. The stem is the leading digit(s); the leaf is the last digit. Here is a stemplot for the 15 exam scores from earlier:
The Boxplot and Five-Number Summary
A boxplot displays the five-number summary: minimum, \(Q_1\), median, \(Q_3\), maximum. Outliers are plotted as individual points.
Histogram vs. Bar Chart
| Histogram | Bar Chart | |
|---|---|---|
| Data type | Quantitative | Categorical |
| Bars | Touch (no gaps) | Separated by gaps |
| Horizontal axis | Continuous number line | Category labels |
| Bar order | Fixed by number line | Can be rearranged |
| Area of bar | Proportional to frequency | Height alone encodes value |
Recognizing Shape
Choosing the Right Graph
Example: Constructing a Histogram
The number of minutes 20 students spent on homework last night:
Using bins of width 10 starting at 0 (e.g., [0, 10), [10, 20), etc.):
Shape: roughly symmetric. Center: around 30 minutes. Spread: 5 to 60 minutes.
Example: Outliers in a Boxplot
Data: daily high temperatures (\(^{\circ}\text{F}\)) over 12 days:
Five-number summary: Min = 55, \(Q_1\) = 61, Median = 65.5, \(Q_3\) = 71, Max = 95.
The IQR is \(\text{IQR} = Q_3 - Q_1 = 71 - 61 = 10\). The upper outlier fence is \(Q_3 + 1.5 \times \text{IQR} = 71 + 1.5(10) = 86\). Since \(95 > 86\), it is an outlier.
Example: Relative Frequency Histogram
Instead of raw counts, the vertical axis shows the proportion (relative frequency) of observations in each bin. Each bar height = \(\frac{\text{count in bin}}{n}\).
Common Mistakes
Summary: Graph Comparison
| Dotplot | Histogram | Stemplot | Boxplot | |
|---|---|---|---|---|
| Best for | Small \(n\) | Any \(n\) | Small \(n\) | Comparing groups |
| Shows shape? | ✓ | ✓ | ✓ | Partially |
| Individual values? | ✓ | ✕ | ✓ | ✕ |
| Shows outliers? | ✓ | Sometimes | ✓ | ✓ |
| Shows \(Q_1\), median, \(Q_3\)? | ✕ | ✕ | ✕ | ✓ |
Question 1 of 5
A histogram of household incomes in a city is skewed right. Which statement is most likely true?
Question 2 of 5
Which feature distinguishes a histogram from a bar chart?
Question 3 of 5
For a dataset with \(Q_1 = 20\), \(Q_3 = 40\), and \(\text{IQR} = 20\), any observation above what value would be considered an outlier?
Question 4 of 5
You want to compare the distributions of test scores for three different classes. Which graph type is most appropriate?
Question 5 of 5
In a relative frequency histogram, the heights of all bars sum to: