Educerie

Educerie · AP · Statistics

AP Statistics 1.8

Graphical Representations of Summary Statistics for One Quantitative Variable

How do we describe data about one variable, and how must the data be collected before we can trust what they say?

What you will learn

  • Understand that a boxplot is a picture of the five-number summary
  • Know that whiskers stop at the most extreme values that are not outliers
  • Understand how the mean and median relate in symmetric and skewed distributions
  • Know what a boxplot cannot show

You must be able to

  1. State the five-number summary of a data set
  2. Construct a boxplot, marking an outlier after checking the fences
  3. Read the approximate percentage of data in each part of a boxplot
  4. Decide from the mean and median which way a distribution is skewed
  5. Explain why a boxplot cannot show that a distribution is bimodal

In the exam. Section I multiple choice, where a boxplot or five-number summary is given and you read a quartile, compare the mean with the median, or choose the matching histogram. In Section II, boxplots appear in the data-analysis question, with or without a histogram beside them, and you may be asked to build one from a summary table and the outlier rule. Reading a shape that a boxplot cannot show is a frequent error.

1The five-number summary

Five-number summary = the minimum data value, the first quartile (Q1Q_1), the median, the third quartile (Q3Q_3) and the maximum data value.

For the 30 waiting times, in minutes:

MinimumQ1Q_1MedianQ3Q_3Maximum
4914.52458

How the values were found, with n=30n = 30: the median is the mean of the 15th and 16th values (14 and 15). The lower half is the first 15 values and its median is the 8th value (9). The upper half is the last 15 values and its median is the 23rd value overall (24).

The five numbers split the data into four parts. Each part holds about 25% of the values. The range of each part tells you where the data are crowded and where they are thin.

PartFromToWidth
Lowest quarter495
Second quarter914.55.5
Third quarter14.5249.5
Top quarter245834

The top quarter is spread over 34 minutes, while the lowest is packed into 5. That already says the right side is stretched out.

2Building a boxplot

Boxplot = a graph of the five-number summary. The box represents the middle 50% of the data, with a line at the median and the ends of the box at the quartiles. Whiskers extend from the box. If there are outliers, the whiskers extend only to the most extreme values that are not outliers, and the outliers are marked with an asterisk or other symbol.

Build it in this order:

  1. Draw a number line that covers all the values, with a label and units.
  2. Draw a box from Q1Q_1 to Q3Q_3 and a vertical line inside it at the median.
  3. Calculate the fences: Q1−1.5 IQRQ_1 - 1.5\,\text{IQR} and Q3+1.5 IQRQ_3 + 1.5\,\text{IQR}.
  4. Mark each value beyond a fence as an outlier with an asterisk.
  5. Draw each whisker from the box to the most extreme value that is not an outlier.

For the waiting times:

