Math Core

Lesson 10.2 · Data and Statistics

Dot plots, histograms and box plots

A list of numbers hides its story. A good picture shows at a glance where the data are centered, how spread out they are, what shape they make and whether anything unusual is going on. This lesson covers the three standard displays for one numerical variable (dot plots, histograms and box plots) and how to read the shape of a distribution from them.

Dot plots

A dot plot (or line plot) puts one mark above a number line for every value. It shows every single data point, so it works best for small data sets with a limited number of different values.

Worked example: Goals per game

A soccer team recorded the number of goals it scored in each of its 1818 games.

012345678✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕
Goals scored per game

Find the median and the mean. What do you notice?

Median. With 1818 values, the median is the mean of the 9th and 10th values. Counting from the left, values 1–4 are 11s and values 5–10 are 22s. So the 9th and 10th values are both 22, and the median is 2 goals.

Mean. Multiply each value by how many times it occurs:

xˉ=1⋅4+2⋅6+3⋅3+4⋅2+5⋅1+6⋅1+8⋅118=5218≈2.89 goals.\bar{x} = \frac{1 \cdot 4 + 2 \cdot 6 + 3 \cdot 3 + 4 \cdot 2 + 5 \cdot 1 + 6 \cdot 1 + 8 \cdot 1}{18} = \frac{52}{18} \approx 2.89 \text{ goals}.

The mean is almost a whole goal higher than the median. Most games had 11 to 33 goals, but a few high-scoring games stretch out to the right and pull the mean toward them.

The shape of a distribution

The pattern of a data set, meaning which values occur and how often, is called its distribution. The goals data pile up on the left and trail off to the right. That trailing part is called a tail.

Definition

Shapes of distributions

  • Symmetric: the left and right sides are roughly mirror images. Many values sit near the middle.
  • Skewed right: a long tail stretches to the right, toward larger values.
  • Skewed left: a long tail stretches to the left, toward smaller values.
  • Uniform: all values occur about equally often; the display looks flat.
  • Bimodal: there are two separate peaks, which often means two different groups were mixed together.

The direction of a skew is the direction of the tail, not the direction of the peak. The goals data have their peak on the left and their tail on the right, so they are skewed right.

Shape tells you mean versus median

The mean is pulled toward the tail, and the median is not.

  • Skewed right: mean greater than median.
  • Skewed left: mean less than median.
  • Symmetric: mean and median are about equal.

That's why the median (with the IQR) is the better summary for skewed data.

Histograms

For large data sets or data with many different values, a dot plot gets crowded. A histogram groups the values into bins (intervals) of equal width and draws a bar for each bin. The height of the bar is the number of values in that bin, its frequency. The bars touch because the bins cover the number line with no gaps.

A value that lands on the edge between two bins goes in the bin to its right. In the histogram below, the first bar covers commutes from 00 minutes up to (but not including) 1010 minutes, and a 1010-minute commute is counted in the second bar.

Worked example: Reading a histogram

Commute times of 30 employees (minutes)
  1. Describe the shape.
  2. What percent of the employees commute 3030 minutes or more?
  3. Which bin contains the median?

Solutions.

  1. The bars peak on the left and trail off to the right, so the distribution is skewed right.
  2. The bins from 3030 up are 5+3+2=105 + 3 + 2 = 10 employees. 1030≈0.333\dfrac{10}{30} \approx 0.333, so about 33.3%.
  3. With 3030 values, the median is between the 15th and 16th values. The first bar holds values 1–3, the second holds 4–12, and the third holds 13–20. So both the 15th and 16th values are in the 20 to 30 minute bin.

A histogram tells you how many values fall in each bin, but not the exact values. You can find the bin that holds the median, but not the median itself.

Box plots and outliers

A box plot is drawn from the five-number summary: minimum, Q1Q_1, median, Q3Q_3 and maximum. The box runs from Q1Q_1 to Q3Q_3 with a line at the median, and whiskers reach out to the smallest and largest values. Each of the four sections holds about a quarter of the data.