Q3+1.5 IQR=24+1.5(15)=46.5the upper fenceQ_3 + 1.5\,\text{IQR} = 24 + 1.5(15) = 46.5 \qquad \textcolor{#838c91}{\text{the upper fence}}Q1−1.5 IQR=9−22.5=−13.5the lower fenceQ_1 - 1.5\,\text{IQR} = 9 - 22.5 = -13.5 \qquad \textcolor{#838c91}{\text{the lower fence}}

No value is below −13.5-13.5, so the lower whisker goes to the minimum, 4. The two largest values are 45 and 58, and only 58 is above 46.5. So 58 is an outlier, and the upper whisker stops at 45, the largest value that is not an outlier.

Figure 1 shows the result.

Figure 1. Boxplot of the 30 waiting times: whiskers from the minimum 4 to 45 (the largest value that is not an outlier), a box from Q_{1} = 9 to Q_{3} = 24 with the median 14.5 inside, and the outlier 58 as an asterisk 10 20 30 40 50 60 0 Waiting time (minutes) * Q1 = 9 median 14.5 Q3 = 24
Figure 1 · Boxplot of the 30 waiting times: whiskers from the minimum 4 to 45 (the largest value that is not an outlier), a box from Q_{1} = 9 to Q_{3} = 24 with the median 14.5 inside, and the outlier 58 as an asterisk

Two details earn marks:

  • The whisker stops at 45, not 58. The maximum is 58, but a whisker never reaches an outlier.
  • The outlier is a separate mark. It is not joined to the whisker.

If no value is beyond a fence, each whisker runs to the minimum and the maximum and nothing is marked.

3Reading a boxplot

Each section of a boxplot stands for about a quarter of the data.

  • About 25% of the values are below Q1Q_1, and about 25% are between Q1Q_1 and the median.
  • About 25% are between the median and Q3Q_3, and about 25% are above Q3Q_3.
  • About 50% are inside the box.

Check this with the data. Of the 30 waiting times, 7 values are above Q3=24Q_3 = 24: 26, 28, 31, 35, 38, 45 and 58. That is 730≈23%\frac{7}{30} \approx 23\%, which is about a quarter. The percentages are approximate because the data are discrete.

Compare the lengths. The box runs from 9 to 24, a width of 15 minutes (the IQR). The right whisker from 24 to 45 is longer than the left whisker from 4 to 9. A longer whisker means the data in that quarter are more spread out, not that there is more of it.

Be careful about what the picture does not say. You cannot read an exact value other than the five numbers, and you cannot count how many values there are.

4The mean, the median and the skew

The mean and the median tell you about the shape.

  • Relatively symmetric: the mean and the median are close to each other.
  • Skewed right: the mean is usually larger than the median.
  • Skewed left: the mean is usually smaller than the median.

The reason is resistance (Topic 1.7). A long tail pulls the mean toward it, while the median stays near the bulk of the data.

Figure 2 shows it for the waiting times: the median is 14.5 and the mean is 54830≈18.3\frac{548}{30} \approx 18.3. The mean is the larger of the two, and the distribution is skewed to the right.

Figure 2. Histogram of the 30 waiting times with the median (solid line, 14.5) and the mean (dashed line, 18.3): in a distribution skewed to the right the mean lies above the median 10 20 30 40 50 60 2 4 6 8 0 Frequency Waiting time (minutes) median 14.5 mean 18.3
Figure 2 · Histogram of the 30 waiting times with the median (solid line, 14.5) and the mean (dashed line, 18.3): in a distribution skewed to the right the mean lies above the median

You can see the same skew on a boxplot:

  • The median is nearer to Q1Q_1 than to Q3Q_3 (here 5.5 from Q1Q_1 and 9.5 from Q3Q_3).
  • The right whisker is longer than the left.
  • Outliers appear on the right.

The word is "usually". It is a tendency. For a small data set or an unusual one, the mean and the median can fall the other way, so do not use the rule as a proof.

5What a boxplot cannot show

A boxplot is a summary, so it loses detail. It cannot show:

  • Peaks. A boxplot cannot tell you whether a distribution is unimodal or bimodal.
  • Gaps and clusters inside the box or the whiskers.
  • The number of values or any individual value except the outliers.

Figure 3 shows another set of 30 values, not the waiting times, as a histogram and as a boxplot. The histogram has two peaks. The boxplot is a plain box with whiskers.

Figure 3. Another set of 30 values (not the waiting times) as a histogram and as a boxplot: the histogram shows two peaks, but the boxplot has only a box and whiskers and cannot show that the distribution is bimodal 10 20 30 40 50 60 70 80 0 4 8 12 Frequency Value
Figure 3 · Another set of 30 values (not the waiting times) as a histogram and as a boxplot: the histogram shows two peaks, but the boxplot has only a box and whiskers and cannot show that the distribution is bimodal

So you can describe skew, center, variability and outliers from a boxplot. You cannot call a distribution "unimodal" or "bimodal" from one, and you cannot call it "normal". If a question needs peaks or gaps, it will give a histogram or a dotplot.

You also cannot read the mean from a boxplot. The line in the box is the median.

6A worked example: build it from the summary

Example (invented): the times, in minutes, that 60 runners took to finish a short race have this summary: minimum 20, Q1=30Q_1 = 30, median 35, Q3=50Q_3 = 50, maximum 95. The next largest value after 95 is 70.

Does the 95 count as an outlier?

IQR=50−30=20minutes\text{IQR} = 50 - 30 = 20 \qquad \textcolor{#838c91}{\text{minutes}}1.5×20=30the distance allowed beyond a quartile1.5 \times 20 = 30 \qquad \textcolor{#838c91}{\text{the distance allowed beyond a quartile}}50+30=80the upper fence50 + 30 = 80 \qquad \textcolor{#838c91}{\text{the upper fence}}

The value 95 is above 80, so it is an outlier. The upper whisker ends at 70, the largest value that is not an outlier. The lower fence is 30−30=030 - 30 = 0, and the minimum is 20, so the lower whisker goes to 20.

To draw it: a box from 30 to 50 with a line at 35, a left whisker from 30 down to 20, a right whisker from 50 up to 70 and an asterisk at 95.

Reading it: the median (35) is closer to Q1Q_1 (5 above it) than to Q3Q_3 (15 below it). The right whisker and the outlier are longer. The distribution is skewed to the right, and the mean is likely to be larger than the median.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.