In high school statistics you'll usually see a modified box plot, which shows outliers. Use the 1.5×IQR1.5 \times \text{IQR} rule from the last lesson: each whisker stops at the most extreme value that is not an outlier, and each outlier is drawn as a separate dot.

Worked example: A modified box plot

Twelve people ran a 5 km fun run. Their times, in minutes, were

22, 25, 27, 28, 30, 31, 33, 34, 36, 38, 40, 58.22, \ 25, \ 27, \ 28, \ 30, \ 31, \ 33, \ 34, \ 36, \ 38, \ 40, \ 58.

Make a modified box plot.

Five-number summary. The median is 31+332=32\dfrac{31 + 33}{2} = 32. The lower half is 22,25,27,28,30,3122, 25, 27, 28, 30, 31, so Q1=27+282=27.5Q_1 = \dfrac{27 + 28}{2} = 27.5. The upper half is 33,34,36,38,40,5833, 34, 36, 38, 40, 58, so Q3=36+382=37Q_3 = \dfrac{36 + 38}{2} = 37.

Outliers. IQR=37−27.5=9.5\text{IQR} = 37 - 27.5 = 9.5 and 1.5⋅9.5=14.251.5 \cdot 9.5 = 14.25. The fences are 27.5−14.25=13.2527.5 - 14.25 = 13.25 and 37+14.25=51.2537 + 14.25 = 51.25. The time 5858 is above 51.2551.25, so it is an outlier. Nothing is below 13.2513.25.

Draw it. The box runs from 27.527.5 to 3737 with a line at 3232. The left whisker reaches 2222. The right whisker stops at 4040, the largest value that is not an outlier, and 5858 gets its own dot.

Finishing times for a 5 km fun run (minutes)

Common mistake

A box plot does not show how many values there are, and a longer section does not mean more values. Every section holds about 25%25\% of the data; a long section just means those values are spread out. A box plot also hides some shape details: a bimodal data set can have a perfectly ordinary-looking box plot.

Comparing distributions

To compare two groups, draw their displays on the same scale and discuss four things: shape, center, spread and outliers. Use the median and IQR if either group is skewed or has outliers, and the mean and standard deviation if both are roughly symmetric.

Worked example: Two cities in April

The box plots show the daily high temperatures in two cities during April.

Daily high temperatures in April (°F)

Compare the two distributions.

  • Center. City Q's median (66∘66^\circ) is higher than City P's (62∘62^\circ), so City Q was typically a little warmer.
  • Spread. City P's IQR is 70−55=15∘70 - 55 = 15^\circ and City Q's is 69−63=6∘69 - 63 = 6^\circ. City P's temperatures varied much more from day to day. The ranges agree: 35∘35^\circ for P versus 18∘18^\circ for Q.
  • Overlap. City P had both the coldest day (45∘45^\circ) and the hottest day (80∘80^\circ). Even though City Q was usually warmer, you couldn't count on it being warmer on any given day.

Tip

Choosing a display: use a dot plot for a small data set where you want to see every value; a histogram for a large data set where the overall shape matters; and box plots to compare several groups side by side or to flag outliers.

Practice

Practice 1

The dot plot shows the scores of 2020 students on a 1010-point quiz. How would you describe its shape?

45678910✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕✕
Quiz scores
Practice 2

Use the quiz-score dot plot from the previous problem. What is the mean score?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

A histogram of the prices of houses sold in a city is strongly skewed right. Which statement is most likely true?

Practice 4

The histogram shows the battery life of 2525 phones. What percent of the phones lasted 1010 hours or more?

Battery life of 25 phones (hours)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

The box plot shows the ages of the people on a guided tour. What is the interquartile range?

Ages of people on a guided tour (years)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

A data set has this five-number summary: minimum 44, Q1=10Q_1 = 10, median 1313, Q3=16Q_3 = 16, maximum 3030. Its modified box plot shows the maximum as an outlier dot. What is the upper fence that the maximum is above?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

The box plots show the points two basketball teams scored per game in a youth league. Which statement is supported by the plots?

Points scored per game
Practice 8

A box plot summarizes the heights of 4040 sunflowers. About how many of the sunflowers have heights between Q1Q_1 and the median?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